-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
93 lines (74 loc) · 2.14 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import gg.essential.gradle.util.setJvmDefault
plugins {
idea
`maven-publish`
kotlin("jvm") version(libs.versions.kotlin.get())
alias(libs.plugins.dokka)
id("gg.essential.multi-version.root") apply(false)
}
subprojects {
if (project.buildFile.name.equals("root.gradle.kts")) return@subprojects
apply(plugin = "idea")
apply(plugin = "maven-publish")
apply(plugin = "kotlin")
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(rootProject.libs.kotlinx.coroutines)
implementation(rootProject.libs.kotlinx.coroutines.jdk8)
implementation(rootProject.libs.guava)
}
tasks {
java {
withSourcesJar()
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
}
compileJava {
options.encoding = Charsets.UTF_8.name()
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
compileKotlin {
setJvmDefault("all")
}
}
if (project.name != "api") {
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
maven("https://repo.plasmoverse.com/snapshots") {
name = "plasmoverseSnapshots"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
}
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.plasmoverse.com/snapshots")
maven("https://repo.plo.su")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io/")
}
}
tasks {
build {
doLast {
jar.get().archiveFile.get().asFile.delete()
}
}
}