-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
81 lines (66 loc) · 2.1 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
/* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/4.6/userguide/java_library_plugin.html
*/
version = '2.0'
buildscript {
ext.kotlin_version = '1.2.51'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.1.0'
classpath 'com.kncept.junit5.reporter:junit-reporter:1.1.0'
}
}
apply plugin: "kotlin"
apply plugin: 'java'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'com.kncept.junit5.reporter'
compileKotlin {
kotlinOptions {
includeRuntime = true
noStdlib = false
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-runtime"
compile "org.jetbrains.kotlin:kotlin-stdlib"
//compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile 'commons-cli:commons-cli:1.4'
compile 'com.google.code.gson:gson:2.7'
testCompile "org.jetbrains.kotlin:kotlin-test"
testCompile "org.jetbrains.kotlin:kotlin-test-junit"
// This dependency is exported to consumers, that is to say found on their compile classpath.
//api 'org.apache.commons:commons-math3:3.6.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
}
test {
useJUnitPlatform()
}
allprojects {
repositories {
mavenCentral()
jcenter()
}
}
jar {
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'Copyright 2018 Steve Ball <[email protected]>',
'Main-Class': 'cmd.JudokuKt'
}
from {
String[] include = [
"kotlin-runtime-${kotlin_version}.jar",
"kotlin-stdlib-${kotlin_version}.jar",
"gson-2.2.2.jar"
]
configurations.compile
.findAll { include.contains(it.name) }
.collect { it.isDirectory() ? it : zipTree(it) }
}
}