Created
July 14, 2016 17:56
-
-
Save alhafoudh/0c83e019525b6fc36e31aeab0b26be7c to your computer and use it in GitHub Desktop.
Gradle file for backendless hosted service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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