diff --git a/build.gradle b/build.gradle index 7b3c4f4ae0..bef4ba8f87 100644 --- a/build.gradle +++ b/build.gradle @@ -202,19 +202,6 @@ subprojects { subProject -> } } - // alter the compileTestJava (src/test/java javac task) to add AP hooks - compileTestJava { - options.compilerArgs += [ - "-s", "$sourceSets.test.aptGeneratedSourceDir.absolutePath" - ] - - doFirst { - if ( !sourceSets.test.aptGeneratedSourceDir.exists() ) { - sourceSets.test.aptGeneratedSourceDir.mkdirs() - } - } - } - task generateSources(type: Task) jar { diff --git a/hibernate-entitymanager/hibernate-entitymanager.gradle b/hibernate-entitymanager/hibernate-entitymanager.gradle index 1bd8f56153..9114d494bc 100644 --- a/hibernate-entitymanager/hibernate-entitymanager.gradle +++ b/hibernate-entitymanager/hibernate-entitymanager.gradle @@ -69,8 +69,19 @@ jar { } +// alter the compileTestJava (src/test/java javac task) to add AP hooks compileTestJava { classpath += configurations.hibernateJpaModelGenTool + + options.compilerArgs += [ + "-s", "$sourceSets.test.aptGeneratedSourceDir.absolutePath" + ] + + doFirst { + if ( !sourceSets.test.aptGeneratedSourceDir.exists() ) { + sourceSets.test.aptGeneratedSourceDir.mkdirs() + } + } } diff --git a/tooling/metamodel-generator/hibernate-jpamodelgen.gradle b/tooling/metamodel-generator/hibernate-jpamodelgen.gradle index 59b09f8a77..08f0f0c772 100644 --- a/tooling/metamodel-generator/hibernate-jpamodelgen.gradle +++ b/tooling/metamodel-generator/hibernate-jpamodelgen.gradle @@ -30,6 +30,12 @@ sourceSets.main { resources.srcDir xsdDir } +compileTestJava { + options.compilerArgs += [ + "-proc:none" + ] +} + jar { manifest { attributes 'Implementation-Title' : '${project.name}',