Skip to content

Commit f8923b6

Browse files
committed
CI: fix android library publication
1 parent b396715 commit f8923b6

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

jni/android/build.gradle.kts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ android {
4848
}
4949

5050
publishing {
51-
singleVariant("release") {
52-
withSourcesJar()
53-
}
51+
singleVariant("release")
5452
}
5553
}
5654

@@ -59,3 +57,19 @@ afterEvaluate {
5957
it.dependsOn(":native:buildSecp256k1Android")
6058
}
6159
}
60+
61+
afterEvaluate {
62+
publishing {
63+
publications {
64+
create<MavenPublication>("android") {
65+
artifactId = "secp256k1-kmp-jni-android"
66+
from(components["release"])
67+
val sourcesJar = task<Jar>("sourcesJar") {
68+
archiveClassifier.set("sources")
69+
from(android.sourceSets["main"].java.srcDirs)
70+
}
71+
artifact(sourcesJar)
72+
}
73+
}
74+
}
75+
}

0 commit comments

Comments
 (0)