-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
65 lines (49 loc) · 1.29 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
plugins {
id "base"
id "java"
id "org.jetbrains.kotlin.jvm" version "1.4.30" apply false //apply in sub-projects
}
println "Gradle version is ${gradle.getGradleVersion()}"
ext.slf4j_version = '1.7.25'
ext.picocli_version = '4.5.0'
ext.fmi4j_version = '0.37.0'
wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '6.7'
}
subprojects { sub ->
repositories {
mavenCentral()
}
dependencies {
sub.plugins.withId('kotlin') {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
}
}
sub.plugins.withId('kotlin') {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
javaParameters = true
}
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
}
tasks.create('cleanTemp') {
doLast {
def temp = new File(System.getProperty("java.io.tmpdir"))
temp.listFiles(new FilenameFilter() {
@Override
boolean accept(File dir, String name) {
return dir == temp && name.startsWith("fmi4j_") ||
dir == temp && name.startsWith("fmu_proxy")
}
}).each {
it.deleteDir()
}
}
}
clean.dependsOn(cleanTemp)