Skip to content

Commit c943b80

Browse files
committed
Integrate async project
- docs are moved to grails-doc repo - old async github workflows & associated config removed - async & events split into separate directories - shared example project now lives in grails-test-examples - remove test and example projects from the bom - fix async / events in the bom now that they're in grails-core - change the build action to not fail fast so we can identify which version of java is failing
1 parent 26a61c7 commit c943b80

File tree

264 files changed

+330
-6183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+330
-6183
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
permissions:
3333
contents: read # to fetch code (actions/checkout)
3434
strategy:
35+
fail-fast: false
3536
matrix:
3637
java: [17, 21, 23]
3738
os: [ubuntu-latest, windows-latest, macos-latest]
@@ -53,7 +54,7 @@ jobs:
5354
env:
5455
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
5556
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
56-
run: ./gradlew build assemble groovydoc
57+
run: ./gradlew build assemble groovydoc --continue
5758
publish:
5859
if: github.event_name == 'push' && needs.skip_check.outputs.found_skip_publish != 'true'
5960
needs: build

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ classes
99
*.log
1010
*.ipr
1111
*.iml
12+
*.db
1213
*.iws
1314
*.hprof
1415
idea
@@ -23,7 +24,7 @@ stacktrace.log
2324
/dist
2425
/idea-target
2526
target
26-
/build
27+
build
2728
/grails.iws
2829
.gradle
2930
.DS_Store

build.gradle

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ buildscript {
77
classpath "io.github.gradle-nexus:publish-plugin:$gradleNexusPublishPluginVersion"
88
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:$gradleExtraConfigurationsPluginVersion"
99
classpath "com.bmuschko:gradle-nexus-plugin:$gradleNexusPluginVersion"
10-
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:$gradleLicensePluginVersion"
10+
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:$gradleLicensePluginVersion", {
11+
exclude group: 'org.springframework', module: 'spring-core'
12+
}
1113
}
1214
}
1315

@@ -166,10 +168,19 @@ apply from: "gradle/idea.gradle"
166168
subprojects { subproject ->
167169

168170
version = grailsVersion
169-
group = "org.grails"
170171

171-
ext.isTestSuite = subproject.name.startsWith("grails-test-suite")
172-
ext.isCiBuild = subproject.hasProperty("isCiBuild") || System.getenv().get("CI") as Boolean
172+
ext.isTestSuite = subproject.name.startsWith('grails-test-suite')
173+
ext.isExample = subproject.name.contains('grails-test-examples')
174+
ext.isPlugin = subproject.name in ['grails-async-plugin', 'grails-events-plugin']
175+
ext.isCiBuild = subproject.hasProperty('isCiBuild') || System.getenv().get('CI') as Boolean
176+
ext.isAsyncProject = subproject.name.startsWith('grails-async') || subproject.name.startsWith('grails-events')
177+
178+
if (isPlugin) {
179+
group = 'org.grails.plugins'
180+
} else {
181+
group = 'org.grails'
182+
}
183+
173184
ext.pomInfo = {
174185
delegate.name 'Grails® framework'
175186
delegate.description 'Grails Web Application Framework'
@@ -196,7 +207,6 @@ subprojects { subproject ->
196207
delegate.email '[email protected]'
197208
}
198209
}
199-
200210
}
201211

