Skip to content

Commit 4440b56

Browse files
committed
Fix Gradle task annotations
1 parent dd13fcf commit 4440b56

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.gradle.api.specs.Spec;
4444
import org.gradle.api.tasks.Input;
4545
import org.gradle.api.tasks.InputFiles;
46+
import org.gradle.api.tasks.Internal;
4647
import org.gradle.api.tasks.Optional;
4748
import org.gradle.api.tasks.OutputDirectories;
4849
import org.gradle.api.tasks.ParallelizableTask;
@@ -123,8 +124,8 @@ public class CheckForbiddenApis extends DefaultTask implements PatternFilterable
123124
* Directories with the class files to check.
124125
* Defaults to current sourseSet's output directory (Gradle 2/3) or output directories (Gradle 4.0+).
125126
*/
126-
@OutputDirectories
127127
// no @InputDirectories, we use separate getter for a list of all input files
128+
@Internal
128129
public FileCollection getClassesDirs() {
129130
return classesDirs;
130131
}
@@ -143,6 +144,7 @@ public void setClassesDirs(FileCollection classesDirs) {
143144
* throw an exception!
144145
*/
145146
@Deprecated
147+
@Internal
146148
public File getClassesDir() {
147149
final FileCollection col = getClassesDirs();
148150
return (col == null) ? null : col.getSingleFile();
@@ -161,6 +163,7 @@ public void setClassesDir(File classesDir) {
161163
}
162164

163165
/** Returns the pattern set to match against class files in {@link #getClassesDir()}. */
166+
@Internal
164167
public PatternSet getPatternSet() {
165168
return patternSet;
166169
}
@@ -406,7 +409,7 @@ public void setTargetCompatibility(String targetCompatibility) {
406409
* The default is a single include with pattern '**/*.class'
407410
*/
408411
@Override
409-
@Input
412+
@Internal
410413
public Set<String> getIncludes() {
411414
return getPatternSet().getIncludes();
412415
}
@@ -423,7 +426,7 @@ public CheckForbiddenApis setIncludes(Iterable<String> includes) {
423426
* Set of patterns matching class files to be excluded from checking.
424427
*/
425428
@Override
426-
@Input
429+
@Internal
427430
public Set<String> getExcludes() {
428431
return getPatternSet().getExcludes();
429432
}

0 commit comments

Comments
 (0)