Class AndroidResolver


  • public class AndroidResolver
    extends java.lang.Object
    Helper class that helps scanning jars in the classpath looking for files in META-INF/substrate/dalvik that contain information that has to be added to the Android project
    • Constructor Summary

      Constructors 
      Constructor Description
      AndroidResolver​(java.lang.String classpath)
      AndroidResolver constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getAndroidDependencies()
      Walks through the jars in the classpath, and looks for META-INF/substrate/dalvik/android-dependencies.txt file.
      java.util.Set<java.lang.String> getAndroidPermissions()
      Walks through the jars in the classpath, and looks for META-INF/substrate/dalvik/android-permissions.txt file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AndroidResolver

        public AndroidResolver​(java.lang.String classpath)
                        throws java.io.IOException,
                               java.lang.InterruptedException
        AndroidResolver constructor
        Parameters:
        classpath - a string with the full classpath of the user's project
        Throws:
        java.io.IOException
        java.lang.InterruptedException
    • Method Detail

      • getAndroidPermissions

        public java.util.Set<java.lang.String> getAndroidPermissions()
                                                              throws java.io.IOException
        Walks through the jars in the classpath, and looks for META-INF/substrate/dalvik/android-permissions.txt file.
        Returns:
        a list of permission lines that should be added to the AndroidManifest file
        Throws:
        java.io.IOException - Exception while reading the permissions file.
      • getAndroidDependencies

        public java.util.Set<java.lang.String> getAndroidDependencies()
                                                               throws java.io.IOException
        Walks through the jars in the classpath, and looks for META-INF/substrate/dalvik/android-dependencies.txt file.
        Returns:
        a list of dependencies lines that should be added to the build.gradle file
        Throws:
        java.io.IOException - Exception while reading the file.