From 49ff975f7d5cd9666a1e6d6386381b038cf51d2b Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Mon, 2 Dec 2013 22:11:00 -0600 Subject: [PATCH] HHH-8733 - General build cleanup --- build.gradle | 17 +---------------- .../hibernate-entitymanager.gradle | 12 +++++------- hibernate-envers/hibernate-envers.gradle | 5 +---- hibernate-osgi/hibernate-osgi.gradle | 4 ---- hibernate-testing/hibernate-testing.gradle | 4 ---- source-generation.gradle | 6 +++--- .../hibernate-gradle-plugin.gradle | 4 ---- .../hibernate-maven-plugin.gradle | 4 ---- .../hibernate-jpamodelgen.gradle | 4 ---- 9 files changed, 10 insertions(+), 50 deletions(-) diff --git a/build.gradle b/build.gradle index e99ea12d73..777f41157f 100644 --- a/build.gradle +++ b/build.gradle @@ -82,14 +82,6 @@ def osgiDescription() { return pomDescription() } -def boolean needsLoggingGeneration() { - // by default - return true; -} - -def SourceSet getMetaGenTargetSourceSet() { - return null; -} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -196,14 +188,7 @@ subprojects { subProject -> ] } - if ( subProject.needsLoggingGeneration() ) { - addLoggingProcessor( sourceSets.main ) - } - - final SourceSet metaGenSourceSet = subProject.getMetaGenTargetSourceSet(); - if ( metaGenSourceSet != null ) { - addMetaGenProcessor( metaGenSourceSet ) - } + addLoggingProcessor( sourceSets.main ) jar { manifest = osgiManifest { diff --git a/hibernate-entitymanager/hibernate-entitymanager.gradle b/hibernate-entitymanager/hibernate-entitymanager.gradle index ba14526234..989291e4db 100644 --- a/hibernate-entitymanager/hibernate-entitymanager.gradle +++ b/hibernate-entitymanager/hibernate-entitymanager.gradle @@ -35,22 +35,18 @@ dependencies { hibernateJpaModelGenTool( project( ':hibernate-jpamodelgen' ) ) } -def pomName() { +public String pomName() { return 'Hibernate JPA Support' } -def pomDescription() { +public String pomDescription() { return 'Hibernate O/RM implementation of the JPA specification' } -def osgiDescription() { +public String osgiDescription() { return pomDescription() } -def getMetaGenTargetSourceSet() { - return sourceSets.test; -} - jar { manifest { // A cdi-api OSGi bundle does not currently exist. For now, explicitly @@ -74,6 +70,8 @@ jar { } } +addMetaGenProcessor( sourceSets.test ) + //////////////////////////////////////////////////////////////////////////////////////////////////////// // Process 'bundle resources' for the packaging tests diff --git a/hibernate-envers/hibernate-envers.gradle b/hibernate-envers/hibernate-envers.gradle index a91f31f993..f3bb770390 100644 --- a/hibernate-envers/hibernate-envers.gradle +++ b/hibernate-envers/hibernate-envers.gradle @@ -33,10 +33,6 @@ def osgiDescription() { return pomDescription() } -def getMetaGenTargetSourceSet() { - return sourceSets.main; -} - sourceSets { test { ext { @@ -52,6 +48,7 @@ sourceSets { } } +addMetaGenProcessor( sourceSets.main ) jar { manifest { diff --git a/hibernate-osgi/hibernate-osgi.gradle b/hibernate-osgi/hibernate-osgi.gradle index ad989a0738..d2fe8e7968 100644 --- a/hibernate-osgi/hibernate-osgi.gradle +++ b/hibernate-osgi/hibernate-osgi.gradle @@ -73,10 +73,6 @@ def osgiDescription() { return pomDescription() } -def boolean needsLoggingGeneration() { - return false; -} - jar { manifest { instruction 'Bundle-Activator', 'org.hibernate.osgi.HibernateBundleActivator' diff --git a/hibernate-testing/hibernate-testing.gradle b/hibernate-testing/hibernate-testing.gradle index 53107ad982..0d3bba2413 100644 --- a/hibernate-testing/hibernate-testing.gradle +++ b/hibernate-testing/hibernate-testing.gradle @@ -26,7 +26,3 @@ def pomDescription() { def osgiDescription() { return pomDescription() } - -def boolean needsLoggingGeneration() { - return false; -} \ No newline at end of file diff --git a/source-generation.gradle b/source-generation.gradle index 476687ddf9..3156965e9e 100644 --- a/source-generation.gradle +++ b/source-generation.gradle @@ -165,9 +165,9 @@ class SourceGenerationPluginConvention { // create a FileTree representation of the APT output dir and add it to the JavaCompile task (so they get compiled) - final ConfigurableFileTree outputDirFileTree = project.fileTree( outputDir ); - outputDirFileTree.builtBy( aptTask ); - javaCompileTask.getSource().plus( outputDirFileTree ); +// final ConfigurableFileTree outputDirFileTree = project.fileTree( outputDir ); +// outputDirFileTree.builtBy( aptTask ); +// javaCompileTask.getSource().plus( outputDirFileTree ); // Add the APT output dir to the source set sourceSet.getJava().srcDir( outputDir ); diff --git a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle index c1497e5878..c533a0365a 100644 --- a/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle +++ b/tooling/hibernate-gradle-plugin/hibernate-gradle-plugin.gradle @@ -9,7 +9,3 @@ dependencies { compile gradleApi() compile localGroovy() } - -def boolean needsLoggingGeneration() { - return false; -} \ No newline at end of file diff --git a/tooling/hibernate-maven-plugin/hibernate-maven-plugin.gradle b/tooling/hibernate-maven-plugin/hibernate-maven-plugin.gradle index 5bcc9ad299..0dbbc2742c 100644 --- a/tooling/hibernate-maven-plugin/hibernate-maven-plugin.gradle +++ b/tooling/hibernate-maven-plugin/hibernate-maven-plugin.gradle @@ -12,7 +12,3 @@ dependencies { compile( libraries.jpa ) compile( libraries.javassist ) } - -def boolean needsLoggingGeneration() { - return false; -} \ No newline at end of file diff --git a/tooling/metamodel-generator/hibernate-jpamodelgen.gradle b/tooling/metamodel-generator/hibernate-jpamodelgen.gradle index 4c06f2567c..5b8258a162 100644 --- a/tooling/metamodel-generator/hibernate-jpamodelgen.gradle +++ b/tooling/metamodel-generator/hibernate-jpamodelgen.gradle @@ -68,7 +68,3 @@ runSourceGenerators.dependsOn jaxb checkstyleMain.exclude '**/jaxb/**' - -def boolean needsLoggingGeneration() { - return false; -} \ No newline at end of file