Skip to content

Commit 39a5198

Browse files
committed
Upgrade the Grails sample to Grails 3.3.x and Gradle 4.9
Closes gh-540
1 parent 8bc5b4e commit 39a5198

File tree

9 files changed

+13
-17
lines changed

9 files changed

+13
-17
lines changed

samples/rest-notes-grails/build.gradle

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
buildscript {
22
repositories {
3+
mavenCentral()
34
maven { url "https://repo.grails.org/grails/core" }
45
}
56
dependencies {
@@ -58,7 +59,7 @@ dependencies {
5859
compile "org.grails:grails-plugin-services"
5960
compile "org.grails:grails-plugin-datasource"
6061
compile "org.grails:grails-plugin-databinding"
61-
compile "org.grails:grails-plugin-async"
62+
compile "org.grails.plugins:async"
6263
compile "org.grails:grails-web-boot"
6364
compile "org.grails:grails-logging"
6465
compile "org.grails.plugins:cache"
@@ -72,9 +73,10 @@ dependencies {
7273
profile "org.grails.profiles:rest-api"
7374

7475
runtime "com.h2database:h2"
76+
runtime 'org.apache.tomcat:tomcat-jdbc'
7577

7678
testCompile "io.rest-assured:rest-assured:3.0.2"
77-
testCompile "org.grails:grails-plugin-testing"
79+
testCompile "org.grails:grails-test-mixins:3.3.0"
7880
testCompile "org.grails.plugins:geb"
7981
testCompile "org.grails:grails-datastore-rest-client"
8082
testCompile "org.springframework.restdocs:spring-restdocs-restassured"
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
grailsVersion=3.2.6
2-
gradleWrapperVersion=3.4
1+
grailsVersion=3.3.2
2+
gradleWrapperVersion=4.4
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Thu Mar 23 11:49:00 GMT 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip

samples/rest-notes-grails/gradlew

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"
3535

36-
warn ( ) {
36+
warn () {
3737
echo "$*"
3838
}
3939

40-
die ( ) {
40+
die () {
4141
echo
4242
echo "$*"
4343
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
155155
fi
156156

157157
# Escape application args
158-
save ( ) {
158+
save () {
159159
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160160
echo " "
161161
}

samples/rest-notes-grails/grails-app/controllers/com/example/UrlMappings.groovy

+1-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ package com.example
1919
class UrlMappings {
2020

2121
static mappings = {
22-
delete "/$controller/$id(.$format)?"(action:"delete")
23-
get "/$controller(.$format)?"(action:"index")
24-
get "/$controller/$id(.$format)?"(action:"show")
25-
post "/$controller(.$format)?"(action:"save")
26-
put "/$controller/$id(.$format)?"(action:"update")
27-
patch "/$controller/$id(.$format)?"(action:"patch")
22+
'/notes'(resources: 'note')
2823

2924
"500"(view: '/error')
3025
"404"(view: '/notFound')

samples/rest-notes-grails/grails-app/domain/com/example/Note.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package com.example
1818

1919
import grails.rest.Resource
2020

21-
@Resource(uri='/notes', formats = ['json', 'xml'])
21+
@Resource(uri='/notes')
2222
class Note {
2323

2424
Long id

samples/rest-notes-grails/grails-app/domain/com/example/Tag.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package com.example
1818

1919
import grails.rest.Resource
2020

21-
@Resource(uri='/tags', formats = ['json', 'xml'])
21+
@Resource(uri='/tags')
2222
class Tag {
2323

2424
Long id

samples/rest-notes-grails/settings.gradle

Whitespace-only changes.

0 commit comments

Comments
 (0)