This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
75 lines (60 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'org.jmailen.kotlinter' version '1.7.0'
}
apply plugin: 'application'
apply plugin: 'kotlin'
apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "com.xenomachina:kotlin-argparser:$kotlin_argparser_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
compile "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
compile "com.natpryce:konfig:$konfig_version"
compile "com.github.spullara.mustache.java:compiler:$mustache_version"
testCompile "io.kotlintest:kotlintest:$kotlintest_version"
testCompile "org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version"
testCompile "com.github.stefanbirkner:system-rules:$system_rules_version"
}
mainClassName = "com.ekino.oss.tooling.demo.MainKt"
// This will cause the wrapper script generated by gradle to pass the program
// name in via the com.xenomachina.argparser.programName property.
//
// TODO: it would be even better if we could convince gradle to pass in $0 (and
// whatever the equivalent is on Windows) so that the name would adapt to
// whatever the user is calling it by (which can vary depending on how it was
// installed, or if the user is calling it with a qualified pathname or via a
// symlink). See also https://stackoverflow.com/q/48307027/90848
applicationDefaultJvmArgs = ["-Dcom.xenomachina.argparser.programName=$name"]
jar {
manifest {
attributes 'Implementation-Title': name,
'Implementation-Version': version
}
}
test {
useJUnitPlatform {
includeEngines 'junit-jupiter'
}
}
// Replace ${project-version} token in properties
processResources {
from(sourceSets.main.resources.srcDirs) {
include '**/*.properties'
filter { String line -> line.replace "\${project-version}", project.version }
}
}