Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Gradle task annotations #159

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.gradle.api.specs.Spec;
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 @@ -123,8 +124,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 @@ -143,6 +144,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 @@ -161,6 +163,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