diff --git a/.gitignore b/.gitignore index 90b0368..5a45c6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated -gradle.properties +gradle.propertiesx local.properties diff --git a/build.gradle.kts b/build.gradle.kts index 6be9712..eca98fa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -50,32 +50,34 @@ kotlin { publishing { repositories { - maven { - name = "releases" - url = uri("http://nexus.astraeus.nl/nexus/content/repositories/releases") - credentials { - val nexusUsername: String by project - val nexusPassword: String by project + if (project.properties["nexusUsername"] != null) { + maven { + name = "releases" + url = uri("http://nexus.astraeus.nl/nexus/content/repositories/releases") + credentials { + val nexusUsername: String by project + val nexusPassword: String by project - username = nexusUsername - password = nexusPassword + username = nexusUsername + password = nexusPassword + } } - } - maven { - name = "snapshots" - url = uri("http://nexus.astraeus.nl/nexus/content/repositories/snapshots") - credentials { - val nexusUsername: String by project - val nexusPassword: String by project + maven { + name = "snapshots" + url = uri("http://nexus.astraeus.nl/nexus/content/repositories/snapshots") + credentials { + val nexusUsername: String by project + val nexusPassword: String by project - username = nexusUsername - password = nexusPassword + username = nexusUsername + password = nexusPassword + } } + } else { + println("Publishing disabled properties not found.") } } publications { val kotlinMultiplatform by getting {} } } - -tasks.getByName("publish").enabled = project.properties["nexusUsername"] != null diff --git a/komp.jsTest.iml b/komp.jsTest.iml index 0741fb6..e8b019c 100644 --- a/komp.jsTest.iml +++ b/komp.jsTest.iml @@ -5,8 +5,8 @@ komp:commonTest - komp.jsMain komp.commonTest + komp.jsMain komp.commonMain COMPILATION_AND_SOURCE_SET_HOLDER