-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
61 lines (47 loc) · 1.57 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
val kotlinVersion: String by project
val exposedVersion: String by project
plugins {
kotlin("jvm") version "2.0.0"
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
`java-library`
}
repositories {
mavenCentral()
}
group = "net.azisaba.api"
version = "0.0.1"
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("org.jetbrains.kotlin.plugin.serialization")
plugin("com.github.johnrengelman.shadow")
plugin("java-library")
}
group = parent!!.group
version = parent!!.version
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
repositories {
mavenCentral()
maven { url = uri("https://repo.azisaba.net/repository/maven-public/") }
}
tasks {
processResources {
filteringCharset = "UTF-8"
from(sourceSets.main.get().resources.srcDirs) {
include("**")
val tokenReplacementMap = mapOf(
"version" to project.version,
"name" to project.rootProject.name,
)
filter<org.apache.tools.ant.filters.ReplaceTokens>("tokens" to tokenReplacementMap)
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(projectDir) { include("LICENSE") }
}
shadowJar {
archiveFileName.set("${parent!!.name}-${this@subprojects.name}-${project.version}.jar")
}
}
}