-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
82 lines (71 loc) · 2.28 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
import com.vanniktech.maven.publish.SonatypeHost
plugins {
`java-library`
alias(libs.plugins.publish.maven)
alias(libs.plugins.dokka)
kotlin("jvm") version "2.0.0" apply false
}
description = "Java library for Vite integration."
group = "com.javite"
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.dokka")
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
sourceRoots.from(file("src/main/java"))
}
}
}
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
}
object Meta {
const val DESC = "Java library for Vite integration."
const val LICENSE = "MIT"
const val LICENSE_URL = "https://opensource.org/licenses/mit"
const val GITHUB_REPO = "javite-projects/javite"
const val DEVELOPER_ID = "benny123tw"
const val DEVELOPER_NAME = "Benny Yen"
const val DEVELOPER_ORGANIZATION = "com.javite"
const val DEVELOPER_ORGANIZATION_URL = "https://javite.com"
}
mavenPublishing {
println("Publish ${project.group}, ${project.name}, ${project.version}")
coordinates(project.group.toString(), project.name, project.version.toString())
pom {
name.set(project.name)
description.set(Meta.DESC)
inceptionYear.set("2024")
url.set("https://github.com/${Meta.GITHUB_REPO}")
licenses {
license {
name.set(Meta.LICENSE)
url.set(Meta.LICENSE_URL)
}
}
developers {
developer {
id.set(Meta.DEVELOPER_ID)
name.set(Meta.DEVELOPER_NAME)
organization.set(Meta.DEVELOPER_ORGANIZATION)
organizationUrl.set(Meta.DEVELOPER_ORGANIZATION_URL)
}
}
scm {
url.set("https://github.com/${Meta.GITHUB_REPO}.git")
connection.set("scm:git:git://github.com/${Meta.GITHUB_REPO}.git")
developerConnection.set("scm:git:git://github.com/${Meta.GITHUB_REPO}.git")
}
issueManagement {
url.set("https://github.com/${Meta.GITHUB_REPO}/issues")
}
}
}