-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
79 lines (64 loc) · 2 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
67
68
69
70
71
72
73
74
75
76
77
78
79
plugins {
kotlin("jvm") version "1.8.21"
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
application
}
group = "eu.jameshamilton"
version = "0.1"
repositories {
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
implementation("com.guardsquare:proguard-core:9.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.4")
implementation("com.github.netomi.bat:common:e0d9f969e4f8ca7c95186bf4d2b11ed327bec6e3")
implementation("com.github.netomi.bat:dexfile:e0d9f969e4f8ca7c95186bf4d2b11ed327bec6e3")
implementation("com.github.netomi.bat:dexdump:e0d9f969e4f8ca7c95186bf4d2b11ed327bec6e3")
testImplementation(kotlin("test"))
testImplementation("io.kotest:kotest-runner-junit5-jvm:5.6.2")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.6.2")
testImplementation("io.kotest:kotest-property-jvm:5.6.2")
testImplementation("io.kotest:kotest-framework-datatest:5.6.2")
testImplementation("io.mockk:mockk:1.12.3")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.test {
useJUnitPlatform()
}
application {
mainClass.set("eu.jameshamilton.bf.MainKt")
}
ktlint {
enableExperimentalRules.set(true)
disabledRules.set(setOf("no-wildcard-imports", "experimental:argument-list-wrapping"))
}
tasks.register<Jar>("fatJar") {
archiveFileName.set("bf.jar")
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes["Main-Class"] = "eu.jameshamilton.bf.MainKt"
attributes["Implementation-Version"] = project.version
}
}
tasks.register<Copy>("copyJar") {
from(tasks.named("fatJar"))
into("$rootDir/lib")
}
tasks.named("build") {
finalizedBy(":copyJar")
}
tasks.named("clean") {
doFirst {
File("$rootDir/lib/bf.jar").delete()
}
}