-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
62 lines (50 loc) · 1.13 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlin)
id("maven-publish")
}
val sdkVersion: String by project
group = "cn.rtast"
version = sdkVersion
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation(libs.gson)
}
tasks.jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from("LICENSE")
}
tasks.compileKotlin {
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
}
tasks.compileJava {
targetCompatibility = "1.8"
sourceCompatibility = "1.8"
}
tasks.register<Jar>("sourceJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
artifacts {
archives(tasks.named("sourceJar"))
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(tasks["sourceJar"])
}
}
repositories {
maven {
url = uri("https://repo.rtast.cn/api/v4/projects/38/packages/maven")
credentials {
username = "RTAkland"
password = System.getenv("TOKEN")
}
}
}
}