2015-05-18 23:23:35 -05:00
|
|
|
/*
|
|
|
|
* 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>.
|
|
|
|
*/
|
2020-04-02 16:27:06 +02:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
id 'com.gradle.enterprise' version '3.2.1'
|
|
|
|
}
|
|
|
|
|
2015-03-31 13:01:57 -05:00
|
|
|
if ( !JavaVersion.current().java8Compatible ) {
|
2019-10-23 08:45:47 +02:00
|
|
|
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()
|
2015-03-31 13:01:57 -05:00
|
|
|
}
|
|
|
|
|
2010-10-08 20:20:10 -05:00
|
|
|
include 'hibernate-core'
|
2016-06-17 13:35:03 -05:00
|
|
|
include 'hibernate-entitymanager'
|
2013-11-26 17:48:25 -06:00
|
|
|
include 'hibernate-testing'
|
2010-10-09 13:24:27 -05:00
|
|
|
include 'hibernate-envers'
|
2011-07-23 15:39:27 +02:00
|
|
|
include 'hibernate-spatial'
|
2010-10-08 20:20:10 -05:00
|
|
|
|
2016-06-23 09:34:34 +02:00
|
|
|
include 'hibernate-java8'
|
|
|
|
|
2015-03-23 15:27:02 -05:00
|
|
|
include 'hibernate-osgi'
|
2013-01-23 18:22:03 -05:00
|
|
|
|
2010-10-09 13:27:47 -05:00
|
|
|
include 'hibernate-c3p0'
|
2010-10-09 13:31:54 -05:00
|
|
|
include 'hibernate-proxool'
|
2014-03-17 16:33:44 -04:00
|
|
|
include 'hibernate-hikaricp'
|
2018-01-13 23:48:46 +11:00
|
|
|
include 'hibernate-vibur'
|
2017-09-06 00:49:17 +01:00
|
|
|
include 'hibernate-agroal'
|
2010-10-09 13:27:47 -05:00
|
|
|
|
2014-03-19 21:43:42 -04:00
|
|
|
include 'hibernate-jcache'
|
2010-10-09 13:44:08 -05:00
|
|
|
include 'hibernate-ehcache'
|
2010-10-09 13:55:13 -05:00
|
|
|
include 'hibernate-infinispan'
|
2018-03-06 16:41:42 -05:00
|
|
|
include 'hibernate-jipijapa'
|
2013-10-25 21:27:45 +02:00
|
|
|
|
2020-02-13 11:41:04 +00:00
|
|
|
include 'hibernate-graalvm'
|
2016-06-27 14:07:08 +02:00
|
|
|
|
2019-05-24 09:26:01 +02:00
|
|
|
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' )
|
|
|
|
}
|
|
|
|
|
2013-11-13 18:23:48 -06:00
|
|
|
include 'documentation'
|
|
|
|
include 'release'
|
|
|
|
|
2013-10-25 21:27:45 +02:00
|
|
|
include 'metamodel-generator'
|
|
|
|
project(':metamodel-generator').projectDir = new File(rootProject.projectDir, "tooling/metamodel-generator")
|
2015-03-23 14:36:41 -05:00
|
|
|
project(':metamodel-generator').name = 'hibernate-jpamodelgen'
|
2013-10-25 21:27:45 +02:00
|
|
|
|
2013-07-19 15:53:20 +01:00
|
|
|
include 'hibernate-gradle-plugin'
|
2013-11-13 18:23:48 -06:00
|
|
|
project(':hibernate-gradle-plugin').projectDir = new File(rootProject.projectDir, "tooling/hibernate-gradle-plugin")
|
2013-10-25 21:27:45 +02:00
|
|
|
|
2015-03-26 01:41:23 +00:00
|
|
|
include 'hibernate-enhance-maven-plugin'
|
|
|
|
project(':hibernate-enhance-maven-plugin').projectDir = new File(rootProject.projectDir, "tooling/hibernate-enhance-maven-plugin")
|
2010-10-12 15:39:33 -05:00
|
|
|
|
2010-10-08 20:20:10 -05:00
|
|
|
rootProject.children.each { project ->
|
|
|
|
project.buildFileName = "${project.name}.gradle"
|
|
|
|
assert project.projectDir.isDirectory()
|
2013-11-13 18:23:48 -06:00
|
|
|
assert project.buildFile.exists()
|
2010-10-08 20:20:10 -05:00
|
|
|
assert project.buildFile.isFile()
|
2011-03-22 23:39:53 +08:00
|
|
|
}
|