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

Dependency cleanup #528

Merged
merged 8 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ jobs:
- name: Set CI_GROOVY_VERSION for Grails
run: |
echo "CI_GROOVY_VERSION=${{needs.build_groovy.outputs.groovyVersion}}" >> $GITHUB_ENV
- name: Build GSP
id: build_gsp
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
arguments: |
build
-x groovydoc
# - name: Build GSP
# id: build_gsp
# uses: gradle/gradle-build-action@v3
# env:
# GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
# GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
# GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
# with:
# arguments: |
# build
# -x groovydoc
98 changes: 26 additions & 72 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ ext {
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
if(groovyVersion.endsWith('-SNAPSHOT')) {
maven {
name = 'ASF Snapshot repo'
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}
}

group = "org.grails"
Expand Down Expand Up @@ -62,12 +56,6 @@ subprojects { subproject ->
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
if(groovyVersion.endsWith('-SNAPSHOT')) {
maven {
name = 'ASF Snapshot repo'
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}
}

if (subproject.name.startsWith("examples")) {
Expand All @@ -78,24 +66,21 @@ subprojects { subproject ->
apply plugin: 'groovy'
apply plugin: 'java-library'

repositories {
maven { url "https://repo.grails.org/grails/core" }
}

configurations {
documentation
}

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")
api "org.apache.groovy:groovy:$groovyVersion"
api "org.slf4j:slf4j-api:$slf4jVersion"
documentation platform("org.grails:grails-bom:$grailsVersion")

testImplementation "org.spockframework:spock-core:$spockVersion"
testImplementation "org.springframework:spring-test:$springVersion"
api "org.apache.groovy:groovy:$groovyVersion"
api "org.slf4j:slf4j-api"

documentation "org.fusesource.jansi:jansi:$jansiVersion"
testImplementation "org.spockframework:spock-core"
testImplementation "org.springframework:spring-test"

documentation "org.fusesource.jansi:jansi"
}

test {
Expand All @@ -114,48 +99,17 @@ subprojects { subproject ->
apply plugin: 'idea'
apply plugin: 'java-library'

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

configurations.all {

// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.codehaus.groovy') {
details.useTarget(group: 'org.apache.groovy', name: details.requested.name, version: groovyVersion)
}
}

// FORCE UPGRADE OF SPRING BOOT IN DEPENDENCIES TO SPRING BOOT 3
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.springframework.boot') {
details.useTarget(group: 'org.springframework.boot', name: details.requested.name, version: springBootVersion)
}
}

resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == "org.spockframework") {
details.useVersion(spockVersion)
} else if (details.requested.group == "org.junit.jupiter") {
details.useVersion(junitJupiterVersion)
} else if (details.requested.group == "org.junit.platform") {
details.useVersion(junitPlatformVerison)
}
}
}
compileJava.options.release = 17

dependencies {
compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"

testImplementation "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
implementation "jakarta.persistence:jakarta.persistence-api:$jakartaPersistenceVersion"
testImplementation "org.apache.groovy:groovy-test-junit5:${groovyVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
testImplementation "org.junit.platform:junit-platform-runner:${junitPlatformVerison}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
compileOnly "jakarta.servlet:jakarta.servlet-api"

testImplementation "jakarta.servlet:jakarta.servlet-api"
implementation "jakarta.persistence:jakarta.persistence-api"
testImplementation "org.apache.groovy:groovy-test-junit5:$groovyVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.platform:junit-platform-runner"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
}

