From 6e85dd82f326a9a4bc9fd97c611d91cba25c50b2 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Sun, 15 Jul 2018 15:03:40 +0200 Subject: [PATCH] HHH-12807 Force to execute the release task with JDK 8 Considering hibernate-orm-modules tests are disabled with JDK 11, it's safer to prevent us from running a release with it. And all in all, we'd better release with JDK 8. --- build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.gradle b/build.gradle index 52bc74a3e0..beb805c4d6 100644 --- a/build.gradle +++ b/build.gradle @@ -57,6 +57,14 @@ task release { description = "The task performed when we are performing a release build. Relies on " + "the fact that subprojects will appropriately define a release task " + "themselves if they have any release-related activities to perform" + + // Force to release with JDK 8. Releasing with JDK 11 is not supported yet: + // - the hibernate-orm-modules tests do not run due to an issue with the ASM version currently used by Gradle + doFirst { + if ( !JavaVersion.current().isJava8() ) { + throw new IllegalStateException( "Please use JDK 8 to perform the release." ) + } + } } task publish {