Skip to content

Commit

Permalink
Grace: update gradle build scripts
Browse files Browse the repository at this point in the history
remove extra dependencyManagement
  • Loading branch information
rainboyan committed Mar 2, 2024
1 parent c0a6a54 commit 95d9735
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
44 changes: 26 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"

Expand All @@ -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
}
Expand All @@ -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"
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -191,7 +192,14 @@ subprojects { Project subproject ->
}
}
}

pom.withXml {
def pomNode = asNode()
try {
pomNode.dependencyManagement.replaceNode {}
} catch (Throwable e) {
// ignore
}
}
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions grace-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95d9735

Please sign in to comment.