Skip to content

Commit 1574415

Browse files
authored
Merge pull request #80 from grails-plugins/grails7m5
feat: update to Grails 7.0.0-M5 and setup project for forward compatibility
2 parents 6207306 + cc89acd commit 1574415

File tree

8 files changed

+49
-80
lines changed

8 files changed

+49
-80
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mailService.sendMail {
3030
| 2.x | 3 |
3131
| 3.x | 4-5 |
3232
| 4.x | 6 |
33-
| 5.x | 7 |
33+
| 5.x | 7.0.0-M5+ |
3434

3535
## Issues
3636

build.gradle

Lines changed: 18 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -8,89 +8,33 @@ apply plugin: 'org.apache.grails.gradle.grails-publish'
88

99
repositories {
1010
mavenCentral()
11-
maven { url = 'https://repo.grails.org/grails/core' }
12-
maven { url = 'https://repository.apache.org/content/repositories/snapshots' }
11+
maven { url = 'https://repo.grails.org/grails/restricted' }
12+
maven {
13+
url = 'https://repository.apache.org/content/groups/snapshots'
14+
content {
15+
includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
16+
}
17+
}
1318
}
1419

1520
dependencies {
1621

17-
implementation(platform("org.apache.grails:grails-bom:$grailsVersion"))
18-
19-
api 'org.apache.grails:grails-gsp', {
20-
// api: GroovyPageTemplate, GroovyPagesTemplateEngine
21-
}
22-
api 'org.apache.grails.web:grails-web-common', {
23-
// api: GroovyPagesUriService
24-
// impl: GrailsWebRequest, WrappedResponseHolder
25-
}
26-
api 'org.springframework:spring-beans', {
27-
// api: DisposableBean, InitializingBean
28-
// impl: @Autowired(runtime), @Qualifier(runtime)
29-
}
30-
api 'org.springframework:spring-context', {
31-
// api: ApplicationContext, JndiObjectFactoryBean
32-
// impl: @Bean(runtime)
33-
}
34-
api 'org.springframework:spring-context-support', {
35-
// api: JavaMailSender, MailMessage, MailSender, SimpleMailMessage
36-
// impl: JavaMailSenderImpl, MimeMailMessage, MimeMessageHelper
37-
}
38-
api 'org.springframework:spring-core', {
39-
// api: InputStreamSource
40-
// impl: Assert, ByteArrayResource, FileSystemResource, PropertiesPropertySource, StringUtils
41-
}
22+
compileOnly platform("org.apache.grails:grails-bom:$grailsVersion")
23+
compileOnly 'org.apache.grails:grails-dependencies-starter-web'
4224

43-
implementation 'org.apache.grails.views:grails-web-taglib', {
44-
// for taglib support
45-
}
46-
implementation 'org.apache.grails.web:grails-web-url-mappings', {
47-
// impl: LinkGenerator
48-
}
49-
implementation 'org.apache.groovy:groovy-templates', {
50-
// impl: Template
51-
}
52-
implementation 'org.eclipse.angus:jakarta.mail', {
25+
// avoid pulling the bom in to set this version, instead use a property
26+
implementation "org.eclipse.angus:jakarta.mail:$jakartaMailImplVersion", {
5327
// impl: SMTPMessage
5428
}
55-
implementation 'org.springframework:spring-web', {
56-
// impl: RequestContextHolder
57-
}
58-
implementation 'org.springframework:spring-webmvc', {
59-
// impl: DispatcherServlet, FixedLocaleResolver, RequestContextUtils
60-
}
61-
implementation 'org.springframework.boot:spring-boot', {
62-
// impl: Bindable, Binder, @ConfigurationProperties, ConfigurationPropertySources,
63-
// @EnableConfigurationProperties(runtime)
64-
}
65-
implementation 'org.springframework.boot:spring-boot-autoconfigure', {
66-
// impl: @AutoConfiguration(runtime), @ConditionalOnMissingBean(runtime), @ConditionalOnProperty(runtime)
67-
}
6829

6930
compileOnlyApi 'jakarta.mail:jakarta.mail-api', {
7031
// api: Message, Session
7132
// impl: MimeMessage, MimeUtility
7233
}
7334

74-
compileOnly 'jakarta.inject:jakarta.inject-api', { // Used by Spring DI
75-
// impl: @Inject(runtime)
76-
}
77-
compileOnly 'jakarta.servlet:jakarta.servlet-api', { // Provided by the servlet container
78-
// impl: Cookie, HttpServletResponse, HttpServletRequest
79-
}
80-
compileOnly 'org.apache.grails:grails-core', { // Provided as this is a Grails plugin
81-
// api: Config, GrailsApplication, GrailsPluginManager, Plugin
82-
// impl: @Artefact(runtime), @Enhances(runtime)
83-
}
84-
compileOnly 'org.apache.groovy:groovy' // Provided as this is a Grails plugin
85-
86-
testImplementation 'jakarta.servlet:jakarta.servlet-api', {
87-
// impl: ServletContext
88-
}
89-
testImplementation 'org.apache.grails.testing:grails-testing-support-core', {
90-
// impl: GrailsUnitTest
91-
}
92-
testImplementation 'org.spockframework:spock-core'
93-
35+
testImplementation platform("org.apache.grails:grails-bom:$grailsVersion")
36+
testImplementation 'org.apache.grails:grails-dependencies-starter-web'
37+
testImplementation 'org.apache.grails:grails-dependencies-test'
9438
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
9539
}
9640

@@ -123,3 +67,7 @@ tasks.withType(Test).configureEach {
12367
compileJava.options.release = javaVersion.toInteger()
12468

12569
apply from: layout.projectDirectory.file('gradle/docs-config.gradle')
70+
71+
grails {
72+
springDependencyManagement = false
73+
}

buildSrc/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ file('../gradle.properties').withInputStream {
1010
}
1111

1212
repositories {
13-
maven { url = 'https://repo.grails.org/grails/core' }
14-
maven { url = 'https://repository.apache.org/content/repositories/snapshots' }
13+
maven { url = 'https://repo.grails.org/grails/restricted' }
14+
maven {
15+
url = 'https://repository.apache.org/content/groups/snapshots'
16+
content {
17+
includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
18+
}
19+
}
1520
}
1621

1722
dependencies {

examples/testapp1/build.gradle

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ version = '0.1'
1212
group = 'testapp1'
1313

1414
apply plugin: 'org.apache.grails.gradle.grails-web'
15-
apply plugin: 'com.bertramlabs.asset-pipeline'
15+
apply plugin: 'org.apache.grails.gradle.grails-gsp'
16+
apply plugin: 'cloud.wondrify.asset-pipeline'
1617

1718
repositories {
18-
maven { url = 'https://repo.grails.org/grails/core' }
19-
maven { url = 'https://repository.apache.org/content/repositories/snapshots' }
19+
maven { url = 'https://repo.grails.org/grails/restricted' }
20+
maven {
21+
url = 'https://repository.apache.org/content/groups/snapshots'
22+
content {
23+
includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
24+
}
25+
}
2026
}
2127

2228
dependencies {
@@ -33,7 +39,7 @@ dependencies {
3339
testAndDevelopmentOnly 'org.webjars.npm:bootstrap-icons'
3440
testAndDevelopmentOnly 'org.webjars.npm:jquery'
3541

36-
runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails'
42+
runtimeOnly 'cloud.wondrify:asset-pipeline-grails'
3743
runtimeOnly 'org.fusesource.jansi:jansi'
3844
runtimeOnly 'org.apache.grails:grails-services'
3945
runtimeOnly 'org.apache.grails:grails-i18n'

examples/testapp1/buildSrc/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ file('../../../gradle.properties').withInputStream {
99
}
1010

1111
repositories {
12-
maven { url = 'https://repo.grails.org/grails/core' }
13-
maven { url = 'https://repository.apache.org/content/repositories/snapshots' }
12+
maven { url = 'https://repo.grails.org/grails/restricted' }
13+
maven {
14+
url = 'https://repository.apache.org/content/groups/snapshots'
15+
content {
16+
includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT')
17+
}
18+
}
1419
}
1520

1621
dependencies {
1722
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
18-
implementation 'com.bertramlabs.plugins:asset-pipeline-gradle'
23+
implementation 'cloud.wondrify:asset-pipeline-gradle'
1924
implementation 'org.apache.grails:grails-gradle-plugins'
2025
}

examples/testapp1/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The plugin is compiled with snapshot for forward compatibility, but the test app uses the stable version
2+
grailsVersion=7.0.0-M5
3+
14
# More versions are inherited from ../../gradle.properties
25
greenmailVersion=2.1.2
36

examples/testapp1/settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ buildCache {
2828
rootProject.name = 'testapp1'
2929

3030
includeBuild('../../../grails-mail') {
31+
name = 'grails-mail'
3132
dependencySubstitution {
3233
substitute module('org.grails.plugins:grails-mail') using project(':')
3334
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ projectVersion=5.0.1-SNAPSHOT
22

33
grailsVersion=7.0.0-SNAPSHOT
44
javaVersion=17
5+
jakartaMailImplVersion=2.0.3
56

67
asciidoctorGradlePluginVersion=4.0.4
78

0 commit comments

Comments
 (0)