mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-29 14:17:30 +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 {
|
||||
repositories {
|
||||
maven {
|
||||
credentials {
|
||||
|
||||
val repoRootKey = "maven.repo.local.root"
|
||||
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 {
|
||||
@ -70,7 +82,7 @@ publishing {
|
||||
}
|
||||
scm {
|
||||
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")
|
||||
}
|
||||
issueManagement {
|
||||
|
Loading…
Reference in New Issue
Block a user