diff --git a/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java b/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java index 85c99c10..5fac7cca 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java +++ b/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java @@ -42,6 +42,7 @@ import org.gradle.api.tasks.Classpath; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.InputFiles; +import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.OutputDirectories; import org.gradle.api.tasks.ParallelizableTask; @@ -122,8 +123,8 @@ public class CheckForbiddenApis extends DefaultTask implements PatternFilterable * Directories with the class files to check. * Defaults to current sourseSet's output directory (Gradle 2/3) or output directories (Gradle 4.0+). */ - @OutputDirectories // no @InputDirectories, we use separate getter for a list of all input files + @Internal public FileCollection getClassesDirs() { return classesDirs; } @@ -142,6 +143,7 @@ public void setClassesDirs(FileCollection classesDirs) { * throw an exception! */ @Deprecated + @Internal public File getClassesDir() { final FileCollection col = getClassesDirs(); return (col == null) ? null : col.getSingleFile(); @@ -160,6 +162,7 @@ public void setClassesDir(File classesDir) { } /** Returns the pattern set to match against class files in {@link #getClassesDir()}. */ + @Internal public PatternSet getPatternSet() { return patternSet; } @@ -406,7 +409,7 @@ public void setTargetCompatibility(String targetCompatibility) { * The default is a single include with pattern '**/*.class' */ @Override - @Input + @Internal public Set getIncludes() { return getPatternSet().getIncludes(); } @@ -423,7 +426,7 @@ public CheckForbiddenApis setIncludes(Iterable includes) { * Set of patterns matching class files to be excluded from checking. */ @Override - @Input + @Internal public Set getExcludes() { return getPatternSet().getExcludes(); }