Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.0.x dependency cleanup - new grails-bom #13787

Merged
merged 81 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
344b568
bom cleanup
codeconsole Oct 18, 2024
5ede19c
Use bom versions
codeconsole Oct 18, 2024
398637b
more bom cleanup
codeconsole Oct 18, 2024
79927d4
more bom cleanup
codeconsole Oct 18, 2024
0e85c0e
Use bom versions
codeconsole Oct 18, 2024
a736522
More bom cleanup
codeconsole Oct 18, 2024
48517fe
More bom cleanup
codeconsole Oct 18, 2024
1d2d065
More bom cleanup
codeconsole Oct 18, 2024
7224e37
More bom cleanup
codeconsole Oct 18, 2024
16ab3ff
More bom cleanup
codeconsole Oct 18, 2024
63aec89
Use bom versions
codeconsole Oct 18, 2024
22a86ce
Use bom versions
codeconsole Oct 18, 2024
204195f
Use bom versions
codeconsole Oct 18, 2024
f76cf5a
add snapshot version check for plugins and profiles
codeconsole Oct 18, 2024
8e434f0
Sort bom dependencies
codeconsole Oct 18, 2024
80534e7
Build cleanup
codeconsole Oct 18, 2024
ce4cbbc
sort modules, use javaPlatform
codeconsole Oct 18, 2024
866362d
fix typo ant.xml -> ant,xml
codeconsole Oct 18, 2024
01124c2
Add bom to root project
codeconsole Oct 18, 2024
67b9c5b
Revert subproject duplicate bom addition
codeconsole Oct 18, 2024
004f591
Revert documentation bom version resolution
codeconsole Oct 18, 2024
1d9effe
generate bom manually
codeconsole Oct 18, 2024
6f0c592
use bom for docs
codeconsole Oct 18, 2024
b45b21a
Sort dependencies by variable name
codeconsole Oct 18, 2024
fc5e826
fix spock-core versioning
codeconsole Oct 18, 2024
3e447eb
remove hsqldb
codeconsole Oct 18, 2024
7f14c04
name override suppport, fix slf4j, add grails-web-taglib
codeconsole Oct 18, 2024
c7fe2cc
Move dependency versions to top of pom
codeconsole Oct 18, 2024
3b94cc8
cleanup
codeconsole Oct 18, 2024
6f03304
Add project subprojects to bom
codeconsole Oct 18, 2024
6f6acdc
remove juinit deps from bom
codeconsole Oct 18, 2024
3d1d0ca
clean up grails-test-suite-web
codeconsole Oct 18, 2024
e12d06b
Remove one time use version references
codeconsole Oct 18, 2024
3d84144
Fix plugin an profiles bom rendering
codeconsole Oct 18, 2024
dfb2f7f
Fix version references
codeconsole Oct 18, 2024
12147ef
dependabot generation scripts
codeconsole Oct 19, 2024
547c7e6
Generate to dependabot to a file
codeconsole Oct 19, 2024
452ca25
Properties file generation
codeconsole Oct 19, 2024
e2c3aec
Add generated bom properties
codeconsole Oct 19, 2024
81ad574
Use generated bom properties
codeconsole Oct 19, 2024
db234c3
Add generated build.gradle for dependabot only
codeconsole Oct 19, 2024
9af918a
Add copyright
codeconsole Oct 19, 2024
e9bdba2
Document format used
codeconsole Oct 19, 2024
32ee08c
Missing quotes
codeconsole Oct 19, 2024
ad4b3f3
more version renaming / simplification
codeconsole Oct 19, 2024
1d5b728
Add generation timestamp
codeconsole Oct 19, 2024
61d1c1a
fix preferences
codeconsole Oct 19, 2024
2e89e83
api dependency
codeconsole Oct 19, 2024
27654a2
dependabot generation improvements
codeconsole Oct 19, 2024
c704596
Do not append properties. Just overwrite existing.
codeconsole Oct 20, 2024
8c7137a
Fix version numbers for project dependencies
codeconsole Oct 20, 2024
50d59e5
Update description
codeconsole Oct 20, 2024
4f6230f
Remove unused args
codeconsole Oct 20, 2024
78fec40
update gradle.properties reference
codeconsole Oct 20, 2024
03693fb
use rootProject.layout references
codeconsole Oct 20, 2024
358c80b
Remove unused break
codeconsole Oct 20, 2024
712a2ab
fix grails-web-taglib
codeconsole Oct 21, 2024
08e9c1c
use mongodb.version, update dependabot refernces
codeconsole Oct 21, 2024
25e5141
Use Spring bom slf4j version
codeconsole Oct 21, 2024
a0c97c8
remove aspect j
codeconsole Oct 21, 2024
de7cc76
use spring aspectj
codeconsole Oct 21, 2024
36b4252
use spring boot caffeine
codeconsole Oct 21, 2024
faaacf3
use jackson bom
codeconsole Oct 21, 2024
ab5d5f0
switch to groovy bom
codeconsole Oct 21, 2024
d0c74aa
Fix plugins.properties to match module
codeconsole Oct 21, 2024
e2b00c1
add asset-pipeline, commons-io, geb-spock, database-migration
codeconsole Oct 21, 2024
b26f779
use spring bom tomcat version
codeconsole Oct 21, 2024
4b8b4bc
asset-pipeline-grails
codeconsole Oct 21, 2024
18c25f2
Separate bom tasks
codeconsole Oct 21, 2024
1180106
Use task name variable
codeconsole Oct 21, 2024
8bc20e6
Use commmons io version property
codeconsole Oct 21, 2024
603688e
use spring bom snakeyaml
codeconsole Oct 21, 2024
ab073a2
use spring bom for jarkarta deps
codeconsole Oct 21, 2024
d4587f5
commons-io not needed in buildscript
codeconsole Oct 21, 2024
ff4dfa7
datastoreVersion no logner needed
codeconsole Oct 21, 2024
02779d8
hamcrest is a testImplementation needed by grails-core and which alre…
codeconsole Oct 21, 2024
598a7f7
Remove groovyVersion from groovydoc
codeconsole Oct 22, 2024
69ce220
remove no longer needed exclusions. remove commons-codec.
codeconsole Oct 22, 2024
1f3f4f6
remove dependencyResolutionManagement config
codeconsole Oct 22, 2024
878790d
remove commons-codec exclusion.
codeconsole Oct 22, 2024
b873a44
jcl-over-slf4j version set by spring bom
codeconsole Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 49 additions & 148 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,101 +23,6 @@ ext {
isCiBuild = System.getenv().get("CI") as Boolean
springLoadedCommonOptions = "-Xverify:none -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true"

// When making changes in the dependencyVersions, remember to also update the Grails BOM Documentation:
// https://docs.grails.org/snapshot/ref/Dependency%20Versions/Grails%20BOM.html
dependencyVersions = [
'grailsGradlePlugin' : [version: grailsGradlePluginVersion,
group : 'org.grails',
names : ['grails-gradle-plugin'],
modules: ['']
],
'jakarta-annotation' : [version: jakartaAnnotationApiVersion,
group : 'jakarta.annotation',
names : ['jakarta.annotation-api'],
modules: ['']
],
'mongodb' : [version: mongodbJavaDriverVersion,
group : 'org.mongodb',
names : ['mongodb-driver'],
modules: ['core', 'sync']
],
'mongodb.bson' : [version: mongodbJavaDriverVersion,
group : 'org.mongodb',
names : ['bson'],
modules: ['', 'record-codec']
],
'gorm' : [version: datastoreVersion,
group : 'org.grails',
names : ['grails-datastore'],
modules: ['async', 'core', 'web', 'gorm', 'gorm-async', 'gorm-support', 'gorm-rx', 'gorm-test', 'gorm-validation']
],
'gorm.hibernate' : [version: hibernateDatastoreVersion,
group : 'org.grails',
names : ['grails-datastore-gorm-hibernate5'],
modules: ['']
],
'groovy' : [version: groovyVersion,
group : 'org.apache.groovy',
names : ['groovy'],
modules: ['', 'xml', 'swing', 'console', 'json', 'ant', 'sql', 'templates', 'nio', 'dateutil', 'macro']
],
'spring' : [version: springVersion,
group : 'org.springframework',
names : ['spring'],
modules: ['aop', 'aspects', 'beans', 'context-support', 'context', 'core', 'expression', 'instrument', 'jdbc', 'jms', 'messaging', 'orm', 'oxm', 'test', 'tx', 'web', 'webmvc', 'websocket']
],
'directoryWatcher' : [version: directoryWatcherVersion,
group : 'io.methvin',
names : ['directory-watcher'],
modules: ['']
],
'springLoaded' : [version: springLoadedVersion,
group : 'org.springframework',
names : ['springloaded'],
modules: ['']
],
'async' : [version: asyncVersion,
group : 'org.grails.plugins',
names : ['async', 'events'],
modules: ['']
],
'asyncImpls' : [version: asyncVersion,
group : 'org.grails',
names : ['grails-async', 'grails-events'],
modules: ['gpars', 'rxjava', 'rxjava2']
],
'snakeyaml' : [version: snakeyamlVersion,
group : 'org.yaml',
names : ['snakeyaml'],
modules: ['']
],
'spock' : [version: spockVersion,
group : 'org.spockframework',
names : ['spock-core', 'spock-spring'],
modules: ['']
],
'gsp' : [version: gspVersion,
group : 'org.grails.plugins',
names : ['gsp'],
modules: ['']
],
'testingSupport' : [version: testingSupportVersion,
group : 'org.grails',
names : ['grails-testing-support', 'grails-gorm-testing-support', 'grails-web-testing-support'],
modules: ['']
],
'viewsJsonTestingSupport': [version: viewsVersion,
group : 'org.grails',
names : ['views-json-testing-support'],
modules: ['']
],
'h2' : [version: h2Version,
group : 'com.h2database',
names : ['h2'],
modules: ['']
],
]

nexusUsername = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
nexusPassword = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''

Expand Down Expand Up @@ -153,10 +58,7 @@ if (jointBuildGroovyJarProperty) {
throw new GradleException("The groovy.jar system property points to ${jointBuildGroovyJar.absolutePath} which does not exist.")
}
} else {
groovyDependency = dependencies.create("org.apache.groovy:groovy:${groovyVersion}") {
exclude module:"commons-cli"
exclude module:"ant"
}
groovyDependency = dependencies.create("org.apache.groovy:groovy:${groovyVersion}")
}

