diff --git a/README.md b/README.md index 10daa0e8..0a8c293e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ mailService.sendMail { | 2.x | 3 | | 3.x | 4-5 | | 4.x | 6 | -| 5.x | 7 | +| 5.x | 7.0.0-M5+ | ## Issues diff --git a/build.gradle b/build.gradle index 4782e0aa..812847cb 100644 --- a/build.gradle +++ b/build.gradle @@ -8,89 +8,33 @@ apply plugin: 'org.apache.grails.gradle.grails-publish' repositories { mavenCentral() - maven { url = 'https://repo.grails.org/grails/core' } - maven { url = 'https://repository.apache.org/content/repositories/snapshots' } + maven { url = 'https://repo.grails.org/grails/restricted' } + maven { + url = 'https://repository.apache.org/content/groups/snapshots' + content { + includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT') + } + } } dependencies { - implementation(platform("org.apache.grails:grails-bom:$grailsVersion")) - - api 'org.apache.grails:grails-gsp', { - // api: GroovyPageTemplate, GroovyPagesTemplateEngine - } - api 'org.apache.grails.web:grails-web-common', { - // api: GroovyPagesUriService - // impl: GrailsWebRequest, WrappedResponseHolder - } - api 'org.springframework:spring-beans', { - // api: DisposableBean, InitializingBean - // impl: @Autowired(runtime), @Qualifier(runtime) - } - api 'org.springframework:spring-context', { - // api: ApplicationContext, JndiObjectFactoryBean - // impl: @Bean(runtime) - } - api 'org.springframework:spring-context-support', { - // api: JavaMailSender, MailMessage, MailSender, SimpleMailMessage - // impl: JavaMailSenderImpl, MimeMailMessage, MimeMessageHelper - } - api 'org.springframework:spring-core', { - // api: InputStreamSource - // impl: Assert, ByteArrayResource, FileSystemResource, PropertiesPropertySource, StringUtils - } + compileOnly platform("org.apache.grails:grails-bom:$grailsVersion") + compileOnly 'org.apache.grails:grails-dependencies-starter-web' - implementation 'org.apache.grails.views:grails-web-taglib', { - // for taglib support - } - implementation 'org.apache.grails.web:grails-web-url-mappings', { - // impl: LinkGenerator - } - implementation 'org.apache.groovy:groovy-templates', { - // impl: Template - } - implementation 'org.eclipse.angus:jakarta.mail', { + // avoid pulling the bom in to set this version, instead use a property + implementation "org.eclipse.angus:jakarta.mail:$jakartaMailImplVersion", { // impl: SMTPMessage } - implementation 'org.springframework:spring-web', { - // impl: RequestContextHolder - } - implementation 'org.springframework:spring-webmvc', { - // impl: DispatcherServlet, FixedLocaleResolver, RequestContextUtils - } - implementation 'org.springframework.boot:spring-boot', { - // impl: Bindable, Binder, @ConfigurationProperties, ConfigurationPropertySources, - // @EnableConfigurationProperties(runtime) - } - implementation 'org.springframework.boot:spring-boot-autoconfigure', { - // impl: @AutoConfiguration(runtime), @ConditionalOnMissingBean(runtime), @ConditionalOnProperty(runtime) - } compileOnlyApi 'jakarta.mail:jakarta.mail-api', { // api: Message, Session // impl: MimeMessage, MimeUtility } - compileOnly 'jakarta.inject:jakarta.inject-api', { // Used by Spring DI - // impl: @Inject(runtime) - } - compileOnly 'jakarta.servlet:jakarta.servlet-api', { // Provided by the servlet container - // impl: Cookie, HttpServletResponse, HttpServletRequest - } - compileOnly 'org.apache.grails:grails-core', { // Provided as this is a Grails plugin - // api: Config, GrailsApplication, GrailsPluginManager, Plugin - // impl: @Artefact(runtime), @Enhances(runtime) - } - compileOnly 'org.apache.groovy:groovy' // Provided as this is a Grails plugin - - testImplementation 'jakarta.servlet:jakarta.servlet-api', { - // impl: ServletContext - } - testImplementation 'org.apache.grails.testing:grails-testing-support-core', { - // impl: GrailsUnitTest - } - testImplementation 'org.spockframework:spock-core' - + testImplementation platform("org.apache.grails:grails-bom:$grailsVersion") + testImplementation 'org.apache.grails:grails-dependencies-starter-web' + testImplementation 'org.apache.grails:grails-dependencies-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } @@ -123,3 +67,7 @@ tasks.withType(Test).configureEach { compileJava.options.release = javaVersion.toInteger() apply from: layout.projectDirectory.file('gradle/docs-config.gradle') + +grails { + springDependencyManagement = false +} \ No newline at end of file diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index c9481934..766bceea 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -10,8 +10,13 @@ file('../gradle.properties').withInputStream { } repositories { - maven { url = 'https://repo.grails.org/grails/core' } - maven { url = 'https://repository.apache.org/content/repositories/snapshots' } + maven { url = 'https://repo.grails.org/grails/restricted' } + maven { + url = 'https://repository.apache.org/content/groups/snapshots' + content { + includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT') + } + } } dependencies { diff --git a/examples/testapp1/build.gradle b/examples/testapp1/build.gradle index 5f59580e..3b64119e 100644 --- a/examples/testapp1/build.gradle +++ b/examples/testapp1/build.gradle @@ -12,11 +12,17 @@ version = '0.1' group = 'testapp1' apply plugin: 'org.apache.grails.gradle.grails-web' -apply plugin: 'com.bertramlabs.asset-pipeline' +apply plugin: 'org.apache.grails.gradle.grails-gsp' +apply plugin: 'cloud.wondrify.asset-pipeline' repositories { - maven { url = 'https://repo.grails.org/grails/core' } - maven { url = 'https://repository.apache.org/content/repositories/snapshots' } + maven { url = 'https://repo.grails.org/grails/restricted' } + maven { + url = 'https://repository.apache.org/content/groups/snapshots' + content { + includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT') + } + } } dependencies { @@ -33,7 +39,7 @@ dependencies { testAndDevelopmentOnly 'org.webjars.npm:bootstrap-icons' testAndDevelopmentOnly 'org.webjars.npm:jquery' - runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails' + runtimeOnly 'cloud.wondrify:asset-pipeline-grails' runtimeOnly 'org.fusesource.jansi:jansi' runtimeOnly 'org.apache.grails:grails-services' runtimeOnly 'org.apache.grails:grails-i18n' diff --git a/examples/testapp1/buildSrc/build.gradle b/examples/testapp1/buildSrc/build.gradle index 53d9b174..588844d9 100644 --- a/examples/testapp1/buildSrc/build.gradle +++ b/examples/testapp1/buildSrc/build.gradle @@ -9,12 +9,17 @@ file('../../../gradle.properties').withInputStream { } repositories { - maven { url = 'https://repo.grails.org/grails/core' } - maven { url = 'https://repository.apache.org/content/repositories/snapshots' } + maven { url = 'https://repo.grails.org/grails/restricted' } + maven { + url = 'https://repository.apache.org/content/groups/snapshots' + content { + includeVersionByRegex('org[.]apache[.](grails|groovy).*', '.*', '.*-SNAPSHOT') + } + } } dependencies { implementation platform("org.apache.grails:grails-bom:$grailsVersion") - implementation 'com.bertramlabs.plugins:asset-pipeline-gradle' + implementation 'cloud.wondrify:asset-pipeline-gradle' implementation 'org.apache.grails:grails-gradle-plugins' } \ No newline at end of file diff --git a/examples/testapp1/gradle.properties b/examples/testapp1/gradle.properties index c9de1067..41515580 100644 --- a/examples/testapp1/gradle.properties +++ b/examples/testapp1/gradle.properties @@ -1,3 +1,6 @@ +# The plugin is compiled with snapshot for forward compatibility, but the test app uses the stable version +grailsVersion=7.0.0-M5 + # More versions are inherited from ../../gradle.properties greenmailVersion=2.1.2 diff --git a/examples/testapp1/settings.gradle b/examples/testapp1/settings.gradle index 8cf3bcf4..506eaa03 100644 --- a/examples/testapp1/settings.gradle +++ b/examples/testapp1/settings.gradle @@ -28,6 +28,7 @@ buildCache { rootProject.name = 'testapp1' includeBuild('../../../grails-mail') { + name = 'grails-mail' dependencySubstitution { substitute module('org.grails.plugins:grails-mail') using project(':') } diff --git a/gradle.properties b/gradle.properties index bd043e5e..057140b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,7 @@ projectVersion=5.0.1-SNAPSHOT grailsVersion=7.0.0-SNAPSHOT javaVersion=17 +jakartaMailImplVersion=2.0.3 asciidoctorGradlePluginVersion=4.0.4