Skip to content

Commit 80cb031

Browse files
authored
Merge pull request #14953 from apache/micronautTests
feature - #14017 - add back Micronaut support to Grails 7 with optional plugin
2 parents 6f742f5 + a6c3581 commit 80cb031

File tree

90 files changed

+596
-281
lines changed

Some content is hidden

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

90 files changed

+596
-281
lines changed

RENAME.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Below is a reference of all migrated artifacts - both their old and new name.
112112
| org.grails.plugins | gsp | org.apache.grails | grails-gsp | | | grails-views |
113113
| org.grails | grails-gsp | org.apache.grails.views | grails-gsp-core | | | grails-views |
114114
| org.grails | grails-logging | org.apache.grails | grails-logging | | | grails-core |
115-
| org.grails | grails-plugin-i18n | org.apache.grails | grails-i18n | | | grails-core |
115+
| org.grails | grails-plugin-i18n | org.apache.grails.i18n | grails-i18n | | | grails-core |
116116
| org.grails | grails-plugin-interceptors | org.apache.grails | grails-interceptors | | | grails-core |
117117
| org.grails | grails-plugin-mimetypes | org.apache.grails | grails-mimetypes | | | grails-core |
118118
| org.grails.plugins | quartz | org.apache.grails | grails-quartz | | | grails-quartz |

