Skip to content

Commit

Permalink
Merge pull request #159 from vlsi/gradle_task
Browse files Browse the repository at this point in the history
Fix Gradle task annotations
  • Loading branch information
uschindler authored Apr 6, 2020
2 parents 6601154 + 4440b56 commit b02db5e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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();
Expand All @@ -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;
}
Expand Down Expand Up @@ -406,7 +409,7 @@ public void setTargetCompatibility(String targetCompatibility) {
* The default is a single include with pattern '**/*.class'
*/
@Override
@Input
@Internal
public Set<String> getIncludes() {
return getPatternSet().getIncludes();
}
Expand All @@ -423,7 +426,7 @@ public CheckForbiddenApis setIncludes(Iterable<String> includes) {
* Set of patterns matching class files to be excluded from checking.
*/
@Override
@Input
@Internal
public Set<String> getExcludes() {
return getPatternSet().getExcludes();
}
Expand Down

0 comments on commit b02db5e

Please sign in to comment.