-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (84 loc) · 2.39 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
97
98
99
100
101
102
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Kotlin application project to get you started.
*/
plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin.
id 'org.jetbrains.kotlin.jvm' version '1.3.41'
// Apply the application plugin to add support for building a CLI application.
id 'application'
id 'org.jetbrains.dokka' version '0.10.0'
}
sourceSets {
main.kotlin.srcDirs += 'code'
main.java.srcDirs += 'code'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// Align versions of all Kotlin components
implementation platform('org.jetbrains.kotlin:kotlin-bom')
// Use the Kotlin JDK 8 standard library.
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
// Use the Kotlin test library.
testImplementation 'org.jetbrains.kotlin:kotlin-test'
// Use the Kotlin JUnit integration.
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.3.60'
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.9.1'
}
application {
// Define the main class for the application
mainClassName = 'salt.AppKt'
}
task initSalt(type: Copy) {
from('init/resources')
into('../../../resources')
}
task initTests() {
copy {
from('code')
into('tests/default/src/main/kotlin/def/salt')
}
copy {
from('init/resources') {
exclude 'config.toml'
}
into('tests/default/src/main/resources')
}
}
task testDefault(type: Exec) {
workingDir "tests/default"
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
commandLine "cmd", "/c", "gradlew", "test"
} else {
commandLine "bash", "-c", "./gradlew", "test"
}
}
dokka {
outputFormat = 'gfm'
outputDirectory = "docs"
configuration {
includes = ['packages.md']
sourceLink {
path = "code"
url = "https://github.com/kurbaniec-tgm/salt/tree/master/code"
lineSuffix = "#L"
}
}
}
task docs(dependsOn: 'dokka') {
doLast {
copy {
from("docs/salt")
into("docs")
}
delete {
delete 'docs/salt'
}
}
}