-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
88 lines (75 loc) · 2.56 KB
/
build.gradle.kts
File metadata and controls
88 lines (75 loc) · 2.56 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
import net.researchgate.release.ReleaseExtension
plugins {
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("net.researchgate.release") version "3.1.0"
id("node-frontend")
id("frontend-archive")
id("frontend-jib")
}
group = "org.openprojectx.ai"
allprojects {
repositories {
mavenCentral()
}
}
publishing {
publications {
create<MavenPublication>("mavenFrontend") {
artifactId = project.name
artifact(tasks.named("frontendJar"))
artifact(tasks.named("frontendSourcesJar"))
pom {
name.set(project.name)
description.set("React frontend for the Error Sense dashboard")
url.set("https://github.com/openprojectx/error-sense-ui")
licenses {
license {
name.set("Apache License 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
}
}
developers {
developer {
id.set("openprojectx")
name.set("OpenProjectX")
email.set("admin@openprojectx.org")
}
}
scm {
url.set("https://github.com/openprojectx/error-sense-ui")
connection.set("scm:git:https://github.com/openprojectx/error-sense-ui.git")
developerConnection.set("scm:git:ssh://git@github.com:openprojectx/error-sense-ui.git")
}
}
}
}
}
signing {
val keyFile = System.getenv("SIGNING_KEY_FILE")
val keyPass = System.getenv("SIGNING_KEY_PASSWORD")
if (!keyFile.isNullOrBlank()) {
val keyText = file(keyFile).readText()
useInMemoryPgpKeys(keyText, keyPass)
sign(publishing.publications)
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username.set(System.getenv("OSSRH_USERNAME"))
password.set(System.getenv("OSSRH_PASSWORD"))
}
}
}
configure<ReleaseExtension> {
buildTasks.set(listOf("publishToSonatype", "closeAndReleaseSonatypeStagingRepository"))
versionPropertyFile.set("gradle.properties")
tagTemplate.set("\$name-\$version")
with(git) {
requireBranch.set("master")
}
}