-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
66 lines (56 loc) · 1.52 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
plugins {
kotlin("jvm") version "1.9.21"
`maven-publish`
}
group = "ru.DmN.pht"
version = "1.29.3"
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
api("ru.DmN.siberia:Project-Siberia:1.25.1")
implementation(kotlin("reflect"))
implementation("org.ow2.asm:asm:9.5")
implementation("org.ow2.asm:asm-tree:9.5")
implementation("org.ow2.asm:asm-util:9.5")
implementation("org.ow2.asm:asm-commons:9.5")
testImplementation(kotlin("test"))
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlin {
jvmToolchain(8)
}
tasks {
val fatJar = register<Jar>("fatJar") {
dependsOn.addAll(listOf("compileJava", "compileKotlin", "processResources"))
archiveClassifier.set("standalone")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest { attributes(mapOf("Main-Class" to "ru.DmN.pht.ConsoleImpl")) }
val sourcesMain = sourceSets.main.get()
val contents = configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) } + sourcesMain.output
from(contents)
}
build {
dependsOn(fatJar)
}
java {
withSourcesJar()
}
test {
useJUnitPlatform()
}
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group as String
artifactId = "Project-Pihta"
version = project.version as String
from(components["java"])
}
}
}