From f8c8fa5bbbdc17b1fb27f57b39c8bf61d289080f Mon Sep 17 00:00:00 2001 From: mkmaier Date: Mon, 6 Apr 2020 19:36:10 +0200 Subject: [PATCH] Gradle cache (#155) * Use https for repo.gradle.org * Mark gradle task's classpath as such * Ignore IntelliJ files in rat check * Use gradle 3.2 Co-authored-by: Markus Maier Co-authored-by: Uwe Schindler --- build.xml | 1 + ivy.xml | 3 ++- .../thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.xml b/build.xml index 65495124..4fcd76be 100644 --- a/build.xml +++ b/build.xml @@ -639,6 +639,7 @@ + diff --git a/ivy.xml b/ivy.xml index a7f2d168..dab49a71 100644 --- a/ivy.xml +++ b/ivy.xml @@ -16,7 +16,7 @@ --> - + ]> @@ -38,6 +38,7 @@ + diff --git a/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java b/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java index e1629f34..85c99c10 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java +++ b/src/main/java/de/thetaphi/forbiddenapis/gradle/CheckForbiddenApis.java @@ -38,8 +38,8 @@ import org.gradle.api.file.FileCollection; import org.gradle.api.file.FileTree; import org.gradle.api.file.FileTreeElement; -import org.gradle.api.resources.ResourceException; import org.gradle.api.specs.Spec; +import org.gradle.api.tasks.Classpath; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.Optional; @@ -174,6 +174,7 @@ public void setPatternSet(PatternSet patternSet) { * Defaults to current sourseSet's compile classpath. */ @InputFiles + @Classpath public FileCollection getClasspath() { return classpath; } @@ -595,7 +596,7 @@ public void info(String msg) { checker.parseSignaturesString(sb.toString()); } } catch (IOException ioe) { - throw new ResourceException("IO problem while reading files with API signatures.", ioe); + throw new GradleException("IO problem while reading files with API signatures.", ioe); } catch (ParseException pe) { throw new InvalidUserDataException("Parsing signatures failed: " + pe.getMessage(), pe); } @@ -612,7 +613,7 @@ public void info(String msg) { try { checker.addClassesToCheck(getClassFiles()); } catch (IOException ioe) { - throw new ResourceException("Failed to load one of the given class files.", ioe); + throw new GradleException("Failed to load one of the given class files.", ioe); } checker.run();