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>.
|
|
|
|
*/
|
2018-01-10 16:06:58 -05:00
|
|
|
apply plugin: 'groovy'
|
2020-04-06 13:21:11 -04:00
|
|
|
|
|
|
|
description = "Gradle plugin for integrating Hibernate functionality into your build"
|
|
|
|
|
2018-01-10 17:37:49 -05:00
|
|
|
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
2015-05-21 01:24:56 -04:00
|
|
|
apply plugin: 'java-gradle-plugin'
|
2013-06-26 03:45:14 -04:00
|
|
|
apply plugin: 'maven'
|
|
|
|
|
2018-01-10 16:06:58 -05:00
|
|
|
|
2013-06-26 03:45:14 -04:00
|
|
|
dependencies {
|
2015-05-21 01:24:56 -04:00
|
|
|
compile( project( ':hibernate-core' ) )
|
|
|
|
compile( libraries.jpa )
|
2016-10-04 16:43:27 -04:00
|
|
|
compile( libraries.byteBuddy )
|
2015-05-21 01:24:56 -04:00
|
|
|
compile gradleApi()
|
|
|
|
compile localGroovy()
|
2013-12-02 21:53:19 -05:00
|
|
|
}
|
2020-07-17 07:04:56 -04:00
|
|
|
|
|
|
|
tasks.withType( GroovyCompile ) {
|
|
|
|
options.encoding = 'UTF-8'
|
2020-11-09 04:13:34 -05: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 07:04:56 -04:00
|
|
|
}
|
2020-12-14 08:11:00 -05: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'] )
|
|
|
|
}
|
|
|
|
}
|