Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix up

  • Loading branch information...
commit ebc64caee852b37b86c27928f1c638faeb9f9d44 1 parent a749b39
@purplefox purplefox authored
View
88 build.gradle
@@ -14,27 +14,18 @@
* limitations under the License.
*/
-buildscript {
- repositories {
- maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
- mavenCentral()
- }
- dependencies {
- classpath "org.vert-x:build-tools:$vertxBuildToolsVersion"
- classpath "org.vert-x:gradle-plugin:$vertxGradlePluginVersion"
- }
-}
-
-apply from: 'gradle/setup.gradle'
apply plugin: 'java'
-apply plugin: 'vertx' // configures the test classpath correctly and adds busmod packaging
-apply plugin: 'vertx-rhino'
defaultTasks = ['assemble']
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
-jar.enabled = false // we don't need this
+
+jar.enabled = false // We don't produce a jar
+
+configurations {
+ provided
+}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
@@ -42,33 +33,63 @@ repositories {
}
dependencies {
- vertxProvided("org.vert-x:vertx-core:$vertxVersion")
- vertxProvided("org.vert-x:vertx-platform:$vertxVersion")
+ provided "org.vert-x:vertx-core:$vertxVersion"
+ provided "org.vert-x:vertx-platform:$vertxVersion"
- testCompile("org.vert-x:vertx-core:$vertxVersion")
- testCompile("org.vert-x:vertx-platform:$vertxVersion")
- testCompile("org.vert-x:vertx-lang-java:$vertxVersion")
- testCompile("org.vert-x:vertx-lang-rhino:$vertxVersion")
- testCompile("org.mozilla:rhino:$rhinoVersion")
+ testCompile( "org.vert-x:vertx-testframework:$vertxVersion" ) {
+ transitive = false
+ }
+ testCompile "junit:junit:$junitVersion"
+}
- testCompile("org.vert-x:vertx-testframework:$vertxVersion") {
- transitive = false // don't need all of the other language deps
+sourceSets {
+ main {
+ compileClasspath = compileClasspath + configurations.provided
}
+}
+
+task copyMod( type:Copy, dependsOn: 'classes' ) {
+ into "build/mod/$modulename-v$version"
+ from 'build/classes/main'
+ from 'src/main/conf'
+ into( 'lib' ) {
+ from configurations.compile
+ }
+}
+
+// Package into build/libs/mod.zip
+task dist( type: Zip, dependsOn: 'copyMod' ) {
+ group = 'vert.x'
+ description = "Assembles a vert.x module in 'mod.zip' format"
+ destinationDir = project.file('build/libs')
+ archiveName = 'mod.zip'
+ from project.file("build/mod")
+}
- testCompile "junit:junit:$junitVersion"
+
+task prepareVertxTest(type: Sync, dependsOn: 'copyMod' ) {
+ from 'build/mod'
+ into 'build/tmp/mod-test'
}
test {
+ // Can't have the app on the vert.x classpath
+ classpath = files( classpath.findAll {
+ !( it.toString() ==~ /.+build\/(classes|resources)\/main$/ )
+ } )
+
+ // Some vert.x properties
systemProperty 'vertx.test.timeout', 15
systemProperty 'vertx.mods', "$projectDir/build/tmp/mod-test"
+ systemProperty 'vertx.version', "$project.version"
+
+ // Show output
testLogging.showStandardStreams = true
-}
-task prepareVertxTest(type: Sync, dependsOn: ['prepareVertxModule']) {
- from 'build/mod'
- into 'build/tmp/mod-test'
+ // No idea why we need to depend on testClasses...
+ dependsOn << [ 'testClasses', 'copyMod', 'prepareVertxTest' ]
}
-test.dependsOn prepareVertxTest
+
task collectDeps(type: Copy) {
group = 'vert.x'
@@ -80,9 +101,4 @@ task collectDeps(type: Copy) {
into("test") {
from configurations.testCompile
}
-}
-
-task dist(dependsOn: ['build', 'packageVertxModule']) {
- group = 'vert.x'
- description = 'prepare a distributable busmod "mod.zip" package'
-}
+}
View
20 gradle.properties
@@ -1,25 +1,7 @@
-#
-# Copyright 2011 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
modulename=vertx.web-server
version=1.0
-gradleVersion=1.0
-
+gradleVersion=1.1
vertxVersion=1.2.0-SNAPSHOT
-vertxBuildToolsVersion=0.1-SNAPSHOT
-vertxGradlePluginVersion=0.1-SNAPSHOT
junitVersion=4.10
rhinoVersion=1.7R4
View
2  gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.1-bin.zip
View
0  settings.gradle
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.