-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
65 lines (56 loc) · 2.06 KB
/
build.gradle
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java-library'
id 'org.beryx.runtime' version '1.1.5'
}
sourceCompatibility = 11
targetCompatibility = 11
repositories {
jcenter()
}
dependencies {
implementation 'info.picocli:picocli:3.9.5'
implementation 'com.google.guava:guava:18.0'
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.11'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.11'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.11'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.11'
implementation 'org.codehaus.groovy:groovy-all:2.5.7'
// test
testImplementation 'junit:junit:4.12'
testImplementation 'org.assertj:assertj-core:3.10.0'
testImplementation 'com.github.marschall:memoryfilesystem:2.1.0'
}
processResources {
from('src/main/resources') {
include 'cli.properties'
include 'rf2-spec.yml'
filter(ReplaceTokens, tokens: [version : project.version])
}
}
application {
mainClassName = 'com.b2international.rf2.RF2'
applicationName = 'rf2'
}
// select Java 11 modules to be included in runtime here
def java11_modules = ['java.base', 'java.sql', 'jdk.zipfs', 'java.desktop', 'java.scripting']
if (System.getenv("TRAVIS") != null) {
// in case of TRAVIS-CI build, build for all platforms
runtime {
targetPlatform('linux-x64', System.getenv("JDK11_LINUX"))
targetPlatform('osx-x64', System.getenv("JDK11_OSX"))
targetPlatform('win-x64', System.getenv("JDK11_WIN"))
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
modules = java11_modules
imageDir = file("$buildDir/${rootProject.name}-${version}")
imageZip = file("$buildDir/${rootProject.name}-${version}.zip")
}
} else {
// otherwise just for the running platform
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
modules = java11_modules
imageDir = file("$buildDir/${rootProject.name}-${version}")
imageZip = file("$buildDir/${rootProject.name}-${version}.zip")
}
}