if (isReleaseVersion) {
Expand Down Expand Up @@ -184,7 +86,7 @@ if (isReleaseVersion) {
}

allprojects {

if (project.name == 'grails-bom') return
// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
// except in projects that will be run by Gradle during the build
if (!compiledByGradleGroovyVersion(project)) {
Expand Down Expand Up @@ -267,13 +169,15 @@ allprojects {

apply from: "gradle/idea.gradle"

subprojects { project ->
subprojects { subproject ->

version = grailsVersion
group = "org.grails"

ext.isTestSuite = project.name.startsWith("grails-test-suite")
ext.isCiBuild = project.hasProperty("isCiBuild") || System.getenv().get("CI") as Boolean
if (subproject.name == 'grails-bom') return

ext.isTestSuite = subproject.name.startsWith("grails-test-suite")
ext.isCiBuild = subproject.hasProperty("isCiBuild") || System.getenv().get("CI") as Boolean
ext.pomInfo = {
delegate.name 'Grails® framework'
delegate.description 'Grails Web Application Framework'
Expand All @@ -295,9 +199,9 @@ subprojects { project ->

delegate.developers {
delegate.developer {
delegate.id 'puneetbehl'
delegate.name 'Puneet Behl'
delegate.email 'behlp@objectcomputing.com'
delegate.id 'graemerocher'
delegate.name 'Graeme Rocher'
delegate.email 'grails-build@users.noreply.github.com'
}
}

Expand All @@ -318,15 +222,14 @@ subprojects { project ->
withJavadocJar()
withSourcesJar()
}

publishing {

if (isBuildSnapshot) {
repositories {
maven {
credentials {
def u = project.hasProperty("artifactoryPublishUsername") ? project.getProperty('artifactoryPublishUsername') : System.getenv("ARTIFACTORY_USERNAME")
def p = project.hasProperty("artifactoryPublishPassword") ? project.getProperty('artifactoryPublishPassword') : System.getenv("ARTIFACTORY_PASSWORD")
def u = subproject.hasProperty("artifactoryPublishUsername") ? subproject.getProperty('artifactoryPublishUsername') : System.getenv("ARTIFACTORY_USERNAME")
def p = subproject.hasProperty("artifactoryPublishPassword") ? subproject.getProperty('artifactoryPublishPassword') : System.getenv("ARTIFACTORY_PASSWORD")
username = u
password = p
}
Expand All @@ -335,8 +238,7 @@ subprojects { project ->
}
}

if (project.name == 'grails-dependencies') return
if (project.name == 'grails-bom') return
if (subproject.name == 'grails-dependencies') return

publications {
maven(MavenPublication) {
Expand All @@ -361,9 +263,9 @@ subprojects { project ->

developers {
developer {
id = 'puneetbehl'
name = 'Puneet Behl'
email = 'behlp@unityfoundation.io'
id = 'graemerocher'
name = 'Graeme Rocher'
email = 'grails-build@users.noreply.github.com'
}
}
}
Expand All @@ -390,23 +292,26 @@ subprojects { project ->
}
}

if (project.name == 'grails-dependencies') return
if (project.name == 'grails-bom') return
if (subproject.name == 'grails-dependencies') return

dependencies {
implementation platform(project(':grails-bom'))
}

if (project.name =~ /^(grails-web|grails-plugin-|grails-test-suite|grails-test)/) {
if (subproject.name =~ /^(grails-web|grails-plugin-|grails-test-suite|grails-test)/) {
dependencies {
compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
testImplementation "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
compileOnly "jakarta.servlet:jakarta.servlet-api"
testImplementation "jakarta.servlet:jakarta.servlet-api"
// MockHttpServletRequest/Response/Context used in many classes
compileOnly "org.springframework:spring-test:$springVersion"
testImplementation "org.springframework:spring-test:$springVersion"
compileOnly "org.springframework:spring-test"
testImplementation "org.springframework:spring-test"
}
}

if (project.name =~ /^(grails-plugin-datasource|grails-test-suite)/) {
if (subproject.name =~ /^(grails-plugin-datasource|grails-test-suite)/) {
dependencies {
testImplementation "hsqldb:hsqldb:$hsqldbVesion"
testImplementation "com.h2database:h2:$h2Version"
testImplementation "hsqldb:hsqldb"
testImplementation "com.h2database:h2"
}
}

Expand All @@ -426,39 +331,39 @@ subprojects { project ->
}

dependencies {
documentation("org.fusesource.jansi:jansi:$jansiVersion")
documentation("jline:jline:$jlineVersion")
documentation ("com.github.javaparser:javaparser-core:$javaParserCoreVersion")
documentation "org.fusesource.jansi:jansi"
documentation "jline:jline"
documentation "com.github.javaparser:javaparser-core"

if (compiledByGradleGroovyVersion(project)) {
if (compiledByGradleGroovyVersion(subproject)) {
documentation "org.codehaus.groovy:groovy:$GroovySystem.version"
documentation "org.codehaus.groovy:groovy-ant:$GroovySystem.version"
documentation "org.codehaus.groovy:groovy-cli-picocli:$GroovySystem.version"
} else {
api groovyDependency
documentation "org.apache.groovy:groovy:$groovyVersion"
documentation "org.apache.groovy:groovy-ant:$groovyVersion"
documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion"
documentation "org.apache.groovy:groovy"
documentation "org.apache.groovy:groovy-ant"
documentation "org.apache.groovy:groovy-cli-picocli"
}

testImplementation "org.apache.groovy:groovy-test-junit5:$groovyVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.platform:junit-platform-runner:$junitPlatformRunnerVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "org.apache.groovy:groovy-test-junit5"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.platform:junit-platform-runner"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"

compileOnly "com.github.spotbugs:spotbugs-annotations:$jsr305Version"
compileOnly "com.github.spotbugs:spotbugs-annotations"

if (project.name != "grails-docs") {
if (subproject.name != "grails-docs") {
// Logging
api "org.slf4j:slf4j-api:$slf4jVersion"
api "org.slf4j:jcl-over-slf4j:$slf4jVersion"
api "org.slf4j:slf4j-api"
api "org.slf4j:jcl-over-slf4j"

// Testing
testImplementation "org.slf4j:slf4j-simple:$slf4jVersion"
testImplementation("org.spockframework:spock-core:$spockVersion") { transitive = false }
testImplementation "org.slf4j:slf4j-simple"
testImplementation("org.spockframework:spock-core") { transitive = false }
// Required by Spock's Mocking
testRuntimeOnly "net.bytebuddy:byte-buddy:$bytebuddyVersion"
testImplementation "org.objenesis:objenesis:$objenesisVersion"
testRuntimeOnly "net.bytebuddy:byte-buddy"
testImplementation "org.objenesis:objenesis"
}
}

Expand Down Expand Up @@ -558,11 +463,7 @@ subprojects { project ->
}
}

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

if (!isTestSuite) {
tasks.register('installToHomeDist', Copy) {
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gradleToolingApiVersion=8.10.2
grailsGradlePluginVersion=7.0.0-SNAPSHOT
groovyVersion=4.0.23
gspVersion=7.0.0-SNAPSHOT
hamcrestVersion=3.0
hamcrestVersion=1.3
codeconsole marked this conversation as resolved.
Show resolved Hide resolved
h2Version=2.3.232
hsqldbVesion=1.8.1.1
hibernateDatastoreVersion=9.0.0-SNAPSHOT
Expand Down Expand Up @@ -58,7 +58,6 @@ springBootVersion=3.3.4
springLoadedVersion=1.2.8.RELEASE
springVersion=6.1.14
testingSupportVersion=4.0.0-SNAPSHOT
testingSupportVersionForTests=4.0.0-SNAPSHOT
tomcatLog4jVersion=8.5.2
tomcatVersion=10.1.31
viewsVersion=4.0.0-SNAPSHOT
Expand Down
Loading
Loading