Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Grails mail 4.0.0 plugin support. #8

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Installation

To install just add the plugin to the plugins block of `build.gradle`:

For Grails 6.x.x
```groovy
implementation "io.github.gpc:asynchronous-mail:4.0.0-SNAPSHOT"
```


For Grails 5.x.x
```groovy
implementation "io.github.gpc:asynchronous-mail:3.1.2"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {
implementation 'org.grails.plugins:hibernate5'
implementation 'org.hibernate:hibernate-core:5.6.15.Final'
implementation 'org.grails.plugins:gsp'
implementation 'org.grails.plugins:mail:3.0.0'
implementation 'org.grails.plugins:mail:4.0.0'
// This is needed for the quartz-plugin on grails >= 4.0.x, https://github.com/grails-plugins/grails-quartz/issues/107#issuecomment-575951471
implementation('org.quartz-scheduler:quartz:2.3.2') { exclude group: 'slf4j-api', module: 'c3p0' }
implementation 'org.grails.plugins:quartz:2.0.13'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ import org.quartz.TriggerKey
class AsynchronousMailGrailsPlugin extends Plugin {

def grailsVersion = "6.0.0 > *"
def dependsOn = [mail: "* > 4.0.0"]
def loadAfter = ['mail', 'quartz', 'hibernate', 'hibernate3', 'hibernate4', 'hibernate5', 'mongodb']

@Override
Closure doWithSpring() {
{ ->
//noinspection GrUnresolvedAccess
asynchronousMailMessageBuilderFactory(AsynchronousMailMessageBuilderFactory) { it.autowire = true }
asynchronousMailService(AsynchronousMailService) { it.autowire = true }
//noinspection GrUnresolvedAccess
springConfig.addAlias 'asyncMailService', 'asynchronousMailService'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CompareMessageBuilderSpec extends Specification {

// Remove these methods as they are not part of MailMessageBuilder api and has found to be missing from
// AsynchronousMailMessageBuilder with some versions of groovy which will make the test fail
mbMethods.removeAll { ['getProperty', 'setProperty', 'invokeMethod'].contains(it.name) }
mbMethods.removeAll { ['getProperty', 'setProperty', 'invokeMethod', 'access$0', 'pfaccess$0', 'pfaccess$1'].contains(it.name) }

expect:
mbMethods.every { MetaMethod mbm ->
Expand Down