Fix publish plugin

This commit is contained in:
redtea committed 2024-06-27 23:59:03 +03:00
1 parent 4fccb6bcec
commit fc76eb1160
10 files changed
+24 -21

No files matched your search

+6 -3
View File
@@ -4,6 +4,7 @@ plugins {
id("java") id("java")
kotlin("jvm") kotlin("jvm")
id("com.github.johnrengelman.shadow") version "7.1.2" id("com.github.johnrengelman.shadow") version "7.1.2"
id("maven-publish") id("maven-publish")
id("signing") id("signing")
} }
@@ -101,17 +102,19 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
} }
} }
signing { signing {
useGpgCmd() useGpgCmd()
sign(publishing.publications.getByName("maven")) sign(publishing.publications.asMap.values.first())
} }
val compileKotlin: KotlinCompile by tasks val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions { compileKotlin.kotlinOptions {
+2 -2
View File
@@ -103,8 +103,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -110,8 +110,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -102,8 +102,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -105,8 +105,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -106,8 +106,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -112,8 +112,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -105,8 +105,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -105,8 +105,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }
+2 -2
View File
@@ -105,8 +105,8 @@ publishing {
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials { credentials {
username = "itzRedTea" username = project.findProperty("ossrhUsername").toString()
password = project.findProperty("password").toString() password = project.findProperty("ossrhPassword").toString()
} }
} }