diff --git a/build.gradle b/build.gradle index b5140f7576..fa641fe643 100644 --- a/build.gradle +++ b/build.gradle @@ -72,8 +72,14 @@ subprojects { subProject -> apply plugin: 'maven' // for install task as well as deploy dependencies apply plugin: 'uploadAuth' apply plugin: 'osgi' + apply from: "../utilities.gradle" + apply plugin: 'findbugs' + apply plugin: 'checkstyle' + apply plugin: 'build-dashboard' + apply plugin: 'project-report' + configurations { provided { // todo : need to make sure these are non-exported @@ -194,33 +200,33 @@ subprojects { subProject -> jar { Set exportPackages = new HashSet() Set privatePackages = new HashSet() - + // TODO: Could more of this be pulled into utilities.gradle? sourceSets.each { sourceSet -> - // skip certain source sets - if ( ! ['test','matrix'].contains( sourceSet.name ) ) { - sourceSet.java.each { javaFile -> - // - org.hibernate.boot.registry.classloading.internal - // until EntityManagerFactoryBuilderImpl no longer imports ClassLoaderServiceImpl - // - .util for external module use (especially envers) - final String[] temporaryExports = [ - 'org.hibernate.boot.registry.classloading.internal', - 'org.hibernate.internal.util' ] + // skip certain source sets + if ( ! ['test','matrix'].contains( sourceSet.name ) ) { + sourceSet.java.each { javaFile -> + // - org.hibernate.boot.registry.classloading.internal + // until EntityManagerFactoryBuilderImpl no longer imports ClassLoaderServiceImpl + // - .util for external module use (especially envers) + final String[] temporaryExports = [ + 'org.hibernate.boot.registry.classloading.internal', + 'org.hibernate.internal.util' ] - final String packageName = determinePackageName( sourceSet.java, javaFile ); - if ( ! temporaryExports.contains( packageName ) - && ( packageName.endsWith( ".internal" ) - || packageName.contains( ".internal." ) - || packageName.endsWith( ".test" ) - || packageName.contains( ".test." ) ) ) { - privatePackages.add( packageName ); - } - else { - exportPackages.add( packageName ); - } - } + final String packageName = determinePackageName( sourceSet.java, javaFile ); + if ( ! temporaryExports.contains( packageName ) + && ( packageName.endsWith( ".internal" ) + || packageName.contains( ".internal." ) + || packageName.endsWith( ".test" ) + || packageName.contains( ".test." ) ) ) { + privatePackages.add( packageName ); + } + else { + exportPackages.add( packageName ); } } + } + } manifest = osgiManifest { // GRADLE-1411: Even if we override Imports and Exports @@ -294,6 +300,19 @@ subprojects { subProject -> } } + // Report configs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + checkstyle { + configFile = rootProject.file( 'shared/config/checkstyle/checkstyle.xml' ) + showViolations = false + ignoreFailures = true + } + findbugs { + ignoreFailures = true + } + buildDashboard.dependsOn check + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // elements used to customize the generated POM used during upload def pomConfig = { name 'A Hibernate O/RM Module' diff --git a/shared/config/checkstyle/checkstyle.xml b/shared/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000000..7e74a79d35 --- /dev/null +++ b/shared/config/checkstyle/checkstyle.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +