2015-05-19 00:23:35 -04: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 10:27:06 -04:00
|
|
|
|
2021-07-19 17:45:50 -04:00
|
|
|
pluginManagement {
|
|
|
|
repositories {
|
|
|
|
gradlePluginPortal()
|
|
|
|
maven {
|
|
|
|
name = 'localPluginRepository'
|
|
|
|
url = uri( "${gradle.gradleUserHomeDir}/tmp/plugins" )
|
|
|
|
}
|
|
|
|
}
|
2022-04-22 10:30:41 -04:00
|
|
|
|
|
|
|
includeBuild 'local-build-plugins'
|
2021-07-19 17:45:50 -04:00
|
|
|
}
|
|
|
|
|
2020-04-02 10:27:06 -04:00
|
|
|
plugins {
|
2022-04-22 19:40:06 -04:00
|
|
|
id 'org.hibernate.orm.build.env-settings'
|
2023-03-27 02:03:23 -04:00
|
|
|
id 'com.gradle.enterprise' version '3.12.6'
|
2023-03-20 02:00:43 -04:00
|
|
|
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.10'
|
2020-04-02 10:27:06 -04:00
|
|
|
}
|
|
|
|
|
2022-04-22 19:40:06 -04:00
|
|
|
// version catalog support
|
|
|
|
// - https://docs.gradle.org/7.3.3/userguide/platforms.html#sub:central-declaration-of-dependencies
|
|
|
|
enableFeaturePreview("VERSION_CATALOGS")
|
|
|
|
|
|
|
|
|
2022-03-15 10:39:07 -04:00
|
|
|
dependencyResolutionManagement {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-02-23 07:18:03 -05:00
|
|
|
// Needed for the RC versions of Jakarta Persistence
|
|
|
|
maven {
|
|
|
|
url "https://jakarta.oss.sonatype.org/content/repositories/releases/"
|
|
|
|
}
|
|
|
|
// Needed for the SNAPSHOT versions of Jakarta Persistence
|
|
|
|
maven {
|
|
|
|
url "https://jakarta.oss.sonatype.org/content/repositories/snapshots/"
|
|
|
|
}
|
2022-03-15 10:39:07 -04:00
|
|
|
|
|
|
|
//Allow loading additional dependencies from a local path;
|
|
|
|
//useful to load JDBC drivers which can not be distributed in public.
|
|
|
|
if (System.env['ADDITIONAL_REPO'] != null) {
|
|
|
|
flatDir {
|
|
|
|
dirs "${System.env.ADDITIONAL_REPO}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-22 19:40:06 -04:00
|
|
|
|
|
|
|
pluginManagement {
|
|
|
|
repositories {
|
|
|
|
gradlePluginPortal()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
versionCatalogs {
|
|
|
|
libs {
|
2022-09-09 05:42:27 -04:00
|
|
|
version( "antlr", "4.10.1" )
|
2023-01-27 04:23:01 -05:00
|
|
|
version( "hcann", "6.0.6.Final" )
|
2022-04-22 19:40:06 -04:00
|
|
|
version( "geolatte", "1.8.2" )
|
2022-10-27 09:16:04 -04:00
|
|
|
version( "byteBuddy", "1.12.18" )
|
2022-04-29 05:30:13 -04:00
|
|
|
version( "agroal", "2.0" )
|
2022-04-26 15:40:08 -04:00
|
|
|
version( "c3po", "0.9.5.5" )
|
|
|
|
version( "hikaricp", "3.2.0" )
|
|
|
|
version( "proxool", "0.8.3" )
|
|
|
|
version( "vibur", "25.0" )
|
2023-03-17 05:30:52 -04:00
|
|
|
version( "micrometer", "1.10.4" )
|
2022-04-22 19:40:06 -04:00
|
|
|
|
|
|
|
alias( "antlr" ).to( "org.antlr", "antlr4" ).versionRef( "antlr")
|
|
|
|
alias( "antlrRuntime" ).to( "org.antlr", "antlr4-runtime" ).versionRef( "antlr")
|
|
|
|
|
|
|
|
alias( "byteBuddy" ).to( "net.bytebuddy", "byte-buddy" ).versionRef( "byteBuddy" )
|
2022-04-26 15:40:08 -04:00
|
|
|
alias( "byteBuddyAgent" ).to( "net.bytebuddy", "byte-buddy-agent" ).versionRef( "byteBuddy" )
|
2022-04-22 19:40:06 -04:00
|
|
|
|
2023-01-19 07:13:28 -05:00
|
|
|
alias( "logging" ).to ( "org.jboss.logging", "jboss-logging" ).version( "3.5.0.Final" )
|
2022-04-22 19:40:06 -04:00
|
|
|
alias( "loggingAnnotations" ).to ( "org.jboss.logging", "jboss-logging-annotations" ).version( "2.2.1.Final" )
|
|
|
|
alias( "loggingProcessor" ).to ( "org.jboss.logging", "jboss-logging-processor" ).version( "2.2.1.Final" )
|
|
|
|
|
|
|
|
alias( "hcann" ).to( "org.hibernate.common", "hibernate-commons-annotations" ).versionRef( "hcann" )
|
2023-04-12 06:42:57 -04:00
|
|
|
alias( "jandex" ).to("io.smallrye", "jandex" ).version( "3.1.1" )
|
2022-04-22 19:40:06 -04:00
|
|
|
alias( "classmate" ).to( "com.fasterxml", "classmate" ).version( "1.5.1" )
|
|
|
|
|
2023-01-19 07:16:23 -05:00
|
|
|
alias( "jackson" ).to ( "com.fasterxml.jackson.core", "jackson-databind" ).version( "2.14.1" )
|
|
|
|
alias( "jacksonXml" ).to ( "com.fasterxml.jackson.dataformat", "jackson-dataformat-xml" ).version( "2.14.1" )
|
2023-03-10 08:37:23 -05:00
|
|
|
alias( "jacksonJsr310" ).to( "com.fasterxml.jackson.datatype", "jackson-datatype-jsr310" ).version( "2.14.1" )
|
2023-03-17 05:22:00 -04:00
|
|
|
alias( "validator" ).to( "org.hibernate.validator", "hibernate-validator" ).version( "8.0.0.Final" )
|
2022-04-22 19:40:06 -04:00
|
|
|
|
|
|
|
alias( "ant" ).to( "org.apache.ant", "ant" ).version( "1.8.2" )
|
|
|
|
|
|
|
|
alias( "geolatte" ).to( "org.geolatte", "geolatte-geom" ).versionRef( "geolatte" )
|
|
|
|
|
2022-04-26 15:40:08 -04:00
|
|
|
alias( "jcache" ).to( "javax.cache", "cache-api" ).version( "1.0.0" )
|
2023-03-17 05:30:01 -04:00
|
|
|
alias( "ehcache3" ).to( "org.ehcache:ehcache:3.10.8" )
|
2022-04-26 15:40:08 -04:00
|
|
|
|
|
|
|
alias( "agroal" ).to( "io.agroal", "agroal-api" ).versionRef( "agroal" )
|
|
|
|
alias( "agroalPool" ).to( "io.agroal", "agroal-pool" ).versionRef( "agroal" )
|
|
|
|
alias( "c3p0" ).to( "com.mchange", "c3p0" ).versionRef( "c3po" )
|
|
|
|
alias( "hikaricp" ).to( "com.zaxxer", "HikariCP" ).versionRef( "hikaricp" )
|
|
|
|
alias( "proxool" ).to( "proxool", "proxool" ).versionRef( "proxool" )
|
|
|
|
alias( "vibur" ).to( "org.vibur", "vibur-dbcp" ).versionRef( "vibur" )
|
|
|
|
|
|
|
|
alias( "micrometer" ).to ( "io.micrometer", "micrometer-core" ).versionRef( "micrometer" )
|
2022-04-22 19:40:06 -04:00
|
|
|
}
|
|
|
|
jakartaLibs {
|
2023-03-17 05:36:28 -04:00
|
|
|
version( "jaxbRuntime", "4.0.2" )
|
2023-01-20 11:58:49 -05:00
|
|
|
version( "jsonbRuntime", "3.0.2" )
|
2022-04-22 19:40:06 -04:00
|
|
|
|
2022-05-09 20:33:30 -04:00
|
|
|
// `jakartaJpaVersion` comes from the local-build-plugins to allow for command-line overriding of the JPA version to use
|
2022-04-22 19:40:06 -04:00
|
|
|
alias( "jpa" ).to( "jakarta.persistence", "jakarta.persistence-api" ).version( "${jakartaJpaVersion}" )
|
2023-01-19 06:55:26 -05:00
|
|
|
alias( "jta" ).to( "jakarta.transaction", "jakarta.transaction-api" ).version( "2.0.1")
|
2023-03-17 05:36:28 -04:00
|
|
|
alias( "validation" ).to( "jakarta.validation", "jakarta.validation-api" ).version( "3.0.2" )
|
2023-01-20 11:58:49 -05:00
|
|
|
alias( "jacc" ).to( "jakarta.authorization", "jakarta.authorization-api" ).version( "2.1.0" )
|
2023-03-17 05:36:28 -04:00
|
|
|
alias( "cdi" ).to( "jakarta.enterprise", "jakarta.enterprise.cdi-api" ).version( "4.0.1" )
|
2023-01-19 06:55:26 -05:00
|
|
|
alias( "interceptors" ).to( "jakarta.interceptor", "jakarta.interceptor-api" ).version( "2.1.0" )
|
2023-01-20 11:58:49 -05:00
|
|
|
alias( "jsonbApi" ).to( "jakarta.json.bind", "jakarta.json.bind-api" ).version( "3.0.0" )
|
2022-05-03 09:22:56 -04:00
|
|
|
alias( "jsonb" ).to( "org.eclipse", "yasson" ).versionRef( "jsonbRuntime" )
|
2023-03-17 05:36:28 -04:00
|
|
|
alias( "inject" ).to( "jakarta.inject", "jakarta.inject-api" ).version( "2.0.1" )
|
2023-01-20 11:58:49 -05:00
|
|
|
alias( "jaxbApi" ).to( "jakarta.xml.bind", "jakarta.xml.bind-api" ).version( "4.0.0" )
|
2022-04-22 19:40:06 -04:00
|
|
|
alias( "jaxb" ).to( "org.glassfish.jaxb", "jaxb-runtime" ).versionRef( "jaxbRuntime" )
|
|
|
|
alias( "xjc" ).to( "org.glassfish.jaxb", "jaxb-xjc" ).versionRef( "jaxbRuntime" )
|
2023-03-17 05:36:28 -04:00
|
|
|
alias( "el" ).to( "org.glassfish.expressly", "expressly" ).version( "5.0.0" )
|
2022-04-22 19:40:06 -04:00
|
|
|
}
|
|
|
|
testLibs {
|
|
|
|
version( "junit4", "4.13.2" )
|
2023-03-17 05:25:08 -04:00
|
|
|
version( "junit5", "5.9.2" )
|
2023-03-30 11:33:44 -04:00
|
|
|
version( "assertj", "3.22.0" )
|
2023-03-17 05:52:40 -04:00
|
|
|
version( "mockito", "5.2.0" )
|
2022-10-26 18:37:46 -04:00
|
|
|
version( "byteman", "4.0.20" ) //Compatible with JDK20
|
2022-04-22 19:40:06 -04:00
|
|
|
version( "shrinkwrap", "1.2.6" )
|
|
|
|
version( "shrinkwrapDescriptors", "2.0.0" )
|
|
|
|
|
|
|
|
alias( "junit5Api" ).to( "org.junit.jupiter", "junit-jupiter-api" ).versionRef( "junit5" )
|
|
|
|
alias( "junit5Engine" ).to( "org.junit.jupiter", "junit-jupiter-engine" ).versionRef( "junit5" )
|
|
|
|
alias( "junit5Params" ).to( "org.junit.jupiter", "junit-jupiter-params" ).versionRef( "junit5" )
|
|
|
|
alias( "junit4Engine" ).to( "org.junit.vintage", "junit-vintage-engine" ).versionRef( "junit5" )
|
|
|
|
alias( "junit4" ).to( "junit", "junit" ).versionRef( "junit4" )
|
|
|
|
|
|
|
|
alias( "assertjCore" ).to( "org.assertj", "assertj-core" ).versionRef( "assertj" )
|
|
|
|
alias( "assertjApi" ).to( "org.assertj", "assertj-core-api" ).versionRef( "assertj" )
|
|
|
|
|
|
|
|
alias( "mockito" ).to( "org.mockito", "mockito-core" ).versionRef( "mockito" )
|
|
|
|
alias( "mockitoInline" ).to( "org.mockito", "mockito-inline" ).versionRef( "mockito" )
|
|
|
|
|
|
|
|
alias( "log4j2" ).to( "org.apache.logging.log4j", "log4j-core" ).version( "2.17.1" )
|
|
|
|
|
|
|
|
alias( "byteman" ).to ( "org.jboss.byteman", "byteman" ).versionRef("byteman" )
|
|
|
|
alias( "bytemanInstall" ).to ( "org.jboss.byteman", "byteman-install" ).versionRef("byteman" )
|
|
|
|
alias( "bytemanBmunit" ).to ( "org.jboss.byteman", "byteman-bmunit" ).versionRef("byteman" )
|
|
|
|
|
|
|
|
alias( "xapool" ).to( "com.experlog", "xapool" ).version( "1.5.0" )
|
|
|
|
|
|
|
|
alias( "shrinkwrap" ).to( "org.jboss.shrinkwrap", "shrinkwrap-impl-base" ).versionRef( "shrinkwrap" )
|
|
|
|
alias( "shrinkwrapApi" ).to( "org.jboss.shrinkwrap", "shrinkwrap-api" ).versionRef( "shrinkwrap" )
|
|
|
|
alias( "shrinkwrapDescriptors" ).to( "org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-impl-javaee" ).versionRef( "shrinkwrapDescriptors" )
|
|
|
|
alias( "shrinkwrapDescriptorsApi" ).to( "org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-api-javaee" ).versionRef( "shrinkwrapDescriptors" )
|
|
|
|
|
2023-02-19 11:47:12 -05:00
|
|
|
alias( "jbossJta" ).to( "org.jboss.narayana.jta", "narayana-jta" ).version( "6.0.0.Final" )
|
|
|
|
alias( "jbossTxSpi" ).to( "org.jboss", "jboss-transaction-spi" ).version( "8.0.0.Final" )
|
2022-04-22 19:40:06 -04:00
|
|
|
alias( "wildFlyTxnClient" ).to( "org.wildfly.transaction", "wildfly-transaction-client-jakarta" ).version( "2.0.0.Final" )
|
|
|
|
alias( "weld" ).to( "org.jboss.weld.se", "weld-se-shaded" ).version( "4.0.1.SP1" )
|
|
|
|
}
|
|
|
|
dbLibs {
|
2022-11-03 10:15:01 -04:00
|
|
|
String h2Version = settings.ext.find( "gradle.libs.versions.h2" )
|
|
|
|
if ( h2Version == null ) {
|
|
|
|
h2Version = "2.1.214"
|
|
|
|
}
|
|
|
|
String h2gisVersion = settings.ext.find( "gradle.libs.versions.h2gis" )
|
|
|
|
if ( h2gisVersion == null ) {
|
|
|
|
h2gisVersion = "2.1.0"
|
|
|
|
}
|
|
|
|
String hsqldbVersion = settings.ext.find( "gradle.libs.versions.hsqldb" )
|
|
|
|
if ( hsqldbVersion == null ) {
|
|
|
|
hsqldbVersion = "2.7.1"
|
|
|
|
}
|
|
|
|
String derbyVersion = settings.ext.find( "gradle.libs.versions.derby" )
|
|
|
|
if ( derbyVersion == null ) {
|
|
|
|
// Latest Derby version 10.16.1.1 only supports JDK 17+, but 10.15.2 should be compatible
|
|
|
|
derbyVersion = "10.15.2.0"
|
|
|
|
}
|
|
|
|
version( "h2", h2Version )
|
|
|
|
version( "h2gis", h2gisVersion )
|
|
|
|
version( "hsqldb", hsqldbVersion )
|
|
|
|
version( "derby", derbyVersion )
|
2022-08-25 02:32:06 -04:00
|
|
|
version( "pgsql", "42.5.0" )
|
2022-04-22 19:40:06 -04:00
|
|
|
version( "mysql", "8.0.27" )
|
2023-01-02 10:28:22 -05:00
|
|
|
version( "oracle", "21.8.0.0" )
|
2022-04-22 19:40:06 -04:00
|
|
|
|
|
|
|
alias( "h2" ).to( "com.h2database", "h2" ).versionRef( "h2" )
|
2022-11-03 10:15:01 -04:00
|
|
|
alias( "h2gis" ).to( "org.orbisgis", "h2gis" ).versionRef( "h2gis" )
|
|
|
|
alias( "hsqldb" ).to( "org.hsqldb", "hsqldb" ).versionRef( "hsqldb" )
|
|
|
|
alias( "derby" ).to( "org.apache.derby", "derby" ).versionRef( "derby" )
|
2022-04-22 19:40:06 -04:00
|
|
|
alias( "postgresql" ).to( "org.postgresql", "postgresql" ).versionRef( "pgsql" )
|
|
|
|
alias( "cockroachdb" ).to( "org.postgresql", "postgresql" ).version( "42.2.8" )
|
|
|
|
alias( "mysql" ).to( "mysql", "mysql-connector-java" ).versionRef( "mysql" )
|
|
|
|
alias( "tidb" ).to( "mysql", "mysql-connector-java" ).versionRef( "mysql" )
|
2022-12-15 16:34:55 -05:00
|
|
|
alias( "mariadb" ).to( "org.mariadb.jdbc", "mariadb-java-client" ).version( "2.7.7" )
|
2022-05-03 09:22:56 -04:00
|
|
|
alias( "oracle" ).to( "com.oracle.database.jdbc", "ojdbc8" ).versionRef( "oracle" )
|
|
|
|
alias( "oracleXml" ).to( "com.oracle.database.xml", "xdb" ).versionRef( "oracle" )
|
|
|
|
alias( "oracleXmlParser" ).to( "com.oracle.database.xml", "xmlparserv2" ).versionRef( "oracle" )
|
2022-08-15 05:11:49 -04:00
|
|
|
alias( "mssql" ).to( "com.microsoft.sqlserver", "mssql-jdbc" ).version( "11.2.0.jre11" )
|
2022-04-22 19:40:06 -04:00
|
|
|
alias( "db2" ).to( "com.ibm.db2", "jcc" ).version( "11.5.7.0" )
|
|
|
|
alias( "hana" ).to( "com.sap.cloud.db.jdbc", "ngdbc" ).version( "2.4.59" )
|
|
|
|
alias( "sybase" ).to( "net.sourceforge.jtds", "jtds" ).version( "1.3.1" )
|
|
|
|
alias( "informix" ).to( "com.ibm.informix", "jdbc" ).version( "4.10.12" )
|
2022-12-05 06:29:48 -05:00
|
|
|
alias( "firebird" ).to( "org.firebirdsql.jdbc", "jaybird" ).version( "4.0.8.java11" )
|
2022-04-22 19:40:06 -04:00
|
|
|
}
|
|
|
|
mavenLibs {
|
|
|
|
alias( "mavenCore" ).to( "org.apache.maven", "maven-core" ).version( "3.8.1" )
|
|
|
|
alias( "mavenArtifact" ).to( "org.apache.maven", "maven-artifact" ).version( "3.0.5" )
|
|
|
|
alias( "mavenPlugin" ).to( "org.apache.maven", "maven-plugin-api" ).version( "3.0.5" )
|
|
|
|
alias( "mavenPluginTools" ).to( "org.apache.maven.plugin-tools", "maven-plugin-annotations" ).version( "3.2" )
|
|
|
|
}
|
|
|
|
}
|
2022-03-15 10:39:07 -04:00
|
|
|
}
|
2021-05-25 17:11:31 -04:00
|
|
|
|
2022-03-15 10:39:07 -04:00
|
|
|
rootProject.name = 'hibernate-orm'
|
2021-06-26 09:46:09 -04:00
|
|
|
|
2021-05-24 13:25:53 -04:00
|
|
|
apply from: file( 'gradle/gradle-enterprise.gradle' )
|
|
|
|
|
2021-11-26 11:24:34 -05:00
|
|
|
if ( !JavaVersion.current().java11Compatible ) {
|
|
|
|
throw new GradleException( "Gradle must be run with Java 11 or later" )
|
2019-10-23 02:45:47 -04:00
|
|
|
}
|
|
|
|
|
2021-07-26 14:51:22 -04:00
|
|
|
buildCache {
|
2021-11-30 08:17:47 -05:00
|
|
|
local {
|
|
|
|
// do not use local build cache for CI jobs, period!
|
2022-02-01 10:40:31 -05:00
|
|
|
enabled = !settings.ext.isCiEnvironment
|
2021-11-30 08:17:47 -05:00
|
|
|
}
|
|
|
|
remote(HttpBuildCache) {
|
|
|
|
enabled = true
|
2022-02-01 10:40:31 -05:00
|
|
|
push = settings.ext.populateRemoteBuildCache
|
2021-11-30 08:17:47 -05:00
|
|
|
url = 'https://ge.hibernate.org/cache/'
|
|
|
|
}
|
2021-07-26 14:51:22 -04:00
|
|
|
}
|
|
|
|
|
2021-11-26 11:24:34 -05:00
|
|
|
gradle.ext.baselineJavaVersion = JavaLanguageVersion.of( 11 )
|
2019-10-23 02:45:47 -04:00
|
|
|
|
2020-11-09 04:13:34 -05:00
|
|
|
// Gradle does bytecode transformation on tests.
|
|
|
|
// You can't use bytecode higher than what Gradle supports, even with toolchains.
|
2022-03-04 02:56:04 -05:00
|
|
|
def GRADLE_MAX_SUPPORTED_BYTECODE_VERSION = 17
|
2020-11-09 04:13:34 -05:00
|
|
|
|
|
|
|
// If either 'main.jdk.version' or 'test.jdk.version' is set, enable the toolchain and use the selected jdk.
|
2022-08-17 09:43:44 -04:00
|
|
|
// If only one property is set, the other defaults to the baseline Java version (11).
|
2020-11-09 04:13:34 -05:00
|
|
|
// Note that when toolchain is enabled, you also need to specify
|
|
|
|
// the location of the selected jdks
|
|
|
|
// (auto-download and auto-detect are disabled in gradle.properties).
|
|
|
|
//
|
|
|
|
// Example (with SDKMAN):
|
|
|
|
// ./gradlew build -Ptest.jdk.version=15 \
|
|
|
|
// -Porg.gradle.java.installations.paths=$SDKMAN_CANDIDATES_DIR/java/15.0.1-open,$SDKMAN_CANDIDATES_DIR/java/8
|
|
|
|
if ( hasProperty( 'main.jdk.version' ) || hasProperty( 'test.jdk.version' ) ) {
|
|
|
|
// Testing a particular JDK version
|
|
|
|
// Gradle doesn't support all JDK versions unless we use toolchains
|
|
|
|
gradle.ext.javaToolchainEnabled = true
|
|
|
|
gradle.ext.javaVersions = [
|
|
|
|
main: [
|
|
|
|
compiler: JavaLanguageVersion.of( hasProperty( 'main.jdk.version' )
|
|
|
|
? getProperty( 'main.jdk.version' ) : gradle.ext.baselineJavaVersion.asInt() ),
|
|
|
|
release: gradle.ext.baselineJavaVersion
|
|
|
|
],
|
|
|
|
test: [
|
|
|
|
compiler: JavaLanguageVersion.of( hasProperty( 'test.jdk.version' )
|
|
|
|
? getProperty( 'test.jdk.version' ) : gradle.ext.baselineJavaVersion.asInt() )
|
|
|
|
]
|
|
|
|
]
|
|
|
|
def testCompilerVersion = gradle.ext.javaVersions.test.compiler
|
|
|
|
if ( testCompilerVersion.asInt() > GRADLE_MAX_SUPPORTED_BYTECODE_VERSION ) {
|
|
|
|
logger.warn( "[WARN] Gradle does not support bytecode version '${testCompilerVersion}'." +
|
|
|
|
" Forcing test bytecode to version ${GRADLE_MAX_SUPPORTED_BYTECODE_VERSION}." )
|
|
|
|
gradle.ext.javaVersions.test.release = JavaLanguageVersion.of( GRADLE_MAX_SUPPORTED_BYTECODE_VERSION )
|
2019-10-23 02:45:47 -04:00
|
|
|
}
|
|
|
|
else {
|
2020-11-09 04:13:34 -05:00
|
|
|
gradle.ext.javaVersions.test.release = testCompilerVersion
|
|
|
|
}
|
|
|
|
gradle.ext.javaVersions.test.launcher = testCompilerVersion
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// Not testing a particular JDK version: we will use the same JDK used to run Gradle.
|
|
|
|
// We disable toolchains for convenience, so that anyone can just run the build with their own JDK
|
|
|
|
// without any additional options and without downloading the whole JDK.
|
|
|
|
gradle.ext.javaToolchainEnabled = false
|
|
|
|
def gradleJdkVersion = JavaLanguageVersion.of( JavaVersion.current().getMajorVersion() )
|
|
|
|
if ( gradleJdkVersion.asInt() > GRADLE_MAX_SUPPORTED_BYTECODE_VERSION ) {
|
|
|
|
logger.warn( "[WARN] Gradle does not support this JDK, because it is too recent; build is likely to fail." +
|
|
|
|
" To avoid failures, you should use an older Java version when running Gradle, and rely on toolchains." +
|
|
|
|
" To that end, specify the version of Java you want to run tests with using property 'test.jdk.version'," +
|
|
|
|
" and specify the path to JDK8 *and* a JDK of the test version using property 'org.gradle.java.installations.paths'." +
|
|
|
|
" Example:" +
|
|
|
|
"./gradlew build -Ptest.jdk.version=15 -Porg.gradle.java.installations.paths=\$SDKMAN_CANDIDATES_DIR/java/15.0.1-open,\$SDKMAN_CANDIDATES_DIR/java/8" )
|
2019-10-23 02:45:47 -04:00
|
|
|
}
|
|
|
|
|
2020-11-09 04:13:34 -05:00
|
|
|
gradle.ext.javaVersions = [
|
|
|
|
main: [
|
|
|
|
compiler: gradleJdkVersion,
|
|
|
|
release: gradle.ext.baselineJavaVersion
|
|
|
|
],
|
|
|
|
test: [
|
|
|
|
compiler: gradleJdkVersion,
|
|
|
|
release: JavaLanguageVersion.of(
|
|
|
|
Math.min( GRADLE_MAX_SUPPORTED_BYTECODE_VERSION, gradleJdkVersion.asInt() ) ),
|
|
|
|
launcher: gradleJdkVersion
|
|
|
|
]
|
|
|
|
]
|
2015-03-31 14:01:57 -04:00
|
|
|
}
|
|
|
|
|
2020-11-09 04:13:34 -05:00
|
|
|
logger.lifecycle "Java versions for main code: " + gradle.ext.javaVersions.main
|
|
|
|
logger.lifecycle "Java versions for tests: " + gradle.ext.javaVersions.test
|
|
|
|
|
2010-10-08 21:20:10 -04:00
|
|
|
include 'hibernate-core'
|
2013-11-26 18:48:25 -05:00
|
|
|
include 'hibernate-testing'
|
2021-04-22 12:15:45 -04:00
|
|
|
|
2010-10-09 14:24:27 -04:00
|
|
|
include 'hibernate-envers'
|
2021-09-22 18:52:06 -04:00
|
|
|
include 'hibernate-spatial'
|
2016-06-23 03:34:34 -04:00
|
|
|
|
2022-04-22 19:40:06 -04:00
|
|
|
include 'hibernate-platform'
|
|
|
|
|
2021-04-13 12:13:30 -04:00
|
|
|
include 'hibernate-community-dialects'
|
2010-10-08 21:20:10 -04:00
|
|
|
|
2010-10-09 14:27:47 -04:00
|
|
|
include 'hibernate-c3p0'
|
2010-10-09 14:31:54 -04:00
|
|
|
include 'hibernate-proxool'
|
2014-03-17 16:33:44 -04:00
|
|
|
include 'hibernate-hikaricp'
|
2018-01-13 07:48:46 -05:00
|
|
|
include 'hibernate-vibur'
|
2017-09-05 19:49:17 -04:00
|
|
|
include 'hibernate-agroal'
|
2010-10-09 14:27:47 -04:00
|
|
|
|
2021-11-16 11:15:58 -05:00
|
|
|
include 'hibernate-jcache'
|
2021-05-13 14:11:38 -04:00
|
|
|
|
2020-11-17 17:39:43 -05:00
|
|
|
include 'hibernate-micrometer'
|
2020-02-13 06:41:04 -05:00
|
|
|
include 'hibernate-graalvm'
|
2021-11-26 11:24:34 -05:00
|
|
|
include 'hibernate-integrationtest-java-modules'
|
2019-05-24 03:26:01 -04:00
|
|
|
|
2013-11-13 19:23:48 -05:00
|
|
|
include 'documentation'
|
|
|
|
include 'release'
|
|
|
|
|
2013-10-25 15:27:45 -04:00
|
|
|
include 'metamodel-generator'
|
|
|
|
project(':metamodel-generator').projectDir = new File(rootProject.projectDir, "tooling/metamodel-generator")
|
2015-03-23 15:36:41 -04:00
|
|
|
project(':metamodel-generator').name = 'hibernate-jpamodelgen'
|
2013-10-25 15:27:45 -04:00
|
|
|
|
2022-03-15 21:10:17 -04:00
|
|
|
include 'hibernate-gradle-plugin'
|
|
|
|
project(':hibernate-gradle-plugin').projectDir = new File(rootProject.projectDir, "tooling/hibernate-gradle-plugin")
|
2020-10-15 18:20:30 -04:00
|
|
|
|
2015-03-25 21:41:23 -04:00
|
|
|
include 'hibernate-enhance-maven-plugin'
|
|
|
|
project(':hibernate-enhance-maven-plugin').projectDir = new File(rootProject.projectDir, "tooling/hibernate-enhance-maven-plugin")
|
2010-10-12 16:39:33 -04:00
|
|
|
|
2021-09-27 15:07:01 -04:00
|
|
|
include 'hibernate-ant'
|
|
|
|
project(':hibernate-ant').projectDir = new File(rootProject.projectDir, "tooling/hibernate-ant")
|
|
|
|
|
2021-06-22 10:53:21 -04:00
|
|
|
|
2010-10-08 21:20:10 -04:00
|
|
|
rootProject.children.each { project ->
|
|
|
|
project.buildFileName = "${project.name}.gradle"
|
|
|
|
assert project.projectDir.isDirectory()
|
2013-11-13 19:23:48 -05:00
|
|
|
assert project.buildFile.exists()
|
2010-10-08 21:20:10 -04:00
|
|
|
assert project.buildFile.isFile()
|
2021-05-24 12:49:11 -04:00
|
|
|
}
|
2022-04-22 19:40:06 -04:00
|
|
|
include 'hibernate-platform'
|
2021-09-27 15:07:01 -04:00
|
|
|
|