Upgrade the Grails sample to Grails 3.3.x and Gradle 4.9

Closes gh-540
This commit is contained in:
Andy Wilkinson
2018-08-01 15:08:51 +01:00
parent 8bc5b4e27e
commit 39a5198c3b
9 changed files with 13 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
buildscript {
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
@@ -58,7 +59,7 @@ dependencies {
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-datasource"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-async"
compile "org.grails.plugins:async"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails.plugins:cache"
@@ -72,9 +73,10 @@ dependencies {
profile "org.grails.profiles:rest-api"
runtime "com.h2database:h2"
runtime 'org.apache.tomcat:tomcat-jdbc'
testCompile "io.rest-assured:rest-assured:3.0.2"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails:grails-test-mixins:3.3.0"
testCompile "org.grails.plugins:geb"
testCompile "org.grails:grails-datastore-rest-client"
testCompile "org.springframework.restdocs:spring-restdocs-restassured"

View File

@@ -1,2 +1,2 @@
grailsVersion=3.2.6
gradleWrapperVersion=3.4
grailsVersion=3.3.2
gradleWrapperVersion=4.4

View File

@@ -1,6 +1,5 @@
#Thu Mar 23 11:49:00 GMT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip

View File

@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
warn () {
echo "$*"
}
die ( ) {
die () {
echo
echo "$*"
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
fi
# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}

View File

@@ -19,12 +19,7 @@ package com.example
class UrlMappings {
static mappings = {
delete "/$controller/$id(.$format)?"(action:"delete")
get "/$controller(.$format)?"(action:"index")
get "/$controller/$id(.$format)?"(action:"show")
post "/$controller(.$format)?"(action:"save")
put "/$controller/$id(.$format)?"(action:"update")
patch "/$controller/$id(.$format)?"(action:"patch")
'/notes'(resources: 'note')
"500"(view: '/error')
"404"(view: '/notFound')

View File

@@ -18,7 +18,7 @@ package com.example
import grails.rest.Resource
@Resource(uri='/notes', formats = ['json', 'xml'])
@Resource(uri='/notes')
class Note {
Long id

View File

@@ -18,7 +18,7 @@ package com.example
import grails.rest.Resource
@Resource(uri='/tags', formats = ['json', 'xml'])
@Resource(uri='/tags')
class Tag {
Long id