Skip to content

Apache Lucene open-source search software

LUCENE-9974: The test-framework module should apply the test ruleset for forbidden APIs. (#153)

Dawid Weiss5912e65434ab
diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradle
index 832dcde8940..5041e658414 100644
--- a/gradle/validation/forbidden-apis.gradle
+++ b/gradle/validation/forbidden-apis.gradle
@@ -136,5 +136,15 @@ allprojects { prj ->
'jdk-system-out'
]
}
+
+ // the test-framework module is special in that its main sources are exported for all tests.
+ // include the test signature file (defaults.tests.txt) to the main sourceset.
+ if (prj.path in [
+ ":lucene:test-framework"
+ ]) {
+ forbiddenApisMain.signaturesFiles += files(
+ file("${resources}/defaults.tests.txt")
+ )
+ }
})
}
\ No newline at end of file