Maven publications
This commit is contained in:
parent
3b3d67a4fe
commit
ffe4cc41dc
@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform") version "1.4-M2-mt"
|
kotlin("multiplatform") version "1.4-M2-mt"
|
||||||
// `maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
@ -17,7 +17,7 @@ buildscript {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "fr.acinq.secp256k1"
|
group = "fr.acinq.secp256k1"
|
||||||
version = "0.2.1-1.4-M2"
|
version = "0.1.0-1.4-M2"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
@ -114,43 +114,47 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//publishing {
|
allprojects {
|
||||||
// val snapshotName: String? by project
|
plugins.withId("maven-publish") {
|
||||||
// val snapshotNumber: String? by project
|
publishing {
|
||||||
//
|
val snapshotName: String? by project
|
||||||
// val bintrayUsername: String? = (properties["bintrayUsername"] as String?) ?: System.getenv("BINTRAY_USER")
|
val snapshotNumber: String? by project
|
||||||
// val bintrayApiKey: String? = (properties["bintrayApiKey"] as String?) ?: System.getenv("BINTRAY_APIKEY")
|
|
||||||
// if (bintrayUsername == null || bintrayApiKey == null) logger.warn("Skipping bintray configuration as bintrayUsername or bintrayApiKey is not defined")
|
val bintrayUsername: String? = (properties["bintrayUsername"] as String?) ?: System.getenv("BINTRAY_USER")
|
||||||
// else {
|
val bintrayApiKey: String? = (properties["bintrayApiKey"] as String?) ?: System.getenv("BINTRAY_APIKEY")
|
||||||
// val btRepo = if (snapshotNumber != null) "snapshots" else "libs"
|
if (bintrayUsername == null || bintrayApiKey == null) logger.warn("Skipping bintray configuration as bintrayUsername or bintrayApiKey is not defined")
|
||||||
// repositories {
|
else {
|
||||||
// maven {
|
val btRepo = if (snapshotNumber != null) "snapshots" else "libs"
|
||||||
// name = "bintray"
|
repositories {
|
||||||
// setUrl("https://api.bintray.com/maven/acinq/$btRepo/${project.name}/;publish=0")
|
maven {
|
||||||
// credentials {
|
name = "bintray"
|
||||||
// username = bintrayUsername
|
setUrl("https://api.bintray.com/maven/acinq/$btRepo/${project.name}/;publish=0")
|
||||||
// password = bintrayApiKey
|
credentials {
|
||||||
// }
|
username = bintrayUsername
|
||||||
// }
|
password = bintrayApiKey
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// publications.withType<MavenPublication>().configureEach {
|
}
|
||||||
// if (snapshotName != null && snapshotNumber != null) version = "${project.version}-${snapshotName}-${snapshotNumber}"
|
|
||||||
// pom {
|
publications.withType<MavenPublication>().configureEach {
|
||||||
// description.set("Bitcoin's secp256k1 library ported to Kotlin/Multiplatform for JVM, Android, iOS & Linux")
|
if (snapshotName != null && snapshotNumber != null) version = "${project.version}-${snapshotName}-${snapshotNumber}"
|
||||||
// url.set("https://github.com/ACINQ/secp256k1-kmp")
|
pom {
|
||||||
// licenses {
|
description.set("Bitcoin's secp256k1 library ported to Kotlin/Multiplatform for JVM, Android, iOS & Linux")
|
||||||
// name.set("Apache License v2.0")
|
url.set("https://github.com/ACINQ/secp256k1-kmp")
|
||||||
// url.set("https://www.apache.org/licenses/LICENSE-2.0")
|
licenses {
|
||||||
// }
|
name.set("Apache License v2.0")
|
||||||
// issueManagement {
|
url.set("https://www.apache.org/licenses/LICENSE-2.0")
|
||||||
// system.set("Github")
|
}
|
||||||
// url.set("https://github.com/ACINQ/secp256k1-kmp/issues")
|
issueManagement {
|
||||||
// }
|
system.set("Github")
|
||||||
// scm {
|
url.set("https://github.com/ACINQ/secp256k1-kmp/issues")
|
||||||
// connection.set("https://github.com/ACINQ/secp256k1-kmp.git")
|
}
|
||||||
// }
|
scm {
|
||||||
// }
|
connection.set("https://github.com/ACINQ/secp256k1-kmp.git")
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
id("com.android.library")
|
||||||
kotlin("android")
|
kotlin("android")
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
@ -46,3 +47,20 @@ afterEvaluate {
|
|||||||
dependsOn(":native:buildSecp256k1Android")
|
dependsOn(":native:buildSecp256k1Android")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
afterEvaluate {
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("android") {
|
||||||
|
artifactId = "secp256k1-jni-android"
|
||||||
|
from(components["release"])
|
||||||
|
}
|
||||||
|
// create<MavenPublication>("androidDebug") {
|
||||||
|
// artifactId = "secp256k1-jni-android-debug"
|
||||||
|
// from(components["debug"])
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
val currentOs = org.gradle.internal.os.OperatingSystem.current()
|
val currentOs = org.gradle.internal.os.OperatingSystem.current()
|
||||||
@ -69,4 +70,13 @@ afterEvaluate {
|
|||||||
tasks["clean"].doLast {
|
tasks["clean"].doLast {
|
||||||
delete(buildDir.resolve("build/cmake"))
|
delete(buildDir.resolve("build/cmake"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("jvm") {
|
||||||
|
artifactId = "secp256k1-jni-common"
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
@ -12,10 +13,10 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val copyJni by tasks.creating(Sync::class) {
|
val copyJni by tasks.creating(Sync::class) {
|
||||||
dependsOn(":native:buildSecp256k1Jvm")
|
dependsOn(":jni:buildNativeJni")
|
||||||
from(rootDir.resolve("native/build/linux/libsecp256k1-jni.so")) { rename { "libsecp256k1-jni-linux-x86_64.so" } }
|
from(rootDir.resolve("jni/build/jni/linux/libsecp256k1-jni.so")) { rename { "libsecp256k1-jni-linux-x86_64.so" } }
|
||||||
from(rootDir.resolve("native/build/darwin/libsecp256k1-jni.dylib")) { rename { "libsecp256k1-jni-darwin-x86_64.dylib" } }
|
from(rootDir.resolve("jni/build/jni/darwin/libsecp256k1-jni.dylib")) { rename { "libsecp256k1-jni-darwin-x86_64.dylib" } }
|
||||||
from(rootDir.resolve("native/build/mingw/secp256k1-jni.dll")) { rename { "secp256k1-jni-mingw-x86_64.dll" } }
|
from(rootDir.resolve("jni/build/jni/mingw/secp256k1-jni.dll")) { rename { "secp256k1-jni-mingw-x86_64.dll" } }
|
||||||
into(buildDir.resolve("jniResources/fr/acinq/secp256k1/jni/native"))
|
into(buildDir.resolve("jniResources/fr/acinq/secp256k1/jni/native"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,3 +24,14 @@ val copyJni by tasks.creating(Sync::class) {
|
|||||||
dependsOn("copyJni")
|
dependsOn("copyJni")
|
||||||
from(buildDir.resolve("jniResources"))
|
from(buildDir.resolve("jniResources"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java.withSourcesJar()
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("jvm") {
|
||||||
|
artifactId = "secp256k1-jni-jvm"
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user