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>.
|
|
|
|
*/
|
2018-01-10 15:06:58 -06:00
|
|
|
apply plugin: 'groovy'
|
2020-04-06 18:21:11 +01:00
|
|
|
|
|
|
|
description = "Gradle plugin for integrating Hibernate functionality into your build"
|
|
|
|
|
2018-01-10 16:37:49 -06:00
|
|
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
2015-05-21 00:24:56 -05:00
|
|
|
apply plugin: 'java-gradle-plugin'
|
2013-06-26 08:45:14 +01:00
|
|
|
apply plugin: 'maven'
|
|
|
|
|
2018-01-10 15:06:58 -06:00
|
|
|
|
2013-06-26 08:45:14 +01:00
|
|
|
dependencies {
|
2015-05-21 00:24:56 -05:00
|
|
|
compile( project( ':hibernate-core' ) )
|
|
|
|
compile( libraries.jpa )
|
|
|
|
compile( libraries.javassist )
|
2016-10-04 22:43:27 +02:00
|
|
|
compile( libraries.byteBuddy )
|
2015-05-21 00:24:56 -05:00
|
|
|
compile gradleApi()
|
|
|
|
compile localGroovy()
|
2013-12-02 20:53:19 -06:00
|
|
|
}
|
2020-07-17 13:04:56 +02:00
|
|
|
|
|
|
|
tasks.withType( GroovyCompile ) {
|
|
|
|
options.encoding = 'UTF-8'
|
2020-11-09 10:13:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( !gradle.ext.javaToolchainEnabled ) {
|
|
|
|
tasks.withType( GroovyCompile ) {
|
|
|
|
sourceCompatibility = JavaVersion.toVersion( gradle.ext.baselineJavaVersion )
|
|
|
|
targetCompatibility = JavaVersion.toVersion( gradle.ext.baselineJavaVersion )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
logger.warn( "[WARN] Toolchains are not yet supported for Groovy compilation." +
|
|
|
|
" Using the JDK that runs Gradle for Groovy compilation." )
|
2020-07-17 13:04:56 +02:00
|
|
|
}
|
2020-12-14 14:11:00 +01:00
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
|
|
|
|
// Needs add-opens because Gradle uses illegal accesses to inject... mocks? Something like that.
|
|
|
|
jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
|
|
|
|
}
|
|
|
|
}
|