Skip to content

Commit 76dc579

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
1 parent 26a61c7 commit 76dc579

File tree

255 files changed

+215
-5976
lines changed

Some content is hidden

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

255 files changed

+215
-5976
lines changed

.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: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,23 @@ apply from: "gradle/idea.gradle"
166166
subprojects { subproject ->
167167

168168
version = grailsVersion
169-
group = "org.grails"
170169

171170
ext.isTestSuite = subproject.name.startsWith("grails-test-suite")
171+
ext.isExample = subproject.name.contains("grails-test-examples")
172+
ext.isPlugin = subproject.name in ['grails-async-plugin', 'grails-events-plugin']
172173
ext.isCiBuild = subproject.hasProperty("isCiBuild") || System.getenv().get("CI") as Boolean
174+
ext.isAsyncProject = subproject.name.startsWith('grails-async') || subproject.name.startsWith('grails-events')
175+
176+
if(isPlugin) {
177+
group = 'org.grails.plugins'
178+
}
179+
else {
180+
group = "org.grails"
181+
}
182+
173183
ext.pomInfo = {
174-
delegate.name 'Grails® framework'
175-
delegate.description 'Grails Web Application Framework'
184+
delegate.name isAsyncProject ? 'Grails Async Framework' : 'Grails® framework'
185+
delegate.description isAsyncProject ? 'Grails Async Libraries' : 'Grails Web Application Framework'
176186
delegate.url 'https://grails.org/'
177187

178188
delegate.licenses {
@@ -189,14 +199,16 @@ subprojects { subproject ->
189199
delegate.developerConnection 'scm:[email protected]:grails/grails-core.git'
190200
}
191201

202+
List developers = isAsyncProject ? ['Graeme Rocher', 'Mattias Reichel'] : ['Graeme Rocher']
192203
delegate.developers {
193-
delegate.developer {
194-
delegate.id 'graemerocher'
195-
delegate.name 'Graeme Rocher'
196-
delegate.email '[email protected]'
204+
for (dev in developers) {
205+
delegate.developer {
206+
delegate.id dev.toLowerCase().replace(' ', '')
207+
delegate.name dev.strip()
208+
delegate.email '[email protected]'
209+
}
197210
}
198211
}
199-
200212
}
201213

202214
if (subproject.name != 'grails-bom') {
@@ -207,7 +219,7 @@ subprojects { subproject ->
207219
apply plugin: 'project-report'
208220
}
209221

210-
if (!isTestSuite) {
222+
if (!isTestSuite && !isExample) {
211223

212224
apply plugin: 'maven-publish'
213225
apply plugin: 'signing'
@@ -248,36 +260,36 @@ subprojects { subproject ->
248260

249261
publications {
250262
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-
}
263+
// Historically async mapped the core libraries to different artifact ids
264+
Map mappedArtifactIds = [
265+
'grails-async-core' : 'grails-async',
266+
'grails-async-plugin' : 'async',
267+
'grails-events-core' : 'grails-events',
268+
'grails-events-plugin': 'events'
269+
270+
]
271+
if(mappedArtifactIds.containsKey(subproject.name)) {
272+
artifactId = mappedArtifactIds[subproject.name]
273+
}
263274

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-
}
275+
pom.withXml {
276+
def pomNode = asNode()
277+
pomNode.children().last() + pomInfo
269278

270-
developers {
271-
developer {
272-
id = 'graemerocher'
273-
name = 'Graeme Rocher'
274-
275-
}
276-
}
279+
// TODO - async move - Other grails projects are excluding dependency management, historically grails-core did not
280+
// now that async is moved in, it's no longer excluding it
277281
}
282+
278283
if (subproject.name != 'grails-bom') {
279284
from components.java
280285
}
286+
287+
if(isAsyncProject) {
288+
versionMapping {
289+
usage('java-api') { fromResolutionOf('runtimeClasspath') }
290+
usage('java-runtime') { fromResolutionResult() }
291+
}
292+
}
281293
}
282294
}
283295
}

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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,25 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1536M -XX:MaxMetaspaceSize=1024M
2525
# snapshot or documentation publishes.
2626
preventSnapshotPublish=false
2727

28-
# Generated on Mon Dec 23 19:03:18 EST 2024 by: ./gradlew :grails-bom:syncProps
28+
# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs
29+
# https://github.com/grails/grails-gradle-plugin/issues/222
30+
slf4jPreventExclusion=true
31+
32+
# Generated on Tue Jan 07 15:14:48 EST 2025 by: ./gradlew :grails-bom:syncProps
2933
# Only version value modifications allowed after this point. Do not insert or change version names.
3034
ant.version=1.10.15
3135
asciidoctorj.version=3.0.0
3236
asset-pipeline-gradle.version=5.0.5
3337
asset-pipeline-grails.version=5.0.5
34-
byte-buddy.version=1.15.5
3538
bootstrap.version=5.3.3
3639
bootstrap-icons.version=1.11.3
40+
byte-buddy.version=1.15.5
3741
commons-codec.version=1.17.1
3842
commons-text.version=1.12.0
3943
converters.version=6.0.0-SNAPSHOT
4044
directory-watcher.version=0.18.0
4145
flying-saucer-pdf-openpdf.version=9.4.0
4246
geb-spock.version=7.0
43-
grails-async.version=6.0.0-SNAPSHOT
4447
grails-datastore.version=9.0.0-SNAPSHOT
4548
grails-datastore-gorm-hibernate5.version=9.0.0-SNAPSHOT
4649
grails-datastore-gorm-mongodb.version=9.0.0-SNAPSHOT

gradle/assemble.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ tasks.register('zipDist', Zip) {
166166
exclude '**/CVS/**'
167167

168168
into("grails-$grailsVersion") {
169-
from(rootProject.layout.projectDirectory) {
169+
from(project.layout.projectDirectory) {
170170
// Some of these are probably not needed as they are not present in the project folder
171171
include 'bin/grails', 'bin/grails.bat', 'lib/', 'media/', 'samples/', 'scripts/', 'LICENSE', 'INSTALL', 'src/'
172172
exclude 'ant/bin', 'src/grails', 'src/war'

gradle/docs.gradle

Lines changed: 1 addition & 1 deletion
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'

grails-async/.github/dependabot.yml

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

grails-async/.github/release-drafter.yml

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

0 commit comments

Comments
 (0)