Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
purplefox committed Aug 2, 2012
1 parent a749b39 commit ebc64ca
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 56 deletions.
88 changes: 52 additions & 36 deletions build.gradle
Expand Up @@ -14,61 +14,82 @@
* 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' }
mavenCentral()
}

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'
Expand All @@ -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'
}
}
20 changes: 1 addition & 19 deletions 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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -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
Empty file removed settings.gradle
Empty file.

0 comments on commit ebc64ca

Please sign in to comment.