diff --git a/README.md b/README.md index de821df..72e1cb4 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,4 @@ See https://grails.org/plugin/cache-ehcache and [Documentation](http://grails-pl ## Branches -The current master branch is for 3.x versions of the plugin compatible with Grails 3. There is a 1.x branch for on-going maintenance of 1.x versions of the plugin compatible with Grails 2. Please submit any pull requests to the appropriate branch. Changes to the 1.x branch will be merged into the master branch if appropriate. +The current master branch is for 4.x versions of the plugin compatible with Grails 5. There is a 1.x branch for on-going maintenance of 1.x versions of the plugin compatible with Grails 2. Please submit any pull requests to the appropriate branch. Changes to the 1.x branch will be merged into the master branch if appropriate. diff --git a/build.gradle b/build.gradle index 4899a22..9767b17 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { maven { url "https://repo.grails.org/grails/core" } } dependencies { - classpath "org.grails:grails-gradle-plugin:$grailsVersion" + classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion" } } @@ -12,23 +12,21 @@ plugins { id 'org.asciidoctor.convert' version '1.5.3' } -//version "3.0.1" -version "3.0.1.BUILD-SNAPSHOT" +//version "4.0.0" +version "4.0.0.BUILD-SNAPSHOT" group "org.grails.plugins" apply plugin: "eclipse" apply plugin: "idea" apply plugin: "org.grails.grails-plugin" -apply plugin: "org.grails.grails-plugin-publish" +apply plugin: "maven-publish" +apply plugin:"org.grails.internal.grails-plugin-publish" repositories { mavenLocal() maven { url "https://repo.grails.org/grails/core" } } -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - dependencyManagement { imports { mavenBom "org.grails:grails-bom:$grailsVersion" @@ -41,24 +39,24 @@ configurations { } dependencies { - provided 'org.springframework.boot:spring-boot-starter-logging' - provided "org.springframework.boot:spring-boot-starter-actuator" - provided "org.springframework.boot:spring-boot-autoconfigure" - provided "org.springframework.boot:spring-boot-starter-tomcat" - - provided "org.grails:grails-web-boot" - provided "org.grails:grails-dependencies" - provided 'javax.servlet:javax.servlet-api:3.1.0' + implementation "org.springframework.boot:spring-boot-starter-logging" + implementation "org.springframework.boot:spring-boot-starter-actuator" + implementation "org.springframework.boot:spring-boot-starter-validation" + implementation "org.springframework.boot:spring-boot-autoconfigure" + implementation "org.springframework.boot:spring-boot-starter-tomcat" + + implementation "org.grails:grails-web-boot" + implementation 'javax.servlet:javax.servlet-api:3.1.0' profile "org.grails.profiles:plugin" - testCompile "org.grails:grails-plugin-testing" + testImplementation "org.grails:grails-gorm-testing-support" console "org.grails:grails-console" - compile "org.grails.plugins:cache:4.0.3" - compile 'org.ehcache:ehcache:3.4.0' + implementation "org.grails.plugins:cache:5.0.1" + implementation 'org.ehcache:ehcache:3.4.0' - documentation "org.codehaus.groovy:groovy-all:2.4.10" + documentation "org.codehaus.groovy:groovy-all" } @@ -66,7 +64,7 @@ bootRun { jvmArgs('-Dspring.output.ansi.enabled=always') } // enable if you wish to package this plugin as a standalone application -bootRepackage.enabled = false +bootJar.enabled = false grailsPublish { userOrg = "grails" @@ -110,3 +108,10 @@ task docs(type:Copy, dependsOn:[apidocs, asciidoctor]) { from "$buildDir/asciidoc/html5" into "$buildDir/docs" } + +tasks.withType(Test) { + testLogging { + events "passed", "skipped", "failed" + exceptionFormat 'full' + } +} diff --git a/gradle.properties b/gradle.properties index 5c10269..edf26a7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -grailsVersion=3.2.8 -gradleWrapperVersion=3.0 +grailsVersion=5.3.5 +grailsGradlePluginVersion=5.3.0 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 86185e7..479c3a8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip diff --git a/grails-app/conf/logback.groovy b/grails-app/conf/logback.groovy deleted file mode 100644 index 5b2d1e3..0000000 --- a/grails-app/conf/logback.groovy +++ /dev/null @@ -1,28 +0,0 @@ -import grails.util.BuildSettings -import grails.util.Environment - - -// See http://logback.qos.ch/manual/groovy.html for details on configuration -appender('STDOUT', ConsoleAppender) { - encoder(PatternLayoutEncoder) { - pattern = "%level %logger - %msg%n" - } -} - -root(ERROR, ['STDOUT']) - -if(Environment.current == Environment.DEVELOPMENT) { - def targetDir = BuildSettings.TARGET_DIR - if(targetDir) { - - appender("FULL_STACKTRACE", FileAppender) { - - file = "${targetDir}/stacktrace.log" - append = true - encoder(PatternLayoutEncoder) { - pattern = "%level %logger - %msg%n" - } - } - logger("StackTrace", ERROR, ['FULL_STACKTRACE'], false ) - } -} diff --git a/grails-app/conf/logback.xml b/grails-app/conf/logback.xml new file mode 100644 index 0000000..98465ce --- /dev/null +++ b/grails-app/conf/logback.xml @@ -0,0 +1,17 @@ + + + + + + + + + UTF-8 + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex + + + + + + + diff --git a/src/main/groovy/grails/plugin/cache/ehcache/CacheEhcacheGrailsPlugin.groovy b/src/main/groovy/grails/plugin/cache/ehcache/CacheEhcacheGrailsPlugin.groovy index b500560..e958f26 100644 --- a/src/main/groovy/grails/plugin/cache/ehcache/CacheEhcacheGrailsPlugin.groovy +++ b/src/main/groovy/grails/plugin/cache/ehcache/CacheEhcacheGrailsPlugin.groovy @@ -7,7 +7,7 @@ import grails.plugins.Plugin class CacheEhcacheGrailsPlugin extends Plugin { // the version or versions of Grails the plugin is designed for - def grailsVersion = "3.0.0 > *" + def grailsVersion = "5.0.0 > *" def title = "Cache Ehcache" // Headline display name of the plugin diff --git a/src/main/groovy/grails/plugin/cache/ehcache/GrailsEhcacheCache.groovy b/src/main/groovy/grails/plugin/cache/ehcache/GrailsEhcacheCache.groovy index f3df9de..91f33fe 100644 --- a/src/main/groovy/grails/plugin/cache/ehcache/GrailsEhcacheCache.groovy +++ b/src/main/groovy/grails/plugin/cache/ehcache/GrailsEhcacheCache.groovy @@ -89,7 +89,7 @@ class GrailsEhcacheCache implements GrailsCache { } @SuppressWarnings("unchecked") - Collection getAllKeys() { + Collection getAllKeys() { Set keys = [] getNativeCache().each { keys.add(it.key)