Skip to content

Commit 0c9f4e2

Browse files
committed
Initial Grails 4 support.
TODO: Publishing updates
1 parent 04b51ff commit 0c9f4e2

File tree

5 files changed

+42
-60
lines changed

5 files changed

+42
-60
lines changed

build.gradle

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ buildscript {
1212
}
1313

1414
plugins {
15-
id "io.spring.dependency-management" version "0.3.1.RELEASE"
16-
id "com.jfrog.bintray" version "1.6"
15+
// id "io.spring.dependency-management" version "0.3.1.RELEASE"
16+
// id "com.jfrog.bintray" version "1.6"
1717
}
1818

19-
version "3.0.0"
19+
version "4.0.0.BUILD-SNAPSHOT"
2020
group "com.bertramlabs.plugins"
2121

22-
apply plugin: "spring-boot"
2322
apply plugin: "org.grails.grails-plugin"
2423
apply plugin: "org.grails.grails-gsp"
2524
apply plugin: 'maven-publish'
@@ -31,39 +30,51 @@ apply plugin: "org.grails.grails-plugin-publish"
3130
// apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/grailsCentralPublishing.gradle'
3231
// apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle'
3332

34-
ext {
35-
grailsVersion = project.grailsVersion
36-
gradleWrapperVersion = project.gradleWrapperVersion
37-
}
38-
39-
sourceCompatibility = 1.7
40-
targetCompatibility = 1.7
41-
33+
sourceCompatibility = 1.8
34+
targetCompatibility = 1.8
4235

4336
repositories {
4437
mavenLocal()
4538
mavenCentral()
4639
maven { url "https://repo.grails.org/grails/core" }
4740
}
4841

49-
dependencyManagement {
50-
imports {
51-
mavenBom "org.grails:grails-bom:$grailsVersion"
42+
configurations {
43+
developmentOnly
44+
runtimeClasspath {
45+
extendsFrom developmentOnly
5246
}
53-
applyMavenExclusions false
5447
}
5548

5649
dependencies {
57-
provided 'org.springframework.boot:spring-boot-starter-logging'
58-
provided "org.springframework.boot:spring-boot-starter-actuator"
59-
provided "org.springframework.boot:spring-boot-autoconfigure"
60-
provided "org.springframework.boot:spring-boot-starter-tomcat"
61-
62-
provided "org.grails:grails-web-boot"
63-
provided "org.grails:grails-dependencies"
64-
provided 'javax.servlet:javax.servlet-api:3.1.0'
65-
66-
testCompile "org.grails:grails-plugin-testing"
50+
developmentOnly("org.springframework.boot:spring-boot-devtools")
51+
compile "org.springframework.boot:spring-boot-starter-logging"
52+
compile "org.springframework.boot:spring-boot-autoconfigure"
53+
compile "org.grails:grails-core"
54+
compile "org.springframework.boot:spring-boot-starter-actuator"
55+
compile "org.springframework.boot:spring-boot-starter-tomcat"
56+
compile "org.grails:grails-web-boot"
57+
compile "org.grails:grails-logging"
58+
compile "org.grails:grails-plugin-rest"
59+
compile "org.grails:grails-plugin-databinding"
60+
compile "org.grails:grails-plugin-i18n"
61+
compile "org.grails:grails-plugin-services"
62+
compile "org.grails:grails-plugin-url-mappings"
63+
compile "org.grails:grails-plugin-interceptors"
64+
compile "org.grails.plugins:cache"
65+
compile "org.grails.plugins:async"
66+
compile "org.grails.plugins:scaffolding"
67+
compile "org.grails.plugins:gsp"
68+
compileOnly "io.micronaut:micronaut-inject-groovy"
69+
console "org.grails:grails-console"
70+
profile "org.grails.profiles:web-plugin"
71+
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
72+
// provided 'javax.servlet:javax.servlet-api:3.1.0'
73+
compileOnly "io.micronaut:micronaut-inject-groovy"
74+
testCompile "org.grails:grails-gorm-testing-support"
75+
testCompile "org.mockito:mockito-core"
76+
testCompile "org.grails:grails-web-testing-support"
77+
// testCompile "org.grails:grails-plugin-testing"
6778

6879
console "org.grails:grails-console"
6980
}
@@ -94,18 +105,3 @@ grailsPublish {
94105
developers = [davidestes:"David Estes", jcrosbie: "Jeremy Michael Crosbie"]
95106
}
96107

97-
eclipse {
98-
classpath {
99-
plusConfigurations += [configurations.provided]
100-
}
101-
}
102-
103-
idea {
104-
module {
105-
scopes.PROVIDED.plus += [configurations.provided]
106-
}
107-
}
108-
109-
task wrapper(type: Wrapper) {
110-
gradleVersion = gradleWrapperVersion
111-
}

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
grailsVersion=3.1.5
2-
gradleWrapperVersion=2.12
1+
grailsVersion=4.0.1

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip

src/main/groovy/org/grails/plugin/securitybridge/SecurityBridgeGrailsPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import grails.plugins.*
2020
class SecurityBridgeGrailsPlugin extends Plugin {
2121
// the plugin version
2222
// the version or versions of Grails the plugin is designed for
23-
def grailsVersion = "3.1.0 > *"
23+
def grailsVersion = "4.0.0 > *"
2424

2525
def title = "Security Bridge Plugin" // Headline display name of the plugin
2626
def author = "David Estes"

src/test/groovy/org/grails/plugin/securitybridge/SecurityBridgeInterceptorSpec.groovy

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
package org.grails.plugin.securitybridge
22

3-
4-
import grails.test.mixin.TestFor
3+
import grails.testing.web.interceptor.InterceptorUnitTest
54
import spock.lang.Specification
65

7-
/**
8-
* See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for usage instructions
9-
*/
10-
@TestFor(SecurityBridgeInterceptor)
11-
class SecurityBridgeInterceptorSpec extends Specification {
12-
13-
def setup() {
14-
}
15-
16-
def cleanup() {
17-
18-
}
19-
6+
class SecurityBridgeInterceptorSpec extends Specification implements InterceptorUnitTest<SecurityBridgeInterceptor> {
207
void "Test securityBridge interceptor matching"() {
218
when:"A request matches the interceptor"
229
withRequest(controller:"securityBridge")

0 commit comments

Comments
 (0)