Add publishing for Scissors API

This commit is contained in:
Telesphoreo 2022-07-05 17:33:45 -05:00
parent bca6da00e8
commit f66a491861
2 changed files with 43 additions and 2 deletions

12
Jenkinsfile vendored
View File

@ -25,6 +25,18 @@ pipeline {
} }
} }
} }
stage('publish') {
when {
branch "1.17.1"
}
steps {
withCredentials([usernamePassword(credentialsId: '8150559b-ec1d-41bd-a576-aa668a52c1ba', passwordVariable: 'scissorsPassword', usernameVariable: 'scissorsUser')]) {
withGradle {
sh "./gradlew :Scissors-API:publish --no-daemon"
}
}
}
}
} }
post { post {
always { always {

View File

@ -11,7 +11,7 @@ val spigotDecompiler: Configuration by configurations.creating
repositories { repositories {
mavenCentral() mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/") { maven("https://repo.papermc.io/repository/maven-public/") {
content { content {
onlyForConfigurations( onlyForConfigurations(
configurations.paperclip.name, configurations.paperclip.name,
@ -53,7 +53,7 @@ subprojects {
repositories { repositories {
mavenCentral() mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/") maven("https://repo.papermc.io/repository/maven-public/")
} }
} }
@ -73,3 +73,32 @@ paperweight {
} }
} }
} }
tasks.generateDevelopmentBundle {
apiCoordinates.set("me.totalfreedom.scissors:scissors-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
libraryRepositories.set(
listOf(
"https://repo.maven.apache.org/maven2/",
"https://repo.papermc.io/repository/maven-public/",
"https://repo.scissors.gg/repository/scissors-snapshot/",
)
)
}
allprojects {
// Publishing API:
// ./gradlew :Scissors-API:publish[ToMavenLocal]
publishing {
repositories {
maven {
name = "scissors-snapshots"
url = uri("https://repo.scissors.gg/repository/scissors-snapshot/")
credentials {
username = System.getenv("scissorsUser")
password = System.getenv("scissorsPassword")
}
}
}
}
}