-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
47 lines (39 loc) · 1.45 KB
/
build.gradle
File metadata and controls
47 lines (39 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '1.2.0'
}
version = '1.0-SNAPSHOT'
sourceCompatibility = 1.6
targetCompatibility = 1.6
mainClassName = "no.bfsk.jrsync.JRSync"
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.httpcomponents:httpcore:4.4'
compile 'org.apache.httpcomponents:httpclient:4.3.6'
compile 'org.apache.httpcomponents:httpmime:4.3.6'
runtime files('libs/sqljdbc4.jar') // sqljdbc4 is not in maven
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}
// fix startup scripts for normal app build
startScripts {
doLast {
def propertiesDir = "conf"
def propertiesFile = "jrsync.properties"
unixScript.text = unixScript.text.replace("$mainClassName", "$mainClassName ${'$APP_HOME/'}$propertiesDir/$propertiesFile")
windowsScript.text = windowsScript.text.replace("$mainClassName", "$mainClassName %APP_HOME%\\$propertiesDir\\$propertiesFile")
}
}
// fix startup scripts for shadow app build (single jar)
startShadowScripts {
doLast {
def propertiesDir = "conf"
def propertiesFile = "jrsync.properties"
unixScript.text = unixScript.text.replace("$shadowJar.archiveName", "$shadowJar.archiveName ${'$APP_HOME/'}$propertiesDir/$propertiesFile")
windowsScript.text = windowsScript.text.replace("$shadowJar.archiveName", "$shadowJar.archiveName %APP_HOME%\\$propertiesDir\\$propertiesFile")
}
}