tasks.withType(Test) {
Expand All @@ -177,14 +131,14 @@ subprojects { subproject ->

dependencies {
if (configurations.find { subproject.name == 'documentation' }) {
documentation "org.fusesource.jansi:jansi:$jansiVersion"
documentation "jline:jline:$jlineVersion"
documentation "com.github.javaparser:javaparser-core:$javaParserCoreVersion"
documentation "org.apache.groovy:groovy:${groovyVersion}"
documentation "org.fusesource.jansi:jansi"
documentation "jline:jline"
documentation "com.github.javaparser:javaparser-core"
documentation "org.apache.groovy:groovy:$groovyVersion"
documentation "org.apache.groovy:groovy-ant:$groovyVersion"
documentation "org.apache.groovy:groovy-dateutil:$groovyVersion"
documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion"
documentation "org.asciidoctor:asciidoctorj:$asciidoctorjVersion"
documentation "org.asciidoctor:asciidoctorj"
}
}

Expand Down Expand Up @@ -350,14 +304,14 @@ configurations {

dependencies {
if (configurations.find { it.name == 'documentation' }) {
documentation "info.picocli:picocli:$picocliVersion"
documentation "org.fusesource.jansi:jansi:$jansiVersion"
documentation "jline:jline:$jlineVersion"
documentation "com.github.javaparser:javaparser-core:$javaParserCoreVersion"
documentation "org.apache.groovy:groovy:${groovyVersion}"
documentation "info.picocli:picocli"
documentation "org.fusesource.jansi:jansi"
documentation "jline:jline"
documentation "com.github.javaparser:javaparser-core"
documentation "org.apache.groovy:groovy:$groovyVersion"
documentation "org.apache.groovy:groovy-ant:$groovyVersion"
documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion"
documentation "org.asciidoctor:asciidoctorj:$asciidoctorjVersion"
documentation "org.asciidoctor:asciidoctorj"
}
}

Expand Down
20 changes: 2 additions & 18 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,14 @@ githubSlug=grails/grails-gsp
githubBranch=7.0.x
developers=Puneet Behl, Graeme Rocher

asciidoctorjVersion=3.0.0
commonsTextVersion=1.12.0
elApiVersion=6.0.1
grailsGradlePluginVersion=7.0.0-SNAPSHOT
grailsVersion=7.0.0-SNAPSHOT
groovyVersion=4.0.24-SNAPSHOT
springVersion=6.1.14
annotationApiVersion=3.0.0
byteBuddyVersion=1.15.5
elApiVersion=6.0.1
servletApiVersion=6.0.0
javaParserCoreVersion=3.26.2
jakartaPersistenceVersion=3.1.0
jansiVersion=2.4.1
jlineVersion=2.14.6
groovyVersion=4.0.23
jspApiVersion=4.0.0
jstlVersion=3.0.1
junitJupiterVersion=5.11.2
junitPlatformVerison=1.11.2
picocliVersion=3.8.0
sitemeshVersion=7.0.0-SNAPSHOT
spockVersion=2.3-groovy-4.0
slf4jVersion=2.0.16
springBootVersion=3.3.4
antVersion=1.10.15
controllersRef=https://docs.grails.org/latest/ref/Controllers
commandLineRef=https://docs.grails.org/latest/ref/Command%20Line
grailsDocsVersion=7.0.0-SNAPSHOT
Expand Down
4 changes: 1 addition & 3 deletions grails-gsp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
dependencies {
api "org.grails:grails-core:$grailsVersion", {
exclude group:'org.grails', module:'grails-spring'
}
api "org.grails:grails-core:$grailsVersion"
api project(":grails-taglib")
api "org.apache.groovy:groovy-templates:$groovyVersion"
}
22 changes: 8 additions & 14 deletions grails-plugin-gsp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,27 @@ configurations.all {
}
}
dependencies {
compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
compileOnly "jakarta.servlet:jakarta.servlet-api"
api project(":grails-web-gsp-taglib")
api "org.sitemesh:grails-plugin-sitemesh3:$sitemeshVersion"

runtimeOnly(project(":grails-web-jsp"))
api "org.apache.commons:commons-text:$commonsTextVersion"
api "org.grails:grails-plugin-codecs:$grailsVersion"
astImplementation "org.grails:grails-web:$grailsVersion"
astImplementation "org.grails:grails-plugin-controllers:$grailsVersion"
astImplementation "org.grails:grails-web"
astImplementation "org.grails:grails-plugin-controllers"

testImplementation "org.grails:grails-web-testing-support:$testingSupportVersion", {
exclude module:'async'
}
testImplementation "org.grails:grails-testing-support:$testingSupportVersion", {
exclude module:'async'
}
testImplementation "org.grails:grails-gorm-testing-support:$testingSupportVersion", {
exclude module:'async'
}
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.grails:grails-testing-support"
testImplementation "org.grails:grails-gorm-testing-support"

testRuntimeOnly "org.grails.plugins:async"
testImplementation "jakarta.annotation:jakarta.annotation-api:$annotationApiVersion"
testImplementation "jakarta.annotation:jakarta.annotation-api"
testImplementation "jakarta.servlet.jsp:jakarta.servlet.jsp-api:${jspApiVersion}"
testRuntimeOnly "org.glassfish.web:jakarta.servlet.jsp.jstl:${jstlVersion}"
testImplementation "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:${jstlVersion}"

testRuntimeOnly "org.grails:grails-plugin-url-mappings:$grailsVersion"
testRuntimeOnly "org.grails:grails-plugin-url-mappings"
}

test {
Expand Down
5 changes: 2 additions & 3 deletions grails-taglib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dependencies {
api "org.grails:grails-core:$grailsVersion", {
exclude group:'org.grails', module:'grails-spring'
}
documentation platform("org.grails:grails-bom:$grailsVersion")
api "org.grails:grails-core:$grailsVersion"
api "org.grails:grails-encoder:$grailsVersion"
}
2 changes: 1 addition & 1 deletion grails-web-gsp-taglib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
compileOnly "jakarta.servlet:jakarta.servlet-api"
api project(':grails-web-jsp')
}
6 changes: 3 additions & 3 deletions grails-web-gsp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies {
compileOnly "org.apache.ant:ant:${antVersion}"
compileOnly "org.apache.ant:ant"
api project(":grails-gsp")
api "org.grails:grails-web-common:$grailsVersion"
api project(":grails-web-taglib")

testImplementation "net.bytebuddy:byte-buddy:$byteBuddyVersion"
testRuntimeOnly "org.grails:grails-spring:$grailsVersion"
testImplementation "net.bytebuddy:byte-buddy"
testRuntimeOnly "org.grails:grails-spring"
}
2 changes: 1 addition & 1 deletion grails-web-jsp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies {
api project(":grails-web-gsp")


compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
compileOnly "jakarta.servlet:jakarta.servlet-api"
// Required for JSP support
compileOnly "jakarta.servlet.jsp:jakarta.servlet.jsp-api:$jspApiVersion"
compileOnly "jakarta.el:jakarta.el-api:$elApiVersion"
Expand Down
6 changes: 4 additions & 2 deletions grails-web-taglib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
dependencies {
compileOnlyApi "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
compileOnlyApi "jakarta.servlet:jakarta.servlet-api"
api "org.grails:grails-web-common:$grailsVersion"
api project(":grails-taglib")
compileOnly project(":grails-gsp")
testImplementation project(":grails-gsp")

testRuntimeOnly "org.grails:grails-spring:$grailsVersion"
testRuntimeOnly "org.grails:grails-spring"
}

// TODO: Remove this after update to Grails 5.0.0.M2
Expand Down
Loading