Skip to content

Commit

Permalink
Integrate async project
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
jdaugherty committed Jan 7, 2025
1 parent 26a61c7 commit ea3ca1a
Show file tree
Hide file tree
Showing 256 changed files with 194 additions and 6,006 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
permissions:
contents: read # to fetch code (actions/checkout)
strategy:
fail-fast: false
matrix:
java: [17, 21, 23]
os: [ubuntu-latest, windows-latest, macos-latest]
Expand All @@ -53,7 +54,7 @@ jobs:
env:
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
run: ./gradlew build assemble groovydoc
run: ./gradlew build assemble groovydoc --continue
publish:
if: github.event_name == 'push' && needs.skip_check.outputs.found_skip_publish != 'true'
needs: build
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ classes
*.log
*.ipr
*.iml
*.db
*.iws
*.hprof
idea
Expand All @@ -23,7 +24,7 @@ stacktrace.log
/dist
/idea-target
target
/build
build
/grails.iws
.gradle
.DS_Store
Expand Down
78 changes: 45 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,23 @@ apply from: "gradle/idea.gradle"
subprojects { subproject ->

version = grailsVersion
group = "org.grails"

ext.isTestSuite = subproject.name.startsWith("grails-test-suite")
ext.isExample = subproject.name.contains("grails-test-examples")
ext.isPlugin = subproject.name in ['grails-async-plugin', 'grails-events-plugin']
ext.isCiBuild = subproject.hasProperty("isCiBuild") || System.getenv().get("CI") as Boolean
ext.isAsyncProject = subproject.name.startsWith('grails-async') || subproject.name.startsWith('grails-events')

if(isPlugin) {
group = 'org.grails.plugins'
}
else {
group = "org.grails"
}

ext.pomInfo = {
delegate.name 'Grails® framework'
delegate.description 'Grails Web Application Framework'
delegate.name isAsyncProject ? 'Grails Async Framework' : 'Grails® framework'
delegate.description isAsyncProject ? 'Grails Async Libraries' : 'Grails Web Application Framework'
delegate.url 'https://grails.org/'

delegate.licenses {
Expand All @@ -189,14 +199,16 @@ subprojects { subproject ->
delegate.developerConnection 'scm:git@github.com:grails/grails-core.git'
}

List developers = isAsyncProject ? ['Graeme Rocher', 'Mattias Reichel'] : ['Graeme Rocher']
delegate.developers {
delegate.developer {
delegate.id 'graemerocher'
delegate.name 'Graeme Rocher'
delegate.email 'grails-build@users.noreply.github.com'
for (dev in developers) {
delegate.developer {
delegate.id dev.toLowerCase().replace(' ', '')
delegate.name dev.strip()
delegate.email 'grails-build@users.noreply.github.com'
}
}
}

}

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

if (!isTestSuite) {
if (!isTestSuite && !isExample) {

apply plugin: 'maven-publish'
apply plugin: 'signing'
Expand Down Expand Up @@ -248,36 +260,36 @@ subprojects { subproject ->

publications {
maven(MavenPublication) {
pom {
name = 'Grails® framework'
description = 'Grails Web Application Framework'
url = 'https://grails.org/'

licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
// Historically async mapped the core libraries to different artifact ids
Map mappedArtifactIds = [
'grails-async-core' : 'grails-async',
'grails-async-plugin' : 'async',
'grails-events-core' : 'grails-events',
'grails-events-plugin': 'events'

]
if(mappedArtifactIds.containsKey(subproject.name)) {
artifactId = mappedArtifactIds[subproject.name]
}

scm {
url = 'scm:git@github.com:grails/grails-core.git'
connection = 'scm:git@github.com:grails/grails-core.git'
developerConnection = 'scm:git@github.com:grails/grails-core.git'
}
pom.withXml {
def pomNode = asNode()
pomNode.children().last() + pomInfo

developers {
developer {
id = 'graemerocher'
name = 'Graeme Rocher'
email = 'grails-build@users.noreply.github.com'
}
}
// TODO - async move - Other grails projects are excluding dependency management, historically grails-core did not
// now that async is moved in, it's no longer excluding it
}

if (subproject.name != 'grails-bom') {
from components.java
}

if(isAsyncProject) {
versionMapping {
usage('java-api') { fromResolutionOf('runtimeClasspath') }
usage('java-runtime') { fromResolutionResult() }
}
}
}
}
}
Expand Down
12 changes: 0 additions & 12 deletions dependabot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ dependencies {
api "org.webjars.npm:bootstrap-icons:${project['bootstrap-icons.version']}"
api "org.webjars.npm:jquery:${project['jquery.version']}"
api "org.gebish:geb-spock:${project['geb-spock.version']}"
api "org.grails.plugins:async:${project['grails-async.version']}"
api "org.grails.plugins:events:${project['grails-async.version']}"
api "org.grails:grails-async:${project['grails-async.version']}"
api "org.grails:grails-async-gpars:${project['grails-async.version']}"
api "org.grails:grails-async-rxjava:${project['grails-async.version']}"
api "org.grails:grails-async-rxjava2:${project['grails-async.version']}"
api "org.grails:grails-events-gpars:${project['grails-async.version']}"
api "org.grails:grails-events-rxjava:${project['grails-async.version']}"
api "org.grails:grails-events-rxjava2:${project['grails-async.version']}"
api "org.grails:grails-events-compat:${project['grails-async.version']}"
api "org.grails:grails-events-spring:${project['grails-async.version']}"
api "org.grails:grails-events-transform:${project['grails-async.version']}"
api "org.grails:grails-datastore-gorm-hibernate5:${project['grails-datastore-gorm-hibernate5.version']}"
api "org.grails:grails-datastore-gorm-mongodb:${project['grails-datastore-gorm-mongodb.version']}"
api "org.grails:grails-datastore-async:${project['grails-datastore.version']}"
Expand Down
9 changes: 6 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,25 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1536M -XX:MaxMetaspaceSize=1024M
# snapshot or documentation publishes.
preventSnapshotPublish=false

# Generated on Mon Dec 23 19:03:18 EST 2024 by: ./gradlew :grails-bom:syncProps
# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs
# https://github.com/grails/grails-gradle-plugin/issues/222
slf4jPreventExclusion=true

# Generated on Tue Jan 07 15:14:48 EST 2025 by: ./gradlew :grails-bom:syncProps
# Only version value modifications allowed after this point. Do not insert or change version names.
ant.version=1.10.15
asciidoctorj.version=3.0.0
asset-pipeline-gradle.version=5.0.5
asset-pipeline-grails.version=5.0.5
byte-buddy.version=1.15.5
bootstrap.version=5.3.3
bootstrap-icons.version=1.11.3
byte-buddy.version=1.15.5
commons-codec.version=1.17.1
commons-text.version=1.12.0
converters.version=6.0.0-SNAPSHOT
directory-watcher.version=0.18.0
flying-saucer-pdf-openpdf.version=9.4.0
geb-spock.version=7.0
grails-async.version=6.0.0-SNAPSHOT
grails-datastore.version=9.0.0-SNAPSHOT
grails-datastore-gorm-hibernate5.version=9.0.0-SNAPSHOT
grails-datastore-gorm-mongodb.version=9.0.0-SNAPSHOT
Expand Down
7 changes: 4 additions & 3 deletions gradle/assemble.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ tasks.register('sourcesJars', Sync) {
from rootProject.subprojects.findAll { subproject ->
!subproject.name.startsWith('grails-test-suite') &&
!subproject.name.startsWith('grails-dependencies') &&
!subproject.name.startsWith('grails-bom')
!subproject.name.startsWith('grails-bom') &&
!subproject.name.contains("grails-test-examples")
}.sourcesJar*.outputs*.files
// sourcesFor comes from GrailsBuildPlugin
from {
Expand Down Expand Up @@ -149,7 +150,7 @@ class GrailsCreateStartScripts extends CreateStartScripts {
tasks.register('install') { task ->
dependsOn 'populateDependencies', 'grailsCreateStartScripts'
subprojects { Project project ->
if(!project.name.startsWith('grails-test-suite')) {
if(!project.name.startsWith('grails-test-suite') && !project.name.startsWith('grails-test-examples')) {
task.dependsOn("$project.name:publishToMavenLocal")
}
}
Expand All @@ -166,7 +167,7 @@ tasks.register('zipDist', Zip) {
exclude '**/CVS/**'

into("grails-$grailsVersion") {
from(rootProject.layout.projectDirectory) {
from(project.layout.projectDirectory) {
// Some of these are probably not needed as they are not present in the project folder
include 'bin/grails', 'bin/grails.bat', 'lib/', 'media/', 'samples/', 'scripts/', 'LICENSE', 'INSTALL', 'src/'
exclude 'ant/bin', 'src/grails', 'src/war'
Expand Down
4 changes: 2 additions & 2 deletions gradle/docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tasks.register('docs') {
}

task javadoc(type:Javadoc, group: 'documentation') {
def subs = subprojects.findAll { it.name != 'grails-dependencies' && it.name != 'grails-bom' }
def subs = subprojects.findAll { it.name != 'grails-dependencies' && it.name != 'grails-bom' && !it.name.startsWith("grails-test-suite") && !it.name.contains("grails-test-examples") }
classpath = files(subs.configurations.compileClasspath)
dependsOn stubs
maxMemory = '256M'
Expand All @@ -94,7 +94,7 @@ task javadoc(type:Javadoc, group: 'documentation') {
tasks.register('groovydoc', Groovydoc) {
final Set<Project> subProjects = subprojects.findAll {
!(it.name in ['grails-dependencies', 'grails-bom', 'grails-bootstrap', 'grails-gradle-model', 'grails-shell'])
&& !it.name.startsWith("grails-test-suite") }
&& !it.name.startsWith("grails-test-suite") && !it.name.contains("grails-test-examples") }
def groovydocClasspath = files(configurations.documentation + subProjects.configurations.compileClasspath)
// exclude problematic jar file from javadoc classpath
// http://www.adam-bien.com/roller/abien/entry/trouble_with_crippled_java_ee
Expand Down
13 changes: 0 additions & 13 deletions grails-async/.github/dependabot.yml

This file was deleted.

134 changes: 0 additions & 134 deletions grails-async/.github/release-drafter.yml

This file was deleted.

Loading

0 comments on commit ea3ca1a

Please sign in to comment.