-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (70 loc) · 2.17 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
buildscript {
repositories {
mavenCentral()
}
apply plugin: "ca.mcgill.science.tepid.commons"
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${tepid.kotlin}"
}
wrapper.setDistributionType(Wrapper.DistributionType.ALL)
}
apply plugin: "ca.mcgill.science.tepid.commons"
allprojects {
group "ca.mcgill.science.tepid"
version tepid.tepidCommons
}
ext {
// can be passed with -Ptepid_config_dir=CONFIG_DIR, or set in an environment variable "tepid_config_dir"
tepid_config_dir = project.findProperty('tepid_config_dir') ?: "$System.env.tepid_config_dir"
}
task copyConfigs(type: Copy) {
println(tepid_config_dir)
from "$tepid_config_dir/LDAPTestUser.properties",
"$tepid_config_dir/URL.properties"
into "config"
}
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven'
sourceCompatibility = tepid.jvm_target
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
compileKotlin {
kotlinOptions.jvmTarget = tepid.jvm_target
}
compileTestKotlin {
kotlinOptions.jvmTarget = tepid.jvm_target
}
test {
dependsOn cleanTest
testLogging.showStandardStreams = true
useJUnitPlatform()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
dependencies {
compile tepidDependency.kotlin
testRuntimeOnly(
'org.junit.jupiter:junit-jupiter-engine:5.1.0',
'org.junit.vintage:junit-vintage-engine:5.1.0'
)
testCompile "org.junit.jupiter:junit-jupiter-engine:5.3.1"
testCompile 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testCompile "org.jetbrains.kotlin:kotlin-test:${tepid.kotlin}"
testCompile "org.jetbrains.kotlin:kotlin-test-junit5:${tepid.kotlin}"
testCompile "io.mockk:mockk:1.8"
}
}