Skip to content

Instantly share code, notes, and snippets.

@alhafoudh
Created July 14, 2016 17:56
Show Gist options
  • Save alhafoudh/0c83e019525b6fc36e31aeab0b26be7c to your computer and use it in GitHub Desktop.
Save alhafoudh/0c83e019525b6fc36e31aeab0b26be7c to your computer and use it in GitHub Desktop.
Gradle file for backendless hosted service
group 'sk.freevision.myservice'
version '1.0.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
testCompile 'junit:junit:4.12'
}
def deployDir = "${projectDir}/deploy"
def binDir = "${projectDir}/bin"
task cleanDeploy(type: Delete) {
delete deployDir
}
task copyClasses(type: Copy) {
from(sourceSets.main.output.classesDir) {
include '**/*'
}
into "${deployDir}/classes"
}
task copyLibs(type: Copy) {
from configurations.runtime
into "${deployDir}/libs"
}
task copyBin(type: Copy) {
from binDir
into "${deployDir}/bin"
}
task prepareDeploy
prepareDeploy.dependsOn cleanDeploy
prepareDeploy.dependsOn copyClasses
prepareDeploy.dependsOn copyLibs
prepareDeploy.dependsOn copyBin
build.finalizedBy prepareDeploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment