Skip to content

Commit

Permalink
dependency cleanup with grails-bom (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfredley authored Oct 25, 2024
1 parent 282893f commit 77f66ab
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'liberica'
java-version: 17
- name: Run Tests
if: github.event_name == 'pull_request'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'liberica'
java-version: 17
- name: Set the current release version
id: release_version
Expand Down
68 changes: 14 additions & 54 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.asciidoctor:asciidoctor-gradle-jvm:4.0.3"
classpath "org.asciidoctor:asciidoctor-gradle-jvm:$asciidoctorJvmVersion"
}
}

Expand All @@ -24,82 +24,42 @@ repositories {
mavenCentral()
}

dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}

configurations {
documentation

configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if ((details.requested.group == 'org.codehaus.groovy' || details.requested.group == 'org.apache.groovy') && details.requested.name != 'groovy-bom') {
details.useTarget(group: 'org.apache.groovy', name: details.requested.name, version: "$groovyVersion")
details.because "The dependency coordinates are changed in Apache Groovy 4, plus ensure version"
}

if (details.requested.group == "io.micronaut" && details.requested.name == "micronaut-inject-groovy") {
details.useVersion("4.6.1")
}
}
}
}

dependencies {
api "org.liquibase:liquibase-core:$liquibaseHibernate5Version"
implementation platform("org.grails:grails-bom:$grailsVersion")

api "org.liquibase:liquibase-core:$liquibaseHibernate5Version"
api("org.liquibase.ext:liquibase-hibernate5:$liquibaseHibernate5Version") {
exclude group: 'org.hibernate', module: 'hibernate-core'
exclude group: 'org.hibernate', module: 'hibernate-entitymanager'
exclude group: 'org.hibernate', module: 'hibernate-envers'
exclude group: 'org.liquibase', module: 'liquibase-core'
exclude group: 'org.liquibase', module: 'liquibase-test-harness'
exclude group: 'com.h2database', module: 'h2'
}
api "jakarta.annotation:jakarta.annotation-api:$jakartaAnnotationApiVersion"
api 'org.apache.commons:commons-lang3:3.17.0'

compileOnly "org.hibernate:hibernate-core-jakarta:$hibernate5Version"
api "org.apache.commons:commons-lang3"

compileOnly "org.springframework.boot:spring-boot-starter-logging"
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
compileOnly "org.springframework.boot:spring-boot-autoconfigure"
compileOnly "org.springframework.boot:spring-boot-starter-tomcat"

compileOnly "org.grails:grails-web-boot"
compileOnly "org.grails:grails-dependencies"
compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
compileOnly "org.grails.plugins:hibernate5:$gormVersion"
testImplementation "io.micronaut:micronaut-inject-groovy:$micronautVersion"
testImplementation "io.micronaut:micronaut-inject:$micronautVersion"
testImplementation "org.liquibase.ext:liquibase-hibernate5:$liquibaseHibernate5Version"
testImplementation "org.liquibase:liquibase-core:$liquibaseHibernate5Version"

compileOnly "org.grails.plugins:hibernate5"
compileOnly "org.apache.groovy:groovy-sql"
compileOnly "org.apache.groovy:groovy-xml"

testImplementation "org.springframework.boot:spring-boot-starter-tomcat"
testImplementation "org.hibernate:hibernate-core-jakarta:$hibernate5Version"
testImplementation "org.grails.plugins:hibernate5:$gormVersion"

testImplementation "org.grails.plugins:hibernate5"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "com.h2database:h2:$h2Version"


documentation "org.apache.groovy:groovy:$groovyVersion"
documentation "org.apache.groovy:groovy-ant:$groovyVersion"
documentation "org.apache.groovy:groovy-templates:$groovyVersion"
documentation "com.github.javaparser:javaparser-core:$javaParserCoreVersion"

documentation "org.apache.groovy:groovy"
documentation "org.apache.groovy:groovy-ant"
documentation "org.apache.groovy:groovy-templates"
documentation "com.github.javaparser:javaparser-core"
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
compileJava {
options.release = 17
}

grailsPublish {
Expand Down
17 changes: 7 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
projectVersion=6.0.0-SNAPSHOT

asciidoctorJvmVersion=4.0.3
grailsVersion=7.0.0-SNAPSHOT
grailsGradlePluginVersion=7.0.0-SNAPSHOT
groovyVersion=4.0.22
liquibaseHibernate5Version=4.27.0
projectVersion=6.0.0-SNAPSHOT
hibernate5Version=5.6.15.Final
servletApiVersion=6.0.0
groovyVersion=4.0.23
# Tests are built for this version
h2Version=1.4.200
jakartaAnnotationApiVersion=3.0.0
micronautVersion=4.6.5
gormVersion=9.0.0-SNAPSHOT
javaParserCoreVersion=3.26.2
liquibaseHibernate5Version=4.27.0

websiteUrl=https://grails-plugins.github.io/grails-database-migration
issueTrackerUrl=https://github.com/grails-plugins/grails-database-migration/issues
vcsUrl=https://github.com/grails-plugins/grails-database-migration

org.gradle.parallel=true
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.daemon=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 77f66ab

Please sign in to comment.