Skip to content

Commit ffe0f3f

Browse files
small improvements
1 parent abb2251 commit ffe0f3f

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/CentralSonatypeUploadingPart.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const val generateCentralSonatypeUploadingPartImports = """import java.nio.chars
66
import java.net.http.HttpClient
77
import java.net.http.HttpRequest
88
import java.net.http.HttpResponse"""
9-
const val generateCentralSonatypeUploadingPart = """if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
9+
const val generateCentralSonatypeUploadingPart = """// This script work based on https://ossrh-staging-api.central.sonatype.com/swagger-ui/#/default/manual_upload_repository
10+
// and getting available open repos and just uploading them
11+
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
1012
def taskName = "uploadSonatypePublication"
1113
if (rootProject.tasks.names.contains(taskName) == false) {
1214
rootProject.tasks.register(taskName) {

core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/js_only/MavenTemplater.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ publishing {
6161
""" }}
6262
}
6363
}
64-
repositories {
65-
${repositories.joinToString("\n ") { it.build(" ") }}
66-
}
6764
}
6865
}
66+
repositories {
67+
${repositories.joinToString("\n ") { it.build(" ") }}
68+
}
6969
}
7070
${gpgSigning.generateMavenConfig()}
7171
""".trimIndent()

core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/jvm_only/MavenTemplater.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ publishing {
5858
""" }}
5959
}
6060
}
61-
repositories {
62-
${repositories.joinToString("\n ") { it.build(" ") }}
63-
}
6461
}
6562
}
63+
repositories {
64+
${repositories.joinToString("\n ") { it.build(" ") }}
65+
}
6666
}
6767
${gpgSigning.generateMavenConfig()}
6868
""".trimIndent()

core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/mpp/MavenTemplater.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ publishing {
4242
}""" }}
4343
}
4444
}
45-
repositories {
46-
${repositories.joinToString("\n ") { it.build(" ") }}
47-
}
45+
}
46+
repositories {
47+
${repositories.joinToString("\n ") { it.build(" ") }}
4848
}
4949
}
5050
${gpgSigning.generateMavenConfig()}

0 commit comments

Comments
 (0)