mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-28 01:10:17 +08:00
[publish] Create MiraiStageRepo
This commit is contained in:
parent
28f198d03f
commit
4215ae4605
@ -20,6 +20,7 @@ import org.gradle.api.tasks.bundling.Jar
|
|||||||
import org.gradle.kotlin.dsl.get
|
import org.gradle.kotlin.dsl.get
|
||||||
import org.gradle.kotlin.dsl.getByName
|
import org.gradle.kotlin.dsl.getByName
|
||||||
import org.gradle.kotlin.dsl.register
|
import org.gradle.kotlin.dsl.register
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
fun Project.configureRemoteRepos() {
|
fun Project.configureRemoteRepos() {
|
||||||
tasks.register("ensureMavenCentralAvailable") {
|
tasks.register("ensureMavenCentralAvailable") {
|
||||||
@ -38,6 +39,17 @@ fun Project.configureRemoteRepos() {
|
|||||||
// sonatype
|
// sonatype
|
||||||
val keys = SecretKeys.getCache(project)
|
val keys = SecretKeys.getCache(project)
|
||||||
repositories {
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "MiraiStageRepo"
|
||||||
|
var stageRepoLoc = getLocalProperty("publishing.stage-repo")?.let(::File)
|
||||||
|
if (stageRepoLoc?.exists() != true) {
|
||||||
|
stageRepoLoc = rootProject.file("ci-release-helper/stage-repo")
|
||||||
|
}
|
||||||
|
stageRepoLoc as File
|
||||||
|
|
||||||
|
url = stageRepoLoc.also { it.mkdirs() }.toURI()
|
||||||
|
}
|
||||||
|
|
||||||
if (System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING")?.toBoolean() == true) {
|
if (System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING")?.toBoolean() == true) {
|
||||||
maven {
|
maven {
|
||||||
name = "MiraiRepo"
|
name = "MiraiRepo"
|
||||||
|
Loading…
Reference in New Issue
Block a user