Interface ImportClassesSpec

  • All Implemented Interfaces:
    org.gradle.api.Named

    
    public interface ImportClassesSpec
     implements Named
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • dependencies

         abstract ImportClassesSpec dependencies(Object dependencies)

        The dependencies from where to import classes from.

        For instance:

        importClasses {
          dependencies("org.example:library:1.0")
        }
        ```.
        
        It's a shorthand for project's `dependencies` block:
        ```kotlin
        dependencies {
          importClasses("org.example:library:1.0")
        }
      • libraries

         abstract ImportClassesSpec libraries(Object dependencies)

        Extra dependencies to be mapped to Proguard's -libraryjars option.

        For instance:

        importClasses {
          libraries("org.example:library:1.0")
        }
        ```.
        
        It's a shorthand for project's `dependencies` block:
        ```kotlin
        dependencies {
          importClassesLibraries("org.example:library:1.0")
        }
      • getIntoSourceSet

         abstract Property<String> getIntoSourceSet()

        The org.gradle.api.tasks.SourceSet (or Android's com.android.build.api.variant) to bind the imported classes to.

        Defaults to this spec's name.

      • getRepackageTo

         abstract Property<String> getRepackageTo()

        Optional. The target package to repackage the classes to.

      • getKeepsAndRenames

         abstract MapProperty<String, String> getKeepsAndRenames()

        The -keep rules to apply to the classes. If the value is not blank, the class will be renamed to the given class name.

      • getFilters

         abstract SetProperty<String> getFilters()

        Controls what classes and resources gets imported into the target SourceSet.

        The patterns are matched against the relative path of the class file inside the jar, and order matters.

        There is no default, but a good standard should be:

        exclude("META-INF/**/module-info.class")
        include("**.class")
        exclude("**.*")
      • getExtraOptions

         abstract ListProperty<String> getExtraOptions()

        Allows to add any custom extra rule to Proguard's configuration

      • getJavaRuntimeLanguageVersion

         abstract Property<JavaLanguageVersion> getJavaRuntimeLanguageVersion()

        If set, a org.gradle.jvm.toolchain.JavaToolchainSpec runtime will be appended to -libraryjars.

        Defaults to java.toolchain.languageVersion.