-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
92 lines (82 loc) · 2.57 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
plugins {
`java-library`
`maven-publish`
signing
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
group = "org.chenliang.oggus"
repositories {
jcenter()
}
dependencies {
implementation("com.google.guava:guava:29.0-jre")
// Use JUnit Jupiter API for testing.
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.6.0")
// Use JUnit Jupiter Engine for testing.
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.0")
}
val test by tasks.getting(Test::class) {
// Use junit platform for unit tests
useJUnitPlatform()
}
tasks {
jar {
manifest {
attributes(
mapOf("Implementation-Title" to project.name, "Implementation-Version" to project.version)
)
}
}
}
publishing {
publications {
create<MavenPublication>("oggus") {
from(components["java"])
pom {
name.set("Oggus")
description.set("Oggus is a Java library for reading and writing Ogg and Opus stream. Opus packet structure is supported.")
url.set("https://github.com/leonfancy/oggus")
licenses {
license {
name.set("WTFPL")
url.set("https://github.com/leonfancy/oggus/blob/master/LICENSE")
}
}
developers {
developer {
id.set("slimhigh")
name.set("Liang Chen")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/leonfancy/oggus.git")
developerConnection.set("scm:git:https://github.com/leonfancy/oggus.git")
url.set("https://github.com/leonfancy/oggus")
}
}
}
}
repositories {
maven {
name = "OSSRH"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("SONATYPE_USER")
password = System.getenv("SONATYPE_PWD")
}
}
}
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["oggus"])
}