/
build.gradle
191 lines (151 loc) · 5.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
buildscript {
ext.kotlin_version = '1.5.20'
ext.dokka_version = '0.9.16'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.2.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.2'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
}
}
plugins {
id 'edu.sc.seis.launch4j' version '2.4.4'
id 'se.patrikerdes.use-latest-versions' version '0.2.6'
id 'com.github.ben-manes.versions' version '0.20.0'
id 'org.openjfx.javafxplugin' version '0.0.9'
}
group 'com.kotcity'
version '0.49.4'
apply plugin: 'kotlin'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'idea'
mainClassName = "kotcity.ui.LaunchScreenKt"
targetCompatibility = 1.8
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect"
testCompile "org.jetbrains.kotlin:kotlin-test"
testCompile "org.jetbrains.kotlin:kotlin-test-junit"
compile fileTree(dir: 'jars', include: '*.jar')
compile 'com.github.salomonbrys.kotson:kotson:2.5.0'
compile 'com.github.davidmoten:rtree:0.8.6'
compile 'com.github.kizitonwose.time:time:1.0.2'
compile 'javax.vecmath:vecmath:1.5.2'
implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.2.1"
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1'
compile 'com.github.ben-manes.caffeine:caffeine:2.6.2'
compile 'com.natpryce:konfig:1.6.10.0'
// Optional extensions
compile 'com.github.ben-manes.caffeine:guava:2.6.2'
compile 'com.github.ben-manes.caffeine:jcache:2.6.2'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
// Enable use of the JUnitPlatform Runner within the IDE
testCompile 'org.junit.platform:junit-platform-runner:1.7.2'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-transcoder
compile group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: '1.10'
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-batik
compile group: 'com.twelvemonkeys.imageio', name: 'imageio-batik', version: '3.4.1'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svg-dom
compile group: 'org.apache.xmlgraphics', name: 'batik-svg-dom', version: '1.10'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-anim
compile group: 'org.apache.xmlgraphics', name: 'batik-anim', version: '1.10'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/fop
compile group: 'org.apache.xmlgraphics', name: 'fop', version: '2.3'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/xmlgraphics-commons
compile group: 'org.apache.xmlgraphics', name: 'xmlgraphics-commons', version: '2.3'
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
test {
testLogging {
// Make sure output from standard out or error is shown in Gradle output.
showStandardStreams = true
}
useJUnitPlatform()
}
jar {
manifest {
attributes 'Main-Class': 'kotcity.ui.LaunchScreenKt'
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
dokka {
outputFormat = 'html'
outputDirectory = "docs"
linkMapping {
// Source directory
dir = "src/main/kotlin"
// URL showing where the source code can be accessed through the web browser
url = "https://github.com/kotcity/kotcity/blob/master/src/main/kotlin"
// Suffix which is used to append the line number to the URL. Use #L for GitHub
suffix = "#L"
}
}
junitPlatform {
details 'tree'
}
kotlin {
experimental {
coroutines "enable"
}
}
apply plugin: 'edu.sc.seis.launch4j'
launch4j {
outputDir = "kotcity-pre-alpha"
mainClassName = 'kotcity.ui.LaunchScreenKt'
icon = "${projectDir}/icons/kotcity.ico"
jreMinVersion = 11
}
task copyAssets(type: Copy) {
from 'assets'
into 'build/kotcity-pre-alpha/assets'
}
task copyDistZipAssets(type: Copy) {
from 'assets'
into 'build/libs/assets'
}
task copyShell(type: Copy) {
from 'shell'
into 'build/kotcity-pre-alpha/'
}
createExe.dependsOn copyAssets
createExe.dependsOn copyShell
createExe.dependsOn shadowJar
createExe.dependsOn build
shadowDistZip.dependsOn copyDistZipAssets
shadowDistZip.dependsOn copyShell
task dist {
doLast {
createExe
println("Distribution in build/kotcity-pre-alpha!")
}
}
dist.dependsOn createExe
javafx {
version = "15"
modules = [ 'javafx.controls', 'javafx.swing', 'javafx.fxml' ]
}