-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
75 lines (62 loc) · 1.54 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlin)
id("maven-publish")
}
val libVersion: String by project
subprojects {
group = "cn.rtast"
version = libVersion
apply {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "maven-publish")
}
repositories {
mavenCentral()
}
val sourceJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
artifacts {
archives(sourceJar)
}
tasks.jar {
from("LICENSE") {
rename { "ROneBot-LICENSE-Apache2.0" }
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(sourceJar)
artifactId = project.name
version = libVersion
}
}
repositories {
maven {
url = uri("https://maven.rtast.cn/releases/")
credentials {
username = "RTAkland"
password = System.getenv("PUBLISH_TOKEN")
}
}
}
}
}
allprojects {
repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://libraries.minecraft.net")
}
tasks.compileKotlin {
compilerOptions.jvmTarget = JvmTarget.JVM_11
}
tasks.compileJava {
sourceCompatibility = "11"
targetCompatibility = "11"
}
}