Use kotlin 1.4.32, set version to 0.5.2-SNAPSHOT, remove bintray settings. (#18)
This commit is contained in:
parent
0751d7c103
commit
b23733d5d4
@ -9,8 +9,8 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
|||||||
import org.jetbrains.dokka.Platform
|
import org.jetbrains.dokka.Platform
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform") version "1.4.31"
|
kotlin("multiplatform") version "1.4.32"
|
||||||
id("org.jetbrains.dokka") version "1.4.20"
|
id("org.jetbrains.dokka") version "1.4.30"
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,13 +23,13 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.android.tools.build:gradle:4.0.2")
|
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 {
|
allprojects {
|
||||||
group = "fr.acinq.secp256k1"
|
group = "fr.acinq.secp256k1"
|
||||||
version = "0.5.1"
|
version = "0.5.2-SNAPSHOT"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
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 {
|
allprojects {
|
||||||
val javadocJar = tasks.create<Jar>("javadocJar") {
|
val javadocJar = tasks.create<Jar>("javadocJar") {
|
||||||
archiveClassifier.set("javadoc")
|
archiveClassifier.set("javadoc")
|
||||||
@ -134,30 +121,6 @@ allprojects {
|
|||||||
// Publication
|
// Publication
|
||||||
plugins.withId("maven-publish") {
|
plugins.withId("maven-publish") {
|
||||||
publishing {
|
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<MavenPublication>().configureEach {
|
publications.withType<MavenPublication>().configureEach {
|
||||||
version = project.version.toString()
|
version = project.version.toString()
|
||||||
artifact(javadocJar)
|
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 {
|
allprojects {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
tasks.withType<AbstractTestTask>() {
|
tasks.withType<AbstractTestTask>() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user