diff --git a/build.gradle.kts b/build.gradle.kts index 33d4a98..40348ed 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,8 +9,8 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.dokka.Platform plugins { - kotlin("multiplatform") version "1.4.31" - id("org.jetbrains.dokka") version "1.4.20" + kotlin("multiplatform") version "1.4.32" + id("org.jetbrains.dokka") version "1.4.30" `maven-publish` } @@ -23,13 +23,13 @@ buildscript { dependencies { classpath("com.android.tools.build:gradle:4.0.2") - classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20") + classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.30") } } allprojects { group = "fr.acinq.secp256k1" - version = "0.5.1" + version = "0.5.2-SNAPSHOT" repositories { jcenter() @@ -112,19 +112,6 @@ allprojects { } } -// Publication -val bintrayRepo = if (project.version.toString().contains("SNAPSHOT")) "snapshots" else "libs" - -val bintrayUsername: String? = (properties["bintrayUsername"] as String?) ?: System.getenv("BINTRAY_USER") -val bintrayApiKey: String? = (properties["bintrayApiKey"] as String?) ?: System.getenv("BINTRAY_APIKEY") -val hasBintray = bintrayUsername != null && bintrayApiKey != null -if (!hasBintray) logger.warn("Skipping bintray configuration as bintrayUsername or bintrayApiKey is not defined") - -val sonatypeUsername: String? = (properties["sonatypeUsername"] as String?) ?: System.getenv("SONATYPE_USERNAME") -val sonatypePassword: String? = (properties["sonatypePassword"] as String?) ?: System.getenv("SONATYPE_PASSWORD") -val hasSonatype = sonatypeUsername != null && sonatypePassword != null -if (!hasSonatype) logger.warn("Skipping sonatype snapshot configuration as sonatypeUsername or sonatypePassword is not defined") - allprojects { val javadocJar = tasks.create("javadocJar") { archiveClassifier.set("javadoc") @@ -134,30 +121,6 @@ allprojects { // Publication plugins.withId("maven-publish") { publishing { - repositories { - if (hasBintray) { - maven { - name = "bintray" - setUrl("https://api.bintray.com/maven/acinq/$bintrayRepo/${rootProject.name}/;publish=0") - credentials { - username = bintrayUsername - password = bintrayApiKey - } - } - } - - if (hasSonatype) { - maven { - name = "snapshot" - setUrl("https://oss.sonatype.org/content/repositories/snapshots") - credentials { - username = sonatypeUsername - password = sonatypePassword - } - } - } - } - publications.withType().configureEach { version = project.version.toString() artifact(javadocJar) @@ -224,32 +187,6 @@ allprojects { } } -if (hasBintray) { - val postBintrayPublish by tasks.creating { - doLast { - HttpClients.createDefault().use { client -> - val post = HttpPost("https://api.bintray.com/content/acinq/$bintrayRepo/${rootProject.name}/${project.version.toString()}/publish").apply { - entity = StringEntity("{}", ContentType.APPLICATION_JSON) - addHeader(BasicScheme().authenticate(UsernamePasswordCredentials(bintrayUsername, bintrayApiKey), this, null)) - } - client.execute(post) - } - } - } - - val postBintrayDiscard by tasks.creating { - doLast { - HttpClients.createDefault().use { client -> - val post = HttpPost("https://api.bintray.com/content/acinq/$bintrayRepo/${rootProject.name}/${project.version.toString()}/publish").apply { - entity = StringEntity("{ \"discard\": true }", ContentType.APPLICATION_JSON) - addHeader(BasicScheme().authenticate(UsernamePasswordCredentials(bintrayUsername, bintrayApiKey), this, null)) - } - client.execute(post) - } - } - } -} - allprojects { afterEvaluate { tasks.withType() {