Skip to content

Commit b02db5e

Browse files
authored
Merge pull request #159 from vlsi/gradle_task
Fix Gradle task annotations
2 parents 6601154 + 4440b56 commit b02db5e

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
@@ -42,6 +42,7 @@
4242
import org.gradle.api.tasks.Classpath;
4343
import org.gradle.api.tasks.Input;
4444
import org.gradle.api.tasks.InputFiles;
45+
import org.gradle.api.tasks.Internal;
4546
import org.gradle.api.tasks.Optional;
4647
import org.gradle.api.tasks.OutputDirectories;
4748
import org.gradle.api.tasks.ParallelizableTask;
@@ -122,8 +123,8 @@ public class CheckForbiddenApis extends DefaultTask implements PatternFilterable
122123
* Directories with the class files to check.
123124
* Defaults to current sourseSet's output directory (Gradle 2/3) or output directories (Gradle 4.0+).
124125
*/
125-
@OutputDirectories
126126
// no @InputDirectories, we use separate getter for a list of all input files
127+
@Internal
127128
public FileCollection getClassesDirs() {
128129
return classesDirs;
129130
}
@@ -142,6 +143,7 @@ public void setClassesDirs(FileCollection classesDirs) {
142143
* throw an exception!
143144
*/
144145
@Deprecated
146+
@Internal
145147
public File getClassesDir() {
146148
final FileCollection col = getClassesDirs();
147149
return (col == null) ? null : col.getSingleFile();
@@ -160,6 +162,7 @@ public void setClassesDir(File classesDir) {
160162
}
161163

162164
/** Returns the pattern set to match against class files in {@link #getClassesDir()}. */
165+
@Internal
163166
public PatternSet getPatternSet() {
164167
return patternSet;
165168
}
@@ -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)