mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-29 22:27:31 +00:00
build: 设置了发布小仓库的配置.
目前处于 alpha 版本, 所以构建就不发到 Maven 中央仓库了. 如需使用, 可以看 https://github.com/LamGC/maven-repository 获取引用方式.
This commit is contained in:
parent
6ea36a1129
commit
3d5a009c7c
@ -35,12 +35,24 @@ tasks.withType<KotlinCompile> {
|
|||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
val repoRootKey = "maven.repo.local.root"
|
||||||
credentials {
|
val snapshot = project.version.toString().endsWith("-SNAPSHOT")
|
||||||
|
val repoRoot = System.getProperty(repoRootKey)?.trim()
|
||||||
|
if (repoRoot == null || repoRoot.isEmpty()) {
|
||||||
|
logger.warn(
|
||||||
|
"\"$repoRootKey\" configuration item is not specified, " +
|
||||||
|
"please add start parameter \"-D$repoRootKey {localPublishRepo}\"" +
|
||||||
|
" (if you are not currently executing the publish task, " +
|
||||||
|
"you can ignore this information)"
|
||||||
|
)
|
||||||
|
return@repositories
|
||||||
}
|
}
|
||||||
url = uri("")
|
val repoUri = if (snapshot) {
|
||||||
|
uri("$repoRoot/snapshots")
|
||||||
|
} else {
|
||||||
|
uri("$repoRoot/releases")
|
||||||
}
|
}
|
||||||
|
maven(repoUri)
|
||||||
}
|
}
|
||||||
|
|
||||||
publications {
|
publications {
|
||||||
@ -63,14 +75,14 @@ publishing {
|
|||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
id.set("LamGC")
|
id.set("LamGC")
|
||||||
name.set("Lam GC")
|
name.set("LamGC")
|
||||||
email.set("lam827@lamgc.net")
|
email.set("lam827@lamgc.net")
|
||||||
url.set("https://github.com/LamGC")
|
url.set("https://github.com/LamGC")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scm {
|
scm {
|
||||||
connection.set("scm:git:https://github.com/LamGC/ScalaBot.git")
|
connection.set("scm:git:https://github.com/LamGC/ScalaBot.git")
|
||||||
developerConnection.set("scm:git:ssh://git@github.com:LamGC/ScalaBot.git")
|
developerConnection.set("scm:git:https://github.com/LamGC/ScalaBot.git")
|
||||||
url.set("https://github.com/LamGC/ScalaBot")
|
url.set("https://github.com/LamGC/ScalaBot")
|
||||||
}
|
}
|
||||||
issueManagement {
|
issueManagement {
|
||||||
|
Loading…
Reference in New Issue
Block a user