diff --git a/.travis.yml b/.travis.yml index 1492b25..8fac9f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,42 +1,23 @@ language: groovy -sudo: false jdk: - oraclejdk8 +sudo: false branches: - except: - - trunk -before_install: -- export TZ=Australia/Canberra -- date -- rm -rf ~/.sdkman -- curl -s get.sdkman.io > ~/install_gvm.sh -- chmod 775 ~/install_gvm.sh -- ~/install_gvm.sh -- echo "sdkman_auto_answer=true" > ~/.sdkman/etc/config -- source ~/.sdkman/bin/sdkman-init.sh -- GRAILS_VERSION=`grep '^\s*app.grails.version' application.properties | sed -e 's/^\s*app\.grails\.version=//g' - | tr -d "\r"` -- echo "GRAILS_VERSION:$GRAILS_VERSION" -- sdk install grails $GRAILS_VERSION || true -before_script: -- GRAILS_VERSION_NUMBER=`echo $GRAILS_VERSION | sed -e 's/\.[0-9]*$//g' -e 's/\.//g' - | tr -d "\r"` -- echo "GRAILS_VERSION_NUMBER:$GRAILS_VERSION_NUMBER" -- GRAILS_SETTINGS_FILE="travis_grails_settings_new.groovy" -- if [ "$GRAILS_VERSION_NUMBER" -lt "23" ]; then GRAILS_SETTINGS_FILE="travis_grails_settings_old.groovy"; - fi; -- echo "GRAILS_SETTINGS_FILE:$GRAILS_SETTINGS_FILE" -- mkdir -p ~/.grails; wget -q -O ~/.grails/settings.groovy https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/$GRAILS_SETTINGS_FILE -- MAVEN_REPO="ala-repo-snapshot" -- APP_VERSION=`grep '^\s*def\s*version' *GrailsPlugin.groovy | sed -e 's/^.*= *"//g' - | sed -e 's/".*$//g' | tr -d "\r"` -- echo $APP_VERSION | grep -q "\-SNAPSHOT"; if [ "$?" = "1" ]; then MAVEN_REPO="ala-repo-release"; - fi; -- echo "APP_VERSION:$APP_VERSION" -- echo "MAVEN_REPO:$MAVEN_REPO" -script: -- grails clean && grails refresh-dependencies --non-interactive && grails prod maven-install - --non-interactive && grails prod maven-deploy --repository=$MAVEN_REPO --non-interactive + only: + - master + - hotfix + - grails-jdk-upgrade + - bs3-with-grails3 +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ +cache: + directories: + - $HOME/.m2 + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ +after_success: + - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && travis_retry ./gradlew publish' env: global: - secure: 8H8KsZuqo9KMJJRgl6w5TzBj2XIPYzxQfE/KvlV3PPLvwmJoL1d18Voh4vnAR3SA5WGI+ZlRBHZxbGDjRigIE4FpxN0WoDkGpRZVB/5nChH+ldViiYejDL4IkBmbhqG8x7zZ2GghLdeXqoQc3bqeaskxOBBmlYGMSA9YUWI4j4s= diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy deleted file mode 100644 index f2a9566..0000000 --- a/grails-app/conf/BuildConfig.groovy +++ /dev/null @@ -1,52 +0,0 @@ -grails.project.class.dir = "target/classes" -grails.project.test.class.dir = "target/test-classes" -grails.project.test.reports.dir = "target/test-reports" - -grails.project.fork = [ - // configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required - // compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true], - - // configure settings for the test-app JVM, uses the daemon by default - test: false, - // configure settings for the run-app JVM - run: false, - // configure settings for the run-war JVM - war: false, - // configure settings for the Console UI JVM - console: false -] - -grails.project.dependency.resolver = "maven" // or ivy -grails.project.dependency.resolution = { - // inherit Grails' default dependencies - inherits("global") { - // uncomment to disable ehcache - // excludes 'ehcache' - } - - log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' - repositories { - mavenLocal() - mavenRepo ("https://nexus.ala.org.au/content/groups/public/") { - updatePolicy 'always' - } - } - - dependencies { - // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. - // runtime 'mysql:mysql-connector-java:5.1.27' - compile "commons-httpclient:commons-httpclient:3.1" - compile('org.codehaus.groovy.modules.http-builder:http-builder:0.7') { - excludes "commons-logging", "xml-apis", "groovy" - } - } - - plugins { - build(":release:3.0.1", - ":rest-client-builder:1.0.3") { - export = false - } - compile ':ala-auth:2.1.3' - runtime ':font-awesome-resources:4.3.0.1' - } -} diff --git a/src/main/groovy/images/client/plugin/ImagesClientPluginGrailsPlugin.groovy b/src/main/groovy/images/client/plugin/ImagesClientPluginGrailsPlugin.groovy index e75854b..cb67d02 100644 --- a/src/main/groovy/images/client/plugin/ImagesClientPluginGrailsPlugin.groovy +++ b/src/main/groovy/images/client/plugin/ImagesClientPluginGrailsPlugin.groovy @@ -1,8 +1,10 @@ -class ImagesClientPluginGrailsPlugin { - // the plugin version - def version = "0.8.1-SNAPSHOT" +package images.client.plugin + +import grails.plugins.Plugin + +class ImagesClientPluginGrailsPlugin extends Plugin { // the version or versions of Grails the plugin is designed for - def grailsVersion = "2.2 > *" + def grailsVersion = "3.2.11 > *" // resources that are excluded from plugin packaging def pluginExcludes = [ "grails-app/views/error.gsp" @@ -39,30 +41,10 @@ class ImagesClientPluginGrailsPlugin { // TODO Implement additions to web.xml (optional), this event occurs before } - def doWithSpring = { - - if (!application.config.grails.cache.config) { - application.config.grails.cache.config = {} + Closure doWithSpring() { + { -> + println("ImagesClientPluginGrailsPlugin starting") } - - application.config.grails.cache.config = application.config.grails.cache.config << { - - defaults { - eternal false - overflowToDisk false - maxElementsInMemory 20000 - timeToLiveSeconds 3600 - } - - cache { - name 'speciesListKvp' - eternal false - overflowToDisk false - maxElementsInMemory 20000 - timeToLiveSeconds(3600 * 2) // 2 hours - } - } - } def doWithDynamicMethods = { ctx -> @@ -87,4 +69,4 @@ class ImagesClientPluginGrailsPlugin { def onShutdown = { event -> // TODO Implement code that is executed when the application shuts down (optional) } -} +} \ No newline at end of file