-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
88 lines (84 loc) · 3.15 KB
/
build.gradle
File metadata and controls
88 lines (84 loc) · 3.15 KB
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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
repositories {
mavenCentral()
}
tasks.register("publishCentralPortal") {
group = 'publishing'
doLast {
def url = new URL("https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/$project.group")
println(url)
def con = url.openConnection() as HttpURLConnection
def username = findProperty("ossrhUsername")?.toString()
def password = findProperty("ossrhPassword")?.toString()
def credential = Base64.encoder.encodeToString("$username:$password".getBytes())
def authValue = "Bearer $credential"
con.setRequestMethod("POST")
con.setRequestProperty("Authorization", authValue)
println(con.responseCode)
}
}
allprojects {
group = 'io.typst'
version = '2.7.6'
def moduleName = 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 Games.")
url.set("https://github.com/typst-io/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("entrypointkr@gmail.com")
}
}
scm {
connection.set("scm:git:git://github.com/typst-io/inventory.git")
developerConnection.set("scm:git:ssh://github.com:typst-io/inventory.git")
url.set("https://github.com/typst-io/inventory/tree/master")
}
}
}
}
repositories {
maven {
name = "sonatypeReleases"
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/")
credentials {
username = findProperty("ossrhUsername")?.toString()
password = findProperty("ossrhPassword")?.toString()
}
}
}
}
signing {
sign(publishing.publications[moduleName])
}
java {
withSourcesJar()
withJavadocJar()
}
tasks.javadoc {
options.encoding = 'UTF-8'
}
}
}