Skip to content

Commit 19f258c

Browse files
committed
feedback:
* rename projects to have common prefixes * spell mistakes * build action cleanup * update documentation * fix styling * serialize mongo tests because they have a shared resource (the db) * update asset serialization (asset-pipeline#177) to be lazy
1 parent af64464 commit 19f258c

File tree

828 files changed

+163
-189
lines changed

Some content is hidden

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

828 files changed

+163
-189
lines changed

.github/workflows/gradle.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
java: [ 17, 21 ]
20-
mongodb-version: [ '4', '5', '6', '7', '8' ]
2120
steps:
2221
- name: "📥 Checkout the repository"
2322
uses: actions/checkout@v4
@@ -30,15 +29,11 @@ jobs:
3029
uses: gradle/actions/setup-gradle@v4
3130
with:
3231
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
33-
- name: "▶️ Start MongoDB (needed for some tests)"
34-
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # v1.12.0 (Use commit sha as this is a 3rd party action)
35-
with:
36-
mongodb-version: ${{ matrix.mongodb-version }}
3732
- name: "🔨 Run Build"
3833
id: build
3934
env:
4035
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
41-
run: ./gradlew build --continue -PonlyDatatstoreTests
36+
run: ./gradlew build --continue -PonlyDatastoreTests
4237
mongodb-build:
4338
name: "Build Mongodb Project"
4439
runs-on: ubuntu-24.04
@@ -161,7 +156,7 @@ jobs:
161156
trigger-build-gorm-impls:
162157
if: github.event_name == 'push'
163158
name: "Trigger Build in GORM Implementations"
164-
needs: [datastore-build, mongodb-build, hibernate5-build, publish]
159+
needs: [publish]
165160
runs-on: ubuntu-24.04
166161
continue-on-error: true
167162
steps:
@@ -182,13 +177,4 @@ jobs:
182177
workflow: Java CI
183178
repo: grails/gorm-hibernate6
184179
ref: ${{ steps.extract_branch.outputs.value }}
185-
token: ${{ secrets.GH_TOKEN }}
186-
- name: "📡 Invoke the Java CI workflow in GORM MongoDB"
187-
continue-on-error: true
188-
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
189-
with:
190-
workflow: Java CI
191-
repo: grails/gorm-mongodb
192-
ref: ${{ steps.extract_branch.outputs.value }}
193-
token: ${{ secrets.GH_TOKEN }}
194-
inputs: ${{ steps.dispatch_message.outputs.value }}
180+
token: ${{ secrets.GH_TOKEN }}

build.gradle

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ version = projectVersion
5454
group = 'this.will.be.overridden'
5555

5656
def publishedProjects = [
57+
// datastore
5758
'grails-datastore-async',
5859
'grails-datastore-core',
5960
'grails-datastore-gorm',
@@ -65,30 +66,24 @@ def publishedProjects = [
6566
'grails-datastore-gorm-validation',
6667
'grails-datastore-web',
6768
'grails-gorm-testing-support',
68-
'database-migration-hibernate5',
69-
'gorm-hibernate5-spring-boot',
70-
'grails-datastore-gorm-hibernate5',
69+
// hibernate5
70+
'hibernate5-boot-plugin',
71+
'hibernate5-database-migration',
72+
'hibernate5-gorm',
7173
'hibernate5-grails-plugin',
72-
'gorm-mongodb-spring-boot',
73-
'grails-datastore-gorm-bson',
74-
'grails-datastore-gorm-mongodb',
75-
'grails-datastore-gorm-mongodb-ext',
74+
// mongodb
75+
'mongodb-boot-plugin',
76+
'mongodb-gorm',
77+
'mongodb-gorm-bson',
78+
'mongodb-gorm-ext',
7679
'mongodb-grails-plugin',
77-
'views-json-templates'
80+
'mongodb-views-json-templates'
7881
]
79-
subprojects { Project subproject ->
82+
subprojects {
8083
if (name in publishedProjects) {
8184
// This has to be applied here
8285
apply plugin: 'org.grails.grails-publish'
8386
}
84-
85-
// asset-pipeline #177 work around for parallel builds
86-
subproject.afterEvaluate {
87-
Task assetTask = subproject.tasks.findByName('assetCompile')
88-
if(assetTask) {
89-
assetTask.outputs.dir rootProject.layout.buildDirectory.dir("asset-serialize")
90-
}
91-
}
9287
}
9388

9489
apply from: layout.projectDirectory.file('gradle/documentation-config.gradle')

buildSrc/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ repositories {
2525
dependencies {
2626
implementation platform("org.grails:grails-bom:${versions.getProperty('grailsVersion')}")
2727
implementation 'org.grails:grails-gradle-plugin'
28-
runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-gradle'
29-
runtimeOnly 'org.grails.plugins:views-gradle'
28+
implementation 'com.bertramlabs.plugins:asset-pipeline-gradle'
29+
implementation 'org.grails.plugins:views-gradle'
30+
implementation 'org.springframework.boot:spring-boot-gradle-plugin'
3031
}

docs/data-mapping-website/src/main/resources/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ <h2 class='icon icon-lab'>Socialize</h2>
8282
<div class='navbar-collapse collapse'>
8383
<ul class='nav navbar-nav navbar-right'>
8484
<li class=''><a href='whatsNew/manual/index.html'>What's New?</a></li>
85-
<li class=''><a href='hibernate/manual/index.html'>Documentation</a></li>
86-
<li class=''><a href='hibernate/api/index.html'>Core API</a></li>
85+
<li class=''><a href='hibernate5/manual/index.html'>Documentation</a></li>
86+
<li class=''><a href='hibernate5/api/index.html'>Core API</a></li>
8787
<li class=''><a href='developer/manual/index.html'>Developer Guide</a></li>
8888
<li class=''><a href='https://grails.org/support.html'>Support</a></li>
8989
<li>
@@ -114,7 +114,7 @@ <h1>Hibernate</h1>
114114
<p>The original implementation of GORM, GORM for Hibernate provides all the goodness of GORM for SQL databases.
115115

116116
</p>
117-
<p>- <a href="hibernate/manual/index.html">Documentation</a> - <a href="hibernate/api/index.html">API</a> - <a href="https://github.com/grails/gorm-hibernate5">Source</a>
117+
<p>- <a href="hibernate5/manual/index.html">Documentation</a> - <a href="hibernate5/api/index.html">API</a> - <a href="https://github.com/grails/gorm-hibernate5">Source</a>
118118

119119
</p>
120120
</article>

docs/guide-rx/src/main/docs/gettingStarted/CRUD.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Book.get(id)
6060
}
6161
----
6262

63-
The `switchMap` transforms an `Observable` and converts the result into another `Observable`. However, this is not the most efficient way to perform updates as you can use https://gorm.grails.org/latest/hibernate/manual/index.html#whereQueries[where queries] to update an instance without retrieving it:
63+
The `switchMap` transforms an `Observable` and converts the result into another `Observable`. However, this is not the most efficient way to perform updates as you can use https://gorm.grails.org/latest/hibernate5/manual/index.html#whereQueries[where queries] to update an instance without retrieving it:
6464

6565

6666
[source,groovy]

docs/guide-rx/src/main/docs/querying/dynamicFinders.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=== Dynamic Finders
2-
Although _Where queries_ are preferred, _Dynamic finders_ are another option for simple queries and are also very expressive. The https://gorm.grails.org/latest/hibernate/manual/index.html#finders[syntax for Dynamic finders is described in the GORM user guide]. The major difference in RxGORM is that all dynamic finders return an `rx.Observable`:
2+
Although _Where queries_ are preferred, _Dynamic finders_ are another option for simple queries and are also very expressive. The https://gorm.grails.org/latest/hibernate5/manual/index.html#finders[syntax for Dynamic finders is described in the GORM user guide]. The major difference in RxGORM is that all dynamic finders return an `rx.Observable`:
33

44
[source,groovy]
55
----

docs/guide-rx/src/main/docs/querying/index.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
== Querying
22
RxGORM supports all the typical ways of querying that you are used to with GORM including:
33

4-
* https://gorm.grails.org/latest/hibernate/manual/index.html#finders[Dynamic finders]
5-
* https://gorm.grails.org/latest/hibernate/manual/index.html#whereQueries[Where queries]
6-
* https://gorm.grails.org/latest/hibernate/manual/index.html#detachedCriteria[Detached Criteria]
7-
* https://gorm.grails.org/latest/hibernate/manual/index.html#criteria[Criteria queries]
4+
* https://gorm.grails.org/latest/hibernate5/manual/index.html#finders[Dynamic finders]
5+
* https://gorm.grails.org/latest/hibernate5/manual/index.html#whereQueries[Where queries]
6+
* https://gorm.grails.org/latest/hibernate5/manual/index.html#detachedCriteria[Detached Criteria]
7+
* https://gorm.grails.org/latest/hibernate5/manual/index.html#criteria[Criteria queries]
88
99
The major difference is that all query operations return an `Observable`. In this section we will go through the various ways you can query for GORM objects.
1010

docs/guide-rx/src/main/docs/querying/whereQueries.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ Book.where { title == 'The Stand' }
3737
}
3838
----
3939

40-
For more information on the syntax of where queries see the https://gorm.grails.org/latest/hibernate/manual/index.html#whereQueries[relevant section in the GORM documentation].
40+
For more information on the syntax of where queries see the https://gorm.grails.org/latest/hibernate5/manual/index.html#whereQueries[relevant section in the GORM documentation].

gradle/documentation-config.gradle

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,36 @@ tasks.register('data-mapping-groovydoc', Groovydoc) {
5656
}
5757
}
5858

59-
tasks.register('copyGormImplementationDocs', Copy) {
60-
dependsOn(':grails-data-hibernate5-docs:docs', ':grails-data-mongodb-docs:docs')
59+
tasks.register('copyMongodbDocs', Copy) {
60+
dependsOn(':mongodb-docs:docs')
6161

62-
def hibernate5SourceDir = project(':hibernate5-docs').layout.buildDirectory.dir('docs')
6362
def mongodbSourceDir = project(':mongodb-docs').layout.buildDirectory.dir('docs')
64-
def targetDir = rootProject.layout.buildDirectory.dir('docs')
63+
def targetDir = rootProject.layout.buildDirectory.dir('docs/mongodb')
6564

66-
from(hibernate5SourceDir, mongodbSourceDir)
65+
from(mongodbSourceDir)
6766
into(targetDir)
6867

69-
inputs.dir(hibernate5SourceDir)
7068
inputs.dir(mongodbSourceDir)
7169
outputs.dir(targetDir)
7270
}
7371

72+
tasks.register('copyHibernate5Docs', Copy) {
73+
dependsOn(':hibernate5-docs:docs')
74+
75+
def hibernate5SourceDir = project('::hibernate5-docs').layout.buildDirectory.dir('docs')
76+
def targetDir = rootProject.layout.buildDirectory.dir('docs/hibernate5')
77+
78+
from(hibernate5SourceDir)
79+
into(targetDir)
80+
81+
inputs.dir(hibernate5SourceDir)
82+
outputs.dir(targetDir)
83+
}
84+
7485
tasks.register('docs') {
7586
group = 'documentation'
7687
dependsOn(':data-mapping-groovydoc')
77-
finalizedBy('copyRootWebsite','copyGuides', 'copyGormImplementationDocs')
88+
finalizedBy('copyRootWebsite','copyGuides', 'copyMongodbDocs', 'copyHibernate5Docs')
7889
}
7990

8091
tasks.register('copyRootWebsite', Copy) {

gradle/hibernate5-test-config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ dependencies {
44

55
tasks.withType(Test).configureEach {
66
onlyIf {
7-
if(project.hasProperty('skipHibernate5Tests')) {
7+
if (project.hasProperty('skipHibernate5Tests')) {
88
return false
99
}
1010

11-
if(project.hasProperty('onlyMongodbTests')) {
11+
if (project.hasProperty('onlyMongodbTests')) {
1212
return false
1313
}
1414

15-
if(project.hasProperty('onlyDatastoreTests')) {
15+
if (project.hasProperty('onlyDatastoreTests')) {
1616
return false
1717
}
1818

0 commit comments

Comments
 (0)