-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
66 lines (50 loc) · 1.53 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
application
// https://imperceptiblethoughts.com/shadow/getting-started
id("com.github.johnrengelman.shadow") version "8.1.1"
// https://kotlinlang.org/docs/gradle-configure-project.html
kotlin("jvm") version "2.0.10"
}
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
repositories {
gradlePluginPortal()
maven { url = uri("https://jitpack.io") }
maven { url = uri("maven-local") }
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
tasks.test {
useJUnitPlatform()
}
val mapsForgeVersion: String by project
val mapsForgeGtkVersion: String by project
dependencies {
implementation("org.mapsforge:mapsforge-map-reader:${mapsForgeVersion}")
implementation("com.github.bailuk:mapsforge-gtk:${mapsForgeGtkVersion}")
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation("com.google.code.gson:gson:2.10.1")
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
implementation("com.squareup.okhttp3:okhttp:4.12.0")
}
val appMainClass = "AppKt"
application {
mainClass.set(appMainClass)
}
tasks {
named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
mergeServiceFiles()
manifest {
attributes(mapOf("Main-Class" to appMainClass))
}
}
}
tasks {
build {
dependsOn(shadowJar)
}
}