Class AndroidProjectPlugin
- java.lang.Object
-
- io.freefair.gradle.plugins.android.AndroidProjectPlugin
-
- Direct Known Subclasses:
AndroidAspectJPostCompileWeavingPlugin
,AndroidCodeQualityHelper
,AndroidJavadocJarPlugin
,AndroidJavadocPlugin
,AndroidLombokPlugin
,AndroidMavenPublishAllVariantsPlugin
,AndroidMavenPublishBasePlugin
,AndroidMavenPublishPlugin
,AndroidSourcesJarPlugin
,CiDexPlugin
,CiLintPlugin
public abstract class AndroidProjectPlugin extends Object implements Plugin<Project>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AndroidProjectPlugin.ProjectType
-
Constructor Summary
Constructors Constructor Description AndroidProjectPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Project project)
protected static Provider<FileTree>
getAllJava(BaseVariant androidSourceSet)
All Java source files for this source set.TestedExtension
getAndroidExtension()
DomainObjectSet<? extends BaseVariant>
getAndroidVariants()
protected Provider<FileCollection>
getCompileClasspath(BaseVariant variant)
Returns the classpath used to compile this source.protected Provider<FileTree>
getOutput(BaseVariant androidSourceSet)
Project
getProject()
AndroidProjectPlugin.ProjectType
getProjectType()
protected static String
getTaskName(BaseVariant variant, String verb, String target)
Returns the name of a task for this source set.DomainObjectSet<TestVariant>
getTestVariants()
DomainObjectSet<UnitTestVariant>
getUnitTestVariants()
protected boolean
publishVariant(BaseVariant variant)
protected void
withAndroid(TestedExtension extension)
-
-
-
Method Detail
-
withAndroid
protected void withAndroid(TestedExtension extension)
-
getAndroidExtension
public TestedExtension getAndroidExtension()
-
getAndroidVariants
public DomainObjectSet<? extends BaseVariant> getAndroidVariants()
-
getTestVariants
@Nonnull public DomainObjectSet<TestVariant> getTestVariants()
-
getUnitTestVariants
@Nonnull public DomainObjectSet<UnitTestVariant> getUnitTestVariants()
-
publishVariant
protected boolean publishVariant(BaseVariant variant)
-
getTaskName
protected static String getTaskName(BaseVariant variant, String verb, String target)
Returns the name of a task for this source set.- Parameters:
verb
- The action, may be null.target
- The target, may be null- Returns:
- The task name, generally of the form ${verb}${name}${noun}
- See Also:
SourceSet.getTaskName(String, String)
-
getCompileClasspath
protected Provider<FileCollection> getCompileClasspath(BaseVariant variant)
Returns the classpath used to compile this source.- Returns:
- The classpath. Never returns null.
- See Also:
SourceSet.getCompileClasspath()
-
getAllJava
protected static Provider<FileTree> getAllJava(BaseVariant androidSourceSet)
All Java source files for this source set. This includes, for example, source which is directly compiled, and source which is indirectly compiled through joint compilation.- Returns:
- the Java source. Never returns null.
- See Also:
SourceSet.getAllJava()
-
getOutput
protected Provider<FileTree> getOutput(BaseVariant androidSourceSet)
- See Also:
SourceSet.getOutput()
-
getProjectType
@Nullable public AndroidProjectPlugin.ProjectType getProjectType()
-
getProject
public Project getProject()
-
-