-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
100 lines (93 loc) · 3.27 KB
/
build.gradle
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
plugins {
id 'java'
id 'kr.entree.spigradle.base' version '2.4.3'
id 'maven-publish'
id 'signing'
}
repositories {
mavenCentral()
spigotmc()
}
dependencies {
compileOnly spigot('1.20.4')
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}
java {
toolchain.setLanguageVersion(JavaLanguageVersion.of(8))
withSourcesJar()
withJavadocJar()
}
allprojects {
group = 'io.typst'
version = '1.0.0'
def moduleName = it == rootProject ? "core" : name.substring(name.lastIndexOf('-') + 1)
println(moduleName)
ext.registerPublish = {
publishing {
publications {
create(moduleName, MavenPublication) {
from(components['java'])
groupId = project.group
artifactId = project.name
version = project.version
pom {
name.set("${project.group}:${project.name}")
description.set("Normalized inventory operations for Bukkit.")
url.set("https://github.com/typst-io/bukkit-inventory")
licenses {
license {
name.set("The GNU General Public License, Version 3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
}
}
developers {
developer {
id.set("entrypointkr")
name.set("Junhyung Im")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/typst-io/command.git")
developerConnection.set("scm:git:ssh://github.com:typst-io/command.git")
url.set("https://github.com/typst-io/command/tree/master")
}
}
}
}
repositories {
maven {
name = "sonatypeReleases"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = findProperty("ossrhUsername")?.toString()
password = findProperty("ossrhPassword")?.toString()
}
}
maven {
name = "sonatypeSnapshots"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
credentials {
username = findProperty("ossrhUsername")?.toString()
password = findProperty("ossrhPassword")?.toString()
}
}
}
}
signing {
sign(publishing.publications[moduleName])
}
java {
withSourcesJar()
withJavadocJar()
}
tasks.javadoc {
options.encoding = 'UTF-8'
}
}
}
registerPublish(this)