Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

102 lines (80 sloc) 2.354 kB
def buildDir = 'build'
def workDir = "${buildDir}/work"
def appZip = 'vertx-vtoons.zip'
repositories {
mavenCentral()
mavenRepo url:'http://repo.springsource.org/libs-snapshot'
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = 'vertx.io'
addArtifactPattern 'http://[organisation]/downloads/[module]-[revision].[ext]'
}
}
configurations {
framework
jars
}
dependencies {
framework "vertx.io:vert.x:${vertxVersion}@zip"
jars "org.cloudfoundry:cloudfoundry-runtime:0.8.2"
}
task runtime(type: Copy) {
destinationDir file("${workDir}")
from configurations.framework
doLast {
ant.unzip(src: "${workDir}/vert.x-${vertxVersion}.zip", dest: "${workDir}")
ant.delete(file: "${workDir}/vert.x-${vertxVersion}.zip")
}
}
task build(type: Copy, dependsOn: 'runtime') {
destinationDir file("${workDir}")
from(configurations.jars) {
into 'mods/vtoons/lib'
}
from('src') {
into 'mods/vtoons'
}
}
task assemble(type: Zip, dependsOn: 'build') {
destinationDir = file("${buildDir}")
outputs.dir destinationDir
archiveName = "${appZip}"
from file("${workDir}")
}
task clean(type: Delete) {
delete "${buildDir}"
}
task wrapper(type: Wrapper) { gradleVersion = "1.1" }
/*
Gradle CloudFoundry plugin configuration.
Set your credentials with the -P option when you run gradle cf- commands like this:
./gradlew cf-push -PcfUser=username@email.com -PcfPasswd=secret
NOTE: You need to pick a different uri for the app since they have to be unique
and the current one is already taken.
*/
buildscript {
repositories {
mavenCentral()
mavenRepo url:'http://repo.springsource.org/libs-snapshot'
}
dependencies {
classpath group: 'org.gradle.api.plugins', name: 'gradle-cf-plugin', version: '0.2.0'
}
}
apply plugin: 'cloudfoundry'
cloudfoundry {
username = rootProject.hasProperty('cfUser') ? rootProject.cfUser : ''
password = rootProject.hasProperty('cfPasswd') ? rootProject.cfPasswd : ''
application = 'vtoons'
framework = 'standalone'
runtime = 'java7'
memory = 256
uris = ['vtoons.cloudfoundry.com']
services = ['mongodb-vtoons']
file = file("${buildDir}/${appZip}")
command = "vert.x-${vertxVersion}/bin/vertx runmod vtoons"
}
cloudfoundryService {
serviceName = 'mongodb-vtoons'
vendor = 'mongodb'
version = '2.0'
}
Jump to Line
Something went wrong with that request. Please try again.