Skip to content

Commit d51cff5

Browse files
authored
Merge pull request #4 from grails-plugins/upgrade
Upgrade to Grails 4.1.0.M2 & Flapdoodle Embedded MongoDB 2.2.0
2 parents b1394df + a507d6a commit d51cff5

11 files changed

Lines changed: 141 additions & 82 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: groovy
22
sudo: false
33
jdk:
4-
- openjdk7
4+
- openjdk8
55
before_script:
66
- rm -rf target
77
script: ./travis-build.sh

build.gradle

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ plugins {
1515
id 'org.asciidoctor.convert' version '1.5.3'
1616
}
1717

18-
version "1.0.2.BUILD-SNAPSHOT"
18+
version "2.0.0.BUILD-SNAPSHOT"
1919
group "org.grails.plugins"
2020

21+
apply plugin: 'java-library'
2122
apply plugin:"eclipse"
2223
apply plugin:"idea"
2324
apply plugin:"org.grails.grails-plugin"
@@ -33,36 +34,34 @@ repositories {
3334
maven { url "https://repo.grails.org/grails/core" }
3435
}
3536

36-
dependencyManagement {
37-
imports {
38-
mavenBom "org.grails:grails-bom:$grailsVersion"
39-
}
40-
applyMavenExclusions false
41-
}
42-
4337
configurations {
4438
documentation
4539
}
4640

41+
configurations.all {
42+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
43+
if (details.requested.group == 'org.mongodb') {
44+
details.useVersion(mongodbJavaDriverVersion)
45+
}
46+
}
47+
}
48+
4749
dependencies {
4850
provided "org.springframework.boot:spring-boot-starter-logging"
4951
provided "org.springframework.boot:spring-boot-autoconfigure"
5052
provided "org.grails:grails-core"
51-
profile "org.grails.profiles:plugin:3.1.8"
52-
provided "org.grails:grails-plugin-testing"
53-
compile("de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.5") {
53+
profile "org.grails.profiles:plugin"
54+
provided "org.grails:grails-gorm-testing-support"
55+
api("de.flapdoodle.embed:de.flapdoodle.embed.mongo:2.2.0") {
5456
exclude group: "commons-io"
55-
exclude group: "org.apache.commons"
57+
exclude group: "org.apache.commons", module: "commons-lang3"
5658
exclude group: "net.java.dev.jna"
5759
exclude group: "org.slf4j"
5860
}
59-
provided "org.grails.plugins:mongodb:5.0.8"
60-
documentation "org.codehaus.groovy:groovy-all:2.4.6"
61+
provided "org.grails.plugins:mongodb"
62+
documentation "org.codehaus.groovy:groovy-all"
6163
}
6264

63-
task wrapper(type: Wrapper) {
64-
gradleVersion = gradleWrapperVersion
65-
}
6665
grailsPublish {
6766
userOrg = 'grails'
6867
githubSlug = 'grails-plugins/grails-embedded-mongodb'
@@ -104,4 +103,24 @@ task apidocs(type: Groovydoc) {
104103
task docs(type:Copy, dependsOn:[apidocs, asciidoctor]) {
105104
from "$buildDir/asciidoc/html5"
106105
into "$buildDir/docs"
107-
}
106+
}
107+
108+
bootRun {
109+
ignoreExitValue true
110+
jvmArgs(
111+
'-Dspring.output.ansi.enabled=always',
112+
'-noverify',
113+
'-XX:TieredStopAtLevel=1',
114+
'-Xmx1024m')
115+
sourceResources sourceSets.main
116+
String springProfilesActive = 'spring.profiles.active'
117+
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
118+
}
119+
120+
tasks.withType(GroovyCompile) {
121+
configure(groovyOptions) {
122+
forkOptions.jvmArgs = ['-Xmx1024m']
123+
}
124+
}
125+
126+
bootJar.enabled = false

gradle.properties

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
grailsVersion=3.1.8
2-
gradleWrapperVersion=2.13
1+
gormVersion=7.1.0.M2
2+
grailsVersion=4.1.0.M2
3+
gradleWrapperVersion=3.5
4+
groovyVersion=3.0.5
5+
mongodbJavaDriverVersion=4.0.3

gradle/wrapper/gradle-wrapper.jar

5.15 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Nov 27 23:09:32 CET 2015
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip

gradlew

Lines changed: 68 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 24 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/groovy/org/grails/compiler/injection/MongoApplicationClassInjector.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package org.grails.compiler.injection
22

33
import grails.compiler.ast.AstTransformer
44
import groovy.transform.CompileStatic
5-
import javassist.compiler.CompileError
65
import org.codehaus.groovy.ast.ClassHelper
76
import org.codehaus.groovy.ast.ClassNode
87
import org.codehaus.groovy.ast.expr.ClassExpression

src/main/groovy/org/grails/plugin/embedded/mongodb/EmbeddedMongoDBGrailsPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.grails.datastore.mapping.mongo.MongoDatastore
2020

2121
class EmbeddedMongoDBGrailsPlugin extends Plugin {
2222

23-
String grailsVersion = '3.1.0 > *'
23+
String grailsVersion = '3.3.11 > *'
2424
String author = 'James Kleeh'
2525
String authorEmail = 'kleehj@ociweb.com'
2626
String title = 'Mongo Embedded Integration Test Plugin'
@@ -32,7 +32,7 @@ class EmbeddedMongoDBGrailsPlugin extends Plugin {
3232
def scm = [url: 'https://github.com/grails-plugins/grails-embedded-mongodb']
3333

3434
int getPort() {
35-
config.getProperty(MongoDatastore.SETTING_PORT, int, ServerAddress.defaultPort())
35+
config.getProperty(MongoDatastore.SETTING_PORT, Integer, ServerAddress.defaultPort())
3636
}
3737

3838
IFeatureAwareVersion getVersion() {

src/main/groovy/org/grails/plugin/embedded/mongodb/MongoTestExeuctionListener.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.grails.plugin.embedded.mongodb
22

3-
import com.mongodb.MongoClient
3+
import com.mongodb.client.MongoClient
44
import com.mongodb.client.MongoDatabase
55
import grails.config.Config
66
import grails.core.GrailsApplication

0 commit comments

Comments
 (0)