You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2019/12/03 17:41:18 UTC
[lucene-solr] branch gradle-master updated: Add a workaround for
the problem of forbiddenApis not running upon changing just the rules/
rulesets.
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch gradle-master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/gradle-master by this push:
new 85e0e4f Add a workaround for the problem of forbiddenApis not running upon changing just the rules/ rulesets.
85e0e4f is described below
commit 85e0e4fb759443c0697a01e019326843a806d58c
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Tue Dec 3 18:41:11 2019 +0100
Add a workaround for the problem of forbiddenApis not running upon changing just the rules/ rulesets.
---
gradle/validation/forbidden-apis.gradle | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradle
index 80cd33d..5dad1a2 100644
--- a/gradle/validation/forbidden-apis.gradle
+++ b/gradle/validation/forbidden-apis.gradle
@@ -102,5 +102,16 @@ allprojects { prj ->
doFirst dynamicSignatures.curry(configurations.testCompileClasspath, "solr")
}
}
+
+ // We rely on resolved configurations to compute the relevant set of rule
+ // files for forbiddenApis. Since we don't want to resolve these configurations until
+ // the task is executed, we can't really use them as task inputs properly. This is a
+ // chicken-and-egg problem.
+ //
+ // This is the simplest workaround possible: just point at all the rule files and indicate
+ // them as inputs. This way if a rule is modified, checks will be reapplied.
+ configure([forbiddenApisMain, forbiddenApisTest]) { task ->
+ task.inputs.dir(rootProject.file("gradle/validation/forbidden-apis"))
+ }
})
}
\ No newline at end of file