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