-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
51 lines (41 loc) · 1.27 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
plugins {
java
kotlin("jvm") version "1.4.10"
}
group = "xyz.acrylicstyle"
version = "1.0"
repositories {
mavenCentral()
maven { url = uri("https://repo2.acrylicstyle.xyz/") }
}
dependencies {
implementation(kotlin("stdlib"))
compileOnly("org.spigotmc:spigot-api:1.8-R0.1-SNAPSHOT")
testCompile("junit", "junit", "4.12")
}
tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = listOf(
"-Xjsr305=strict"
)
}
withType<JavaCompile>().configureEach {
options.encoding = "utf-8"
}
withType<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)
}
from(projectDir) { include("LICENSE") }
}
withType<Jar> {
from(configurations.getByName("implementation").apply { isCanBeResolved = true }.map { if (it.isDirectory) it else zipTree(it) })
}
}