/* * 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 . */ apply plugin: 'groovy' description = "Gradle plugin for integrating Hibernate functionality into your build" apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'java-gradle-plugin' apply plugin: 'maven' dependencies { compile( project( ':hibernate-core' ) ) compile( libraries.jpa ) compile( libraries.byteBuddy ) compile gradleApi() compile localGroovy() } tasks.withType( GroovyCompile ) { options.encoding = 'UTF-8' } 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." ) } 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'] ) } }