etc/bin/rename_gradle_artifacts.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ declare -a core_mappings=(
6767
"org[.]grails:grails-plugin-rest|org.apache.grails:grails-rest-transforms"
6868
"org[.]grails:grails-plugin-mimetypes|org.apache.grails:grails-mimetypes"
6969
"org[.]grails:grails-plugin-interceptors|org.apache.grails:grails-interceptors"
70-
"org[.]grails:grails-plugin-i18n|org.apache.grails:grails-i18n"
70+
"org[.]grails:grails-plugin-i18n|REMOVE_ME" # i18n is now included by default and should not be included explicitly
7171
"org[.]grails:grails-plugin-domain-class|org.apache.grails:grails-domain-class"
7272
"org[.]grails:grails-plugin-datasource|org.apache.grails:grails-datasource"
7373
"org[.]grails:grails-plugin-databinding|org.apache.grails:grails-databinding"
@@ -109,7 +109,7 @@ declare -a excluded_core_mappings=(
109109
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-rest['\"]|exclude module:'grails-rest-transforms'"
110110
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-mimetypes['\"]|exclude module:'grails-mimetypes'"
111111
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-interceptors['\"]|exclude module:'grails-interceptors'"
112-
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-i18n['\"]|exclude module:'grails-i18n'"
112+
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-i18n['\"]|exclude module:'REMOVE_THIS_EXCLUDE'"
113113
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-domain-class['\"]|exclude module:'grails-domain-class'"
114114
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-datasource['\"]|exclude module:'grails-datasource'"
115115
"exclude[[:space:]]+module[[:space:]]*:[[:space:]]*['\"]grails-plugin-databinding['\"]|exclude module:'grails-databinding'"

gradle.properties

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,15 @@ apacheRatVersion=0.8.1
4949
gradleChecksumPluginVersion=1.4.0
5050
gradleLicensePluginVersion=0.16.1
5151

52+
# micronaut libraries not in the bom due to the potential for spring mismatches
53+
micronautPlatformVersion=4.9.2
54+
5255
# Libraries only specific to test apps, these should not be exposed
5356
grailsSpringSecurityVersion=7.0.0-SNAPSHOT
5457
jbossTransactionApiVersion=2.0.0.Final
55-
micronautVersion=4.9.10
56-
micronautSerdeJacksonVersion=2.15.1
58+
# note: we do not import the micronaut bom in our tests to avoid spring version mismatches
59+
micronautHttpClientVersion=4.9.9
60+
micronautSerdeJacksonVersion=2.11.0
5761

5862
# build dependencies for code quality checks
5963
checkstyleVersion=11.0.0

gradle/dependency-licenses.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
apply plugin: 'com.github.hierynomus.license-report'
2121

2222
List<String> licenseExclusions = rootProject.subprojects.collect {
23-
"org.apache.grails:${it.findProperty('pomArtifactId') ?: it.name}:${rootProject.projectVersion}" as String
23+
"${it.group}:${it.findProperty('pomArtifactId') ?: it.name}:${rootProject.projectVersion}" as String
2424
}
2525

2626
downloadLicenses {

gradle/java-config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tasks.withType(Javadoc).configureEach { Javadoc it ->
3434

3535
tasks.withType(GroovyCompile).configureEach {
3636
groovyOptions.encoding = 'UTF-8' // encoding needs to be the same since it's different across platforms
37-
// Preserve method parameter names in Groovy classes for IDE parameter hints.
37+
// Preserve method parameter names in Groovy/Java classes for IDE parameter hints & bean reflection metadata.
3838
groovyOptions.parameters = true
3939
options.encoding = 'UTF-8' // encoding needs to be the same since it's different across platforms
4040
options.fork = true

gradle/publish-root-config.gradle

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ version = projectVersion
2424
group = 'this.will.be.overridden'
2525

2626
def publishedProjects = [
27+
'grails-async',
2728
'grails-async-core',
2829
'grails-async-gpars',
29-
'grails-async',
3030
'grails-async-rxjava',
3131
'grails-async-rxjava2',
3232
'grails-async-rxjava3',
@@ -43,15 +43,15 @@ def publishedProjects = [
4343
'grails-databinding',
4444
'grails-databinding-core',
4545
'grails-datasource',
46-
'grails-dependencies-starter-web',
4746
'grails-dependencies-assets',
47+
'grails-dependencies-starter-web',
4848
'grails-dependencies-test',
4949
'grails-domain-class',
5050
'grails-encoder',
51+
'grails-events',
5152
'grails-events-compat',
5253
'grails-events-core',
5354
'grails-events-gpars',
54-
'grails-events',
5555
'grails-events-rxjava',
5656
'grails-events-rxjava2',
5757
'grails-events-rxjava3',
@@ -63,14 +63,15 @@ def publishedProjects = [
6363
'grails-gsp-core',
6464
'grails-i18n',
6565
'grails-interceptors',
66+
'grails-layout',
6667
'grails-logging',
68+
'grails-micronaut',
6769
'grails-mimetypes',
6870
'grails-rest-transforms',
6971
'grails-scaffolding',
7072
'grails-services',
7173
'grails-shell-cli',
7274
'grails-sitemesh3',
73-
'grails-layout',
7475
'grails-spring',
7576
'grails-taglib',
7677
'grails-test-core',
@@ -94,11 +95,11 @@ def publishedProjects = [
9495
'grails-web-taglib',
9596
'grails-web-url-mappings',
9697
// datastore
97-
'grails-datastore-async',
98-
'grails-datastore-core',
98+
'grails-datamapping-async',
9999
'grails-datamapping-core',
100100
'grails-datamapping-core-test',
101-
'grails-datamapping-async',
101+
'grails-datastore-async',
102+
'grails-datastore-core',
102103
//'grails-datamapping-rx',
103104
'grails-datamapping-support',
104105
'grails-datamapping-tck',
@@ -108,23 +109,23 @@ def publishedProjects = [
108109
// simple
109110
'grails-data-simple',
110111
// hibernate5
111-
'grails-data-hibernate5-spring-boot',
112-
'grails-data-hibernate5-dbmigration',
113-
'grails-data-hibernate5-core',
114112
'grails-data-hibernate5',
113+
'grails-data-hibernate5-core',
114+
'grails-data-hibernate5-dbmigration',
115+
'grails-data-hibernate5-spring-boot',
115116
// mongodb
116-
'grails-data-mongodb-spring-boot',
117-
'grails-data-mongodb-core',
117+
'grails-data-mongodb',
118118
'grails-data-mongodb-bson',
119+
'grails-data-mongodb-core',
119120
'grails-data-mongodb-ext',
120-
'grails-data-mongodb',
121121
'grails-data-mongodb-gson-templates',
122+
'grails-data-mongodb-spring-boot',
122123
// wrapper
123124
'grails-wrapper',
124125
// profiles
125126
'grails-profiles-base',
126-
'grails-profiles-profile',
127127
'grails-profiles-plugin',
128+
'grails-profiles-profile',
128129
'grails-profiles-rest-api',
129130
'grails-profiles-rest-api-plugin',
130131
'grails-profiles-web',

gradle/rat-root-config.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ tasks.named('rat') {
2121
def allExcludes = [
2222
'.asf.yaml', // ASF metadata for github integration excluded from src zip
2323
'CODE_OF_CONDUCT.md',
24-
'LICENSE',
25-
'NOTICE',
2624
'BUILD_DATE', // build artifact for storing the build date / verifying
2725
'CHECKSUMS', // build artifact for storing checksums for easy verification
2826
'PUBLISHED_ARTIFACTS', // build artifact for storing published artifacts coordinates & paths
@@ -34,7 +32,6 @@ tasks.named('rat') {
3432
'grails-web-common/src/main/groovy/org/grails/web/json/JSONElement.java',
3533
'grails-web-common/src/main/groovy/org/grails/web/json/JSONException.java',
3634
'grails-web-common/src/main/groovy/org/grails/web/json/JSONWriter.java',
37-
'gradle/wrapper/gradle-wrapper.properties', // gradle wrapper excluded from src zip
3835
'**/.gitattributes', // git configuration isn't code
3936
'**/.gradle/**', '**/wrapper/**', 'gradlew*', // gradle wrapper files excluded from src zip
4037
'**/*.html', // html files are only in test

grails-async/plugin/src/main/groovy/org/grails/plugins/web/async/ControllersAsyncGrailsPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import org.grails.plugins.web.async.spring.PromiseFactoryBean
3131
*/
3232
class ControllersAsyncGrailsPlugin extends Plugin {
3333

34-
def grailsVersion = '7.0.0 > *'
34+
def grailsVersion = '7.0.0-SNAPSHOT > *'
3535
def loadAfter = ['controllers']
3636
Closure doWithSpring() {
3737
{ ->

grails-cache/src/main/groovy/grails/plugin/cache/CacheGrailsPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import org.grails.plugin.cache.GrailsCacheManager
3030
@Slf4j
3131
class CacheGrailsPlugin extends Plugin {
3232

33-
def grailsVersion = '7.0.0 > *'
33+
def grailsVersion = '7.0.0-SNAPSHOT > *'
3434
def observe = ['controllers', 'services']
3535
def loadAfter = ['controllers', 'services']
3636
def authorEmail = '[email protected]'

grails-controllers/src/main/groovy/org/grails/plugins/web/controllers/ControllersAutoConfiguration.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,16 @@
4444

4545
import grails.config.Settings;
4646
import grails.core.GrailsApplication;
47+
import org.grails.plugins.domain.GrailsDomainClassAutoConfiguration;
4748
import org.grails.web.config.http.GrailsFilters;
4849
import org.grails.web.filters.HiddenHttpMethodFilter;
4950
import org.grails.web.servlet.mvc.GrailsDispatcherServlet;
5051
import org.grails.web.servlet.mvc.GrailsWebRequestFilter;
5152

52-
@AutoConfiguration(before = { HttpEncodingAutoConfiguration.class, WebMvcAutoConfiguration.class })
53+
@AutoConfiguration(
54+
before = {HttpEncodingAutoConfiguration.class, WebMvcAutoConfiguration.class},
55+
after = {GrailsDomainClassAutoConfiguration.class}
56+
)
5357
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
5458
public class ControllersAutoConfiguration {
5559

0 commit comments

Comments
 (0)