mirror of https://github.com/apache/lucene.git
Skip errorprone on non-nightlies. (#45)
This commit is contained in:
parent
48715fe898
commit
f02799c511
|
@ -15,12 +15,21 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
def skipErrorProne = rootProject.runtimeJavaVersion > JavaVersion.VERSION_15;
|
def skipReason
|
||||||
if (skipErrorProne) {
|
|
||||||
|
if (rootProject.runtimeJavaVersion > JavaVersion.VERSION_15) {
|
||||||
|
skipReason = "won't work with JDK ${rootProject.runtimeJavaVersion}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Boolean.parseBoolean(propertyOrDefault("tests.nightly", "false"))) {
|
||||||
|
skipReason = "skipped on non-nightly runs"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (skipReason) {
|
||||||
configure(rootProject) {
|
configure(rootProject) {
|
||||||
task errorProneSkipped() {
|
task errorProneSkipped() {
|
||||||
doFirst {
|
doFirst {
|
||||||
logger.warn("WARNING: errorprone disabled (won't work with JDK ${rootProject.runtimeJavaVersion})")
|
logger.warn("WARNING: errorprone disabled (${skipReason})")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +40,7 @@ allprojects { prj ->
|
||||||
// LUCENE-9650: Errorprone on master/gradle does not work with JDK-16+
|
// LUCENE-9650: Errorprone on master/gradle does not work with JDK-16+
|
||||||
// this is a hack to keep the dependency (so that palantir's version check doesn't complain)
|
// this is a hack to keep the dependency (so that palantir's version check doesn't complain)
|
||||||
// but don't include the plugin (which fails on JDK16+).
|
// but don't include the plugin (which fails on JDK16+).
|
||||||
if (skipErrorProne) {
|
if (skipReason) {
|
||||||
tasks.withType(JavaCompile) { task -> task.dependsOn ":errorProneSkipped" }
|
tasks.withType(JavaCompile) { task -> task.dependsOn ":errorProneSkipped" }
|
||||||
configurations {
|
configurations {
|
||||||
errorprone
|
errorprone
|
||||||
|
|
Loading…
Reference in New Issue