Skip to content

Commit 6b27507

Browse files
committed
Merge pull request #40 from macedigital/gradle-2.x-compatible
Gradle 2.x compatibility
2 parents 6453fbb + 4c88690 commit 6b27507

File tree

8 files changed

+145
-114
lines changed

8 files changed

+145
-114
lines changed

build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ dependencies {
5555
provided "org.codehaus.groovy:groovy-all:$groovyVersion"
5656
provided "io.vertx:lang-groovy:$groovyLangModVersion@jar"
5757

58+
// If you're creating Scala compiled verticles you may need the following dependencies
59+
provided "org.scala-lang:scala-library:$scalaVersion"
60+
provided "io.vertx:lang-scala:$scalaLangModVersion@jar"
61+
62+
// If you're creating Jython compiled verticles you may need the following dependencies
63+
provided "org.python:jython-standalone:$jythonVersion"
64+
provided "io.vertx:lang-jython:$jythonLangModVersion@jar"
65+
66+
// If you're creating Jruby compiled verticles you may need the following dependencies
67+
provided "org.jruby:jruby-complete:$jrubyVersion"
68+
provided "io.vertx:lang-jruby:$jrubyLangModVersion@jar"
5869
}
5970

6071
test {

gradle.properties

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,32 @@ pullInDeps=true
1717
createFatJar=true
1818

1919
# The version of Groovy language to compile against (if you are using Groovy compiled verticles or VertxTests)
20-
groovyLangModVersion=2.0.0-final
20+
groovyLangModVersion=2.1.1-final
2121

2222
# The version of Groovy to use (if you are using Groovy)
23-
groovyVersion=2.1.5
23+
groovyVersion=2.3.7
24+
25+
# The version of Scala language to compile against (if you are using Scala compiled verticles or VertxTests)
26+
scalaLangModVersion=1.1.0-SNAPSHOT
27+
28+
# The version of Scala to use (if you are using Scala)
29+
scalaVersion=2.11.4
30+
31+
# The version of Jython language to compile against (if you are using Jython compiled verticles or VertxTests)
32+
jythonLangModVersion=2.1.1
33+
34+
# The version of Jython to use (if you are using Jython)
35+
jythonVersion=2.5.3
36+
37+
# The version of JRuby language to compile against (if you are using JRuby compiled verticles or VertxTests)
38+
jrubyLangModVersion=2.1.0-final
39+
40+
# The version of JRuby to use (if you are using JRuby)
41+
jrubyVersion=1.7.16.1
42+
2443

2544
# Gradle version
26-
gradleVersion=1.10
45+
gradleVersion=2.2.1
2746

2847
# The version of Vert.x
2948
vertxVersion=2.1.5

gradle/vertx.gradle

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import org.vertx.java.platform.impl.cli.Starter
1818

1919
apply plugin: 'java'
2020
apply plugin: 'groovy'
21+
apply plugin: 'scala'
2122
apply plugin: 'idea'
2223
apply plugin: 'eclipse'
2324

@@ -59,6 +60,7 @@ repositories {
5960
dependencies {
6061
provided "io.vertx:vertx-core:$vertxVersion"
6162
provided "io.vertx:vertx-platform:$vertxVersion"
63+
provided "io.vertx:vertx-hazelcast:$vertxVersion"
6264
testCompile "junit:junit:$junitVersion"
6365
testCompile "io.vertx:testtools:$toolsVersion"
6466
}
@@ -101,7 +103,9 @@ sourceSets {
101103

102104
task copyMod( type:Copy, dependsOn: 'classes', description: 'Assemble the module into the local mods directory' ) {
103105
into "build/mods/$moduleName"
106+
from compileGroovy
104107
from compileJava
108+
from compileScala
105109
from 'src/main/resources'
106110
into( 'lib' ) {
107111
from configurations.compile
@@ -124,7 +128,7 @@ task sourceJar(type: Jar) {
124128
}
125129

126130
javadoc {
127-
classpath = configurations.compile + configurations.provided
131+
classpath = configurations.compile + configurations.provided
128132
}
129133

130134
task javadocJar(type: Jar) {
@@ -167,12 +171,8 @@ task collectDeps(type: Copy) {
167171
}
168172
}
169173

170-
task runMod(description: 'Run the module', dependsOn: collectDeps) << {
171-
setSysProps()
172-
// We also init here - this means for single module builds the user doesn't have to explicitly init -
173-
// they can just do runMod
174-
doInit()
175-
args = ['runmod', moduleName]
174+
task runMod(description: 'Run the module', dependsOn: [collectDeps, classes, init]) << {
175+
def args = ['runmod', moduleName]
176176
def args2 = runModArgs.split("\\s+")
177177
args.addAll(args2)
178178
Starter.main(args as String[])
@@ -187,7 +187,10 @@ def doInit() {
187187
"bin\r\n" +
188188
"out/production/${project.name}\r\n" +
189189
"out/test/${project.name}\r\n" +
190-
"build/deps\r\n";
190+
"build/deps\r\n" +
191+
"build/classes/main\r\n" +
192+
"build/resources/main\r\n";
193+
191194
cpFile << defaultCp;
192195
}
193196
def args = ['create-module-link', moduleName]
@@ -234,10 +237,10 @@ def loadProperties(String sourceFileName) {
234237
plugins.withType(IdeaPlugin) {
235238
idea {
236239
module {
237-
scopes.PROVIDED.plus += configurations.provided
238-
scopes.COMPILE.minus += configurations.provided
239-
scopes.TEST.minus += configurations.provided
240-
scopes.RUNTIME.minus += configurations.provided
240+
scopes.PROVIDED.plus += [configurations.provided]
241+
scopes.COMPILE.minus += [configurations.provided]
242+
scopes.TEST.minus += [configurations.provided]
243+
scopes.RUNTIME.minus += [configurations.provided]
241244
}
242245
}
243246
}

gradle/wrapper/gradle-wrapper.jar

4.18 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Jan 28 08:12:12 GMT 2013
1+
#Tue Dec 30 05:10:34 CET 2014
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip

gradlew

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

gradlew.bat

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

src/main/platform_lib/repos.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mavenLocal:~/.m2/repository
99
maven:http://repo2.maven.org/maven2
1010

1111
# Sonatype snapshots
12-
maven:http://oss.sonatype.org/content/repositories/snapshots
12+
maven:https://oss.sonatype.org/content/repositories/snapshots
1313

1414
# Bintray
1515
bintray:http://dl.bintray.com

0 commit comments

Comments
 (0)