diff --git a/build.gradle b/build.gradle index 8f6b8dab..67dffce9 100644 --- a/build.gradle +++ b/build.gradle @@ -51,6 +51,19 @@ nexusPublishing { } subprojects { Project subproject -> + ext { + projectArtifactId = subproject.name + isExample = subproject.name.startsWith('example') + isPluginProject = subproject.name == 'hibernate5' + } + + if (isPluginProject) { + group "org.graceframework.plugins" + } + else { + group "org.graceframework" + } + version project.rootProject.version repositories { mavenCentral() @@ -60,13 +73,6 @@ subprojects { Project subproject -> maven { url 'https://repo.gradle.org/gradle/libs-releases' } } - ext { - projectArtifactId = subproject.name - isExample = subproject.name.startsWith('example') - isPluginProject = subproject.name.endsWith("-plugin") && (subproject.name.startsWith("grace") || subproject.name.startsWith("rx-")) - isGrails3PluginProject = subproject.name.endsWith("-plugin") - } - if(isExample) { apply plugin: "groovy" @@ -89,15 +95,6 @@ subprojects { Project subproject -> documentation.extendsFrom(compileClasspath) } - if (isPluginProject) { - group "org.graceframework.plugins" - version project.rootProject.version - } - else { - group "org.graceframework" - version project.rootProject.version - } - if (subproject.name == 'docs') { return } @@ -109,6 +106,10 @@ subprojects { Project subproject -> apply plugin: 'signing' apply plugin: "org.gradle.test-retry" + if (isPluginProject) { + apply plugin: 'org.graceframework.grace-plugin' + } + dependencies { documentation "org.fusesource.jansi:jansi:$jansiVersion" documentation "org.codehaus.groovy:groovy-dateutil:$groovyVersion" @@ -158,7 +159,7 @@ subprojects { Project subproject -> from components.java afterEvaluate { - if(isGrails3PluginProject) { + if(isPluginProject) { artifact source:"${sourceSets.main.groovy.outputDir}/META-INF/grails-plugin.xml", classifier:"plugin", extension:'xml' @@ -191,7 +192,14 @@ subprojects { Project subproject -> } } } - + pom.withXml { + def pomNode = asNode() + try { + pomNode.dependencyManagement.replaceNode {} + } catch (Throwable e) { + // ignore + } + } } } } diff --git a/grace-plugin/build.gradle b/grace-plugin/build.gradle index 4be561a4..c1d5dcbd 100644 --- a/grace-plugin/build.gradle +++ b/grace-plugin/build.gradle @@ -1,7 +1,3 @@ -group "org.graceframework.plugins" - -apply plugin: 'org.graceframework.grace-plugin' - dependencies { documentation ("org.graceframework:grace-core:$graceVersion") documentation ("org.graceframework:grace-bootstrap:$graceVersion") @@ -18,7 +14,6 @@ dependencies { exclude group: 'org.hamcrest', module: 'hamcrest-core' } - api "org.springframework.boot:spring-boot:$springBootVersion" api "org.springframework:spring-orm:$springVersion" api "org.hibernate:hibernate-core:${hibernate5Version}" api "org.graceframework:grace-datastore-web:$gormVersion" diff --git a/gradle.properties b/gradle.properties index 4aa0ac18..7bab1867 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,6 +18,7 @@ snakeyamlVersion=1.33 spockVersion=2.3-groovy-3.0 springBootVersion=2.7.10 springVersion=5.3.26 +springDependencyManagementPluginVersion=1.0.15.RELEASE tomcatVersion=9.0.73 # Following are used only for example projects