/
build.gradle
49 lines (39 loc) · 1.46 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
group 'com.github.holgerbrandl.kscript.launcher'
version '0.1-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'kotlin'
//apply plugin: 'maven'
apply plugin: 'com.github.johnrengelman.shadow'
dependencies {
// https://docs.gradle.org/current/userguide/java_plugin.html#sec:java_plugin_and_dependency_management
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// compile "org.apache.commons:commons-csv:1.3"
compile "com.offbytwo:docopt:0.6.0.20150202"
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile "io.kotlintest:kotlintest:2.0.7"
}
repositories {
// mavenCentral()
jcenter()
}
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
}
}
// copy shadow output back into root directory for simplified testing (see http://imperceptiblethoughts.com/shadow/)
shadowJar.doLast{
copy { from 'build/libs/kscript-0.1-SNAPSHOT-all.jar' ; into projectDir; rename { 'kscript.jar' } }
}
// make sure to remove kscript.jar in project root first on clean
// from https://stackoverflow.com/questions/29813189/how-do-i-extend-gradles-clean-task-to-delete-a-file
clean.doFirst {
delete "${projectDir}/kscript.jar"
println "deleting ./kscript.jar"
}