hibernate-orm/settings.gradle

94 lines
3.3 KiB
Groovy

/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
plugins {
id 'com.gradle.enterprise' version '3.2.1'
}
if ( !JavaVersion.current().java8Compatible ) {
throw new GradleException( "Gradle must be run with Java 8 or later" )
}
// Consume the property 'testedJavaVersion' here and
// set it on gradle.ext so that we can inspect the result in build.gradle.
// We wouldn't be able to do that if we consumed
// the property in base-information.gradle and set it on project.ext.
if ( hasProperty( 'testedJavaVersion' ) ) {
logger.warn( "[WARN] Targeting Java version '$testedJavaVersion' in tests." )
gradle.ext.testedJavaVersion = testedJavaVersion
gradle.ext.testedJavaVersionAsEnum = JavaVersion.toVersion( testedJavaVersion )
}
else {
// We will simply use Gradle's JDK for compilation, tests and javadoc generation.
def major
if ( JavaVersion.current() == JavaVersion.VERSION_HIGHER) {
logger.warn( "Gradle does not support this JDK, because it is too recent; build is likely to fail." +
" To avoid failures, you should specify an older Java version in the 'testedJavaVersion' parameter." +
" Just append the following to your gradle command:" +
" '-PtestedJavaVersion=<major version of your newer JDK, e.g. 14>'" )
// Use a hack to retrieve the major as a string.
// This only works for Java 9+ (we're at least on Java 18 here).
gradle.ext.testedJavaVersion = System.getProperty( 'java.specification.version' )
}
else {
gradle.ext.testedJavaVersion = JavaVersion.current().getMajorVersion()
}
gradle.ext.testedJavaVersionAsEnum = JavaVersion.current()
}
include 'hibernate-core'
include 'hibernate-entitymanager'
include 'hibernate-testing'
include 'hibernate-envers'
include 'hibernate-spatial'
include 'hibernate-java8'
include 'hibernate-osgi'
include 'hibernate-c3p0'
include 'hibernate-proxool'
include 'hibernate-hikaricp'
include 'hibernate-vibur'
include 'hibernate-agroal'
include 'hibernate-jcache'
include 'hibernate-ehcache'
include 'hibernate-infinispan'
include 'hibernate-jipijapa'
include 'hibernate-graalvm'
if ( JavaVersion.current().isJava11Compatible() ) {
include 'hibernate-integrationtest-java-modules'
}
else {
logger.warn( '[WARN] Skipping Java module path integration tests because the JDK does not support it' )
}
include 'documentation'
include 'release'
include 'metamodel-generator'
project(':metamodel-generator').projectDir = new File(rootProject.projectDir, "tooling/metamodel-generator")
project(':metamodel-generator').name = 'hibernate-jpamodelgen'
include 'hibernate-gradle-plugin'
project(':hibernate-gradle-plugin').projectDir = new File(rootProject.projectDir, "tooling/hibernate-gradle-plugin")
include 'hibernate-enhance-maven-plugin'
project(':hibernate-enhance-maven-plugin').projectDir = new File(rootProject.projectDir, "tooling/hibernate-enhance-maven-plugin")
rootProject.children.each { project ->
project.buildFileName = "${project.name}.gradle"
assert project.projectDir.isDirectory()
assert project.buildFile.exists()
assert project.buildFile.isFile()
}