202212
if (subproject.name != 'grails-bom') {
@@ -207,7 +217,7 @@ subprojects { subproject ->
207217
apply plugin: 'project-report'
208218
}
209219

210-
if (!isTestSuite) {
220+
if (!isTestSuite && !isExample) {
211221

212222
apply plugin: 'maven-publish'
213223
apply plugin: 'signing'
@@ -248,36 +258,36 @@ subprojects { subproject ->
248258

249259
publications {
250260
maven(MavenPublication) {
251-
pom {
252-
name = 'Grails® framework'
253-
description = 'Grails Web Application Framework'
254-
url = 'https://grails.org/'
255-
256-
licenses {
257-
license {
258-
name = 'The Apache Software License, Version 2.0'
259-
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
260-
distribution = 'repo'
261-
}
262-
}
261+
// Historically async mapped the core libraries to different artifact ids
262+
Map mappedArtifactIds = [
263+
'grails-async-core' : 'grails-async',
264+
'grails-async-plugin' : 'async',
265+
'grails-events-core' : 'grails-events',
266+
'grails-events-plugin': 'events'
267+
268+
]
269+
if(mappedArtifactIds.containsKey(subproject.name)) {
270+
artifactId = mappedArtifactIds[subproject.name]
271+
}
263272

264-
scm {
265-
url = 'scm:[email protected]:grails/grails-core.git'
266-
connection = 'scm:[email protected]:grails/grails-core.git'
267-
developerConnection = 'scm:[email protected]:grails/grails-core.git'
268-
}
273+
pom.withXml {
274+
def pomNode = asNode()
275+
pomNode.children().last() + pomInfo
269276

270-
developers {
271-
developer {
272-
id = 'graemerocher'
273-
name = 'Graeme Rocher'
274-
275-
}
276-
}
277+
// dependency management shouldn't be included
278+
try { pomNode.dependencyManagement.replaceNode({}) } catch (Throwable ignore) {}
277279
}
280+
278281
if (subproject.name != 'grails-bom') {
279282
from components.java
280283
}
284+
285+
if(isAsyncProject) {
286+
versionMapping {
287+
usage('java-api') { fromResolutionOf('runtimeClasspath') }
288+
usage('java-runtime') { fromResolutionResult() }
289+
}
290+
}
281291
}
282292
}
283293
}
@@ -301,10 +311,10 @@ subprojects { subproject ->
301311
}
302312
}
303313

304-
if (subproject.name in ['grails-dependencies', 'grails-bom']) return
314+
if (subproject.name in ['grails-dependencies', 'grails-bom'] || isExample) return
305315

306316
dependencies {
307-
api platform(project(':grails-bom'))
317+
implementation platform(project(':grails-bom'))
308318
}
309319

310320
if (subproject.name =~ /^(grails-web|grails-plugin-|grails-test-suite|grails-test)/) {

dependabot/build.gradle

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ dependencies {
1919
api "org.webjars.npm:bootstrap-icons:${project['bootstrap-icons.version']}"
2020
api "org.webjars.npm:jquery:${project['jquery.version']}"
2121
api "org.gebish:geb-spock:${project['geb-spock.version']}"
22-
api "org.grails.plugins:async:${project['grails-async.version']}"
23-
api "org.grails.plugins:events:${project['grails-async.version']}"
24-
api "org.grails:grails-async:${project['grails-async.version']}"
25-
api "org.grails:grails-async-gpars:${project['grails-async.version']}"
26-
api "org.grails:grails-async-rxjava:${project['grails-async.version']}"
27-
api "org.grails:grails-async-rxjava2:${project['grails-async.version']}"
28-
api "org.grails:grails-events-gpars:${project['grails-async.version']}"
29-
api "org.grails:grails-events-rxjava:${project['grails-async.version']}"
30-
api "org.grails:grails-events-rxjava2:${project['grails-async.version']}"
31-
api "org.grails:grails-events-compat:${project['grails-async.version']}"
32-
api "org.grails:grails-events-spring:${project['grails-async.version']}"
33-
api "org.grails:grails-events-transform:${project['grails-async.version']}"
3422
api "org.grails:grails-datastore-gorm-hibernate5:${project['grails-datastore-gorm-hibernate5.version']}"
3523
api "org.grails:grails-datastore-gorm-mongodb:${project['grails-datastore-gorm-mongodb.version']}"
3624
api "org.grails:grails-datastore-async:${project['grails-datastore.version']}"

gradle.properties

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ plexusComponentApiVersion=1.0-alpha-33
1515
plexusSecDispatcherVersion=1.4
1616
plexusSisuInjectVersion=2.6.0
1717
slf4jVersion=2.0.16
18+
rxJava1Version=1.3.8
19+
rxJava2Version=2.2.21
20+
gparsVersion=1.2.1
1821

1922
org.gradle.caching=true
2023
org.gradle.parallel=true
@@ -25,22 +28,25 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1536M -XX:MaxMetaspaceSize=1024M
2528
# snapshot or documentation publishes.
2629
preventSnapshotPublish=false
2730

28-
# Generated on Mon Dec 23 19:03:18 EST 2024 by: ./gradlew :grails-bom:syncProps
31+
# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs
32+
# https://github.com/grails/grails-gradle-plugin/issues/222
33+
slf4jPreventExclusion=true
34+
35+
# Generated on Tue Jan 07 15:14:48 EST 2025 by: ./gradlew :grails-bom:syncProps
2936
# Only version value modifications allowed after this point. Do not insert or change version names.
3037
ant.version=1.10.15
3138
asciidoctorj.version=3.0.0
3239
asset-pipeline-gradle.version=5.0.5
3340
asset-pipeline-grails.version=5.0.5
34-
byte-buddy.version=1.15.5
3541
bootstrap.version=5.3.3
3642
bootstrap-icons.version=1.11.3
43+
byte-buddy.version=1.15.5
3744
commons-codec.version=1.17.1
3845
commons-text.version=1.12.0
3946
converters.version=6.0.0-SNAPSHOT
4047
directory-watcher.version=0.18.0
4148
flying-saucer-pdf-openpdf.version=9.4.0
4249
geb-spock.version=7.0
43-
grails-async.version=6.0.0-SNAPSHOT
4450
grails-datastore.version=9.0.0-SNAPSHOT
4551
grails-datastore-gorm-hibernate5.version=9.0.0-SNAPSHOT
4652
grails-datastore-gorm-mongodb.version=9.0.0-SNAPSHOT

gradle/assemble.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ tasks.register('sourcesJars', Sync) {
9292
from rootProject.subprojects.findAll { subproject ->
9393
!subproject.name.startsWith('grails-test-suite') &&
9494
!subproject.name.startsWith('grails-dependencies') &&
95-
!subproject.name.startsWith('grails-bom')
95+
!subproject.name.startsWith('grails-bom') &&
96+
!subproject.name.contains('grails-test-examples')
9697
}.sourcesJar*.outputs*.files
9798
// sourcesFor comes from GrailsBuildPlugin
9899
from {
@@ -149,7 +150,7 @@ class GrailsCreateStartScripts extends CreateStartScripts {
149150
tasks.register('install') { task ->
150151
dependsOn 'populateDependencies', 'grailsCreateStartScripts'
151152
subprojects { Project project ->
152-
if(!project.name.startsWith('grails-test-suite')) {
153+
if(!project.name.startsWith('grails-test-suite') && !project.name.startsWith('grails-test-examples')) {
153154
task.dependsOn("$project.name:publishToMavenLocal")
154155
}
155156
}

gradle/docs.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ tasks.register('docs') {
6868
}
6969

7070
task javadoc(type:Javadoc, group: 'documentation') {
71-
def subs = subprojects.findAll { it.name != 'grails-dependencies' && it.name != 'grails-bom' }
71+
def subs = subprojects.findAll { it.name != 'grails-dependencies' && it.name != 'grails-bom' && !it.name.startsWith('grails-test-suite') && !it.name.contains('grails-test-examples') }
7272
classpath = files(subs.configurations.compileClasspath)
7373
dependsOn stubs
7474
maxMemory = '256M'
@@ -94,7 +94,7 @@ task javadoc(type:Javadoc, group: 'documentation') {
9494
tasks.register('groovydoc', Groovydoc) {
9595
final Set<Project> subProjects = subprojects.findAll {
9696
!(it.name in ['grails-dependencies', 'grails-bom', 'grails-bootstrap', 'grails-gradle-model', 'grails-shell'])
97-
&& !it.name.startsWith("grails-test-suite") }
97+
&& !it.name.startsWith('grails-test-suite') && !it.name.contains('grails-test-examples') }
9898
def groovydocClasspath = files(configurations.documentation + subProjects.configurations.compileClasspath)
9999
// exclude problematic jar file from javadoc classpath
100100
// http://www.adam-bien.com/roller/abien/entry/trouble_with_crippled_java_ee

gradle/idea.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import groovy.xml.XmlParser
22

33
idea {
44
project {
5-
jdkName "1.7"
6-
languageLevel "1.7"
5+
jdkName "17"
6+
languageLevel "17"
77
ipr {
88
withXml { provider ->
99
def node = provider.asNode()

grails-async/.github/dependabot.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)