Class SourceSetBasedCodeQualityPlugin<T extends Task>
- java.lang.Object
-
- io.freefair.gradle.plugins.android.AndroidProjectPlugin
-
- io.freefair.gradle.plugins.android.quality.AndroidCodeQualityHelper
-
- io.freefair.gradle.plugins.android.quality.AbstractAndroidCodeQualityPlugin<T,SourceSetBasedCodeQualityExtension>
-
- io.freefair.gradle.plugins.android.quality.SourceSetBasedCodeQualityPlugin<T>
-
- Direct Known Subclasses:
AndroidCheckstylePlugin
,AndroidPmdPlugin
public abstract class SourceSetBasedCodeQualityPlugin<T extends Task> extends AbstractAndroidCodeQualityPlugin<T,SourceSetBasedCodeQualityExtension>
- See Also:
AbstractCodeQualityPlugin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.freefair.gradle.plugins.android.AndroidProjectPlugin
AndroidProjectPlugin.ProjectType
-
-
Field Summary
-
Fields inherited from class io.freefair.gradle.plugins.android.quality.AbstractAndroidCodeQualityPlugin
extension, project
-
-
Constructor Summary
Constructors Constructor Description SourceSetBasedCodeQualityPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
configureForSourceSet(com.android.build.api.dsl.AndroidSourceSet sourceSet, T task)
protected static FileTree
getAllJava(com.android.build.api.dsl.AndroidSourceSet androidSourceSet)
All Java source files for this source set.protected Stream<com.android.build.gradle.api.BaseVariant>
getAllVariants(com.android.build.api.dsl.AndroidSourceSet androidSourceSet)
protected FileCollection
getCompileClasspath(com.android.build.api.dsl.AndroidSourceSet androidSourceSet)
Returns the classpath used to compile this source.protected Callable<Collection<?>>
getExtensionElementsCallable()
protected String
getExtensionElementsName()
protected FileCollection
getOutput(com.android.build.api.dsl.AndroidSourceSet androidSourceSet)
protected static String
getTaskName(com.android.build.api.dsl.AndroidSourceSet sourceSet, String verb, String target)
Returns the name of a task for this source set.protected void
withAndroid(com.android.build.gradle.TestedExtension extension)
-
Methods inherited from class io.freefair.gradle.plugins.android.quality.AbstractAndroidCodeQualityPlugin
apply, beforeApply, configureConfiguration, configureTaskDefaults, conventionMappingOf, createConfigurations, createExtension, getBasePlugin, getConfigurationName, getJavaPluginConvention, getReportName, getTaskBaseName, getTaskType, getToolName, withBasePlugin
-
Methods inherited from class io.freefair.gradle.plugins.android.AndroidProjectPlugin
getAllJava, getAndroidExtension, getAndroidVariants, getCompileClasspath, getOutput, getProject, getProjectType, getTaskName, getTestVariants, getUnitTestVariants, publishVariant
-
-
-
-
Method Detail
-
withAndroid
protected void withAndroid(com.android.build.gradle.TestedExtension extension)
- Overrides:
withAndroid
in classAndroidProjectPlugin
-
getExtensionElementsName
protected String getExtensionElementsName()
- Specified by:
getExtensionElementsName
in classAbstractAndroidCodeQualityPlugin<T extends Task,SourceSetBasedCodeQualityExtension>
-
getExtensionElementsCallable
protected Callable<Collection<?>> getExtensionElementsCallable()
- Specified by:
getExtensionElementsCallable
in classAbstractAndroidCodeQualityPlugin<T extends Task,SourceSetBasedCodeQualityExtension>
-
configureForSourceSet
protected abstract void configureForSourceSet(com.android.build.api.dsl.AndroidSourceSet sourceSet, T task)
-
getTaskName
protected static String getTaskName(com.android.build.api.dsl.AndroidSourceSet sourceSet, 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 FileCollection getCompileClasspath(com.android.build.api.dsl.AndroidSourceSet androidSourceSet)
Returns the classpath used to compile this source.- Returns:
- The classpath. Never returns null.
- See Also:
SourceSet.getCompileClasspath()
-
getAllJava
protected static FileTree getAllJava(com.android.build.api.dsl.AndroidSourceSet 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 FileCollection getOutput(com.android.build.api.dsl.AndroidSourceSet androidSourceSet)
- See Also:
SourceSet.getOutput()
-
getAllVariants
protected Stream<com.android.build.gradle.api.BaseVariant> getAllVariants(com.android.build.api.dsl.AndroidSourceSet androidSourceSet)
-
-