-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle.kts
106 lines (87 loc) · 3.12 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
94
95
96
97
98
99
100
101
102
103
104
105
106
import java.io.BufferedInputStream
import java.io.InputStream
import java.lang.IllegalStateException
import java.util.Properties
plugins {
id("java")
`maven-publish`
`java-library`
signing
}
group = "io.github.R2turnTrue"
version = "0.0.12"
val publishProps = Properties()
publishProps.load(
File("publish.properties").inputStream())
ext["signing.keyId"] = publishProps["signing.keyId"]
ext["signing.password"] = publishProps["signing.password"]
ext["signing.secretKeyRingFile"] = publishProps["signing.secretKeyRingFile"]
repositories {
mavenCentral()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
implementation("org.jetbrains:annotations:24.1.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("org.java-websocket:Java-WebSocket:1.5.5")
implementation("org.seleniumhq.selenium:selenium-java:4.26.0")
}
tasks.test {
useJUnitPlatform()
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>(rootProject.name) {
artifactId = "chzzk4j"
groupId = "io.github.R2turnTrue"
version = "0.0.12"
from(components["java"])
repositories {
maven {
name = "MavenCentral"
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
//val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
//url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
url = uri(releasesRepoUrl)
credentials.runCatching {
username = publishProps["nexusUsername"] as String
password = publishProps["nexusPassword"] as String
}
}
}
pom {
name = "chzzk4j"
description = "Unofficial Java API library of CHZZK (치지직, the video streaming service of Naver)"
url = "https://github.com/R2turnTrue/chzzk4j"
developers {
developer {
name = "R2turnTrue"
email = "[email protected]"
url = "https://github.com/R2turnTrue"
}
}
scm {
connection = "scm:git:git://github.com/R2turnTrue/chzzk4j.git"
developerConnection = "scm:git:ssh://github.com:R2turnTrue/chzzk4j.git"
url = "https://github.com/R2turnTrue/chzzk4j/tree/master"
}
licenses {
license {
name = "MIT License"
url = "https://opensource.org/license/mit/"
}
}
}
}
}
}
signing {
isRequired = true
sign(publishing.publications[rootProject.name])
}