diff --git a/Jenkinsfile b/Jenkinsfile index d9e3f7e..923e426 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,6 +25,18 @@ pipeline { } } } + stage('publish') { + when { + branch "1.18.2" + } + steps { + withCredentials([usernamePassword(credentialsId: '8150559b-ec1d-41bd-a576-aa668a52c1ba', passwordVariable: 'scissorsPassword', usernameVariable: 'scissorsUser')]) { + withGradle { + sh "./gradlew :Scissors-API:publish --no-daemon" + } + } + } + } } post { always { diff --git a/build.gradle.kts b/build.gradle.kts index 19c939a..af4a326 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -64,4 +64,33 @@ paperweight { serverOutputDir.set(layout.projectDirectory.dir("Scissors-Server")) } } +} + +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/", + paperMavenPublicUrl, + "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") + } + } + } + } } \ No newline at end of file