|
1 | 1 | import org.gradle.api.tasks.testing.logging.TestExceptionFormat.* |
2 | 2 | import org.gradle.api.tasks.testing.logging.TestLogEvent.* |
3 | 3 |
|
| 4 | +// library version is defined in gradle.properties |
| 5 | +val libraryVersion: String by project |
| 6 | + |
4 | 7 | plugins { |
5 | 8 | id("com.android.library") |
6 | 9 | id("org.jetbrains.kotlin.android") version "1.6.10" |
| 10 | + |
| 11 | + id("maven-publish") |
| 12 | + id("signing") |
7 | 13 | } |
8 | 14 |
|
9 | 15 | repositories { |
@@ -50,6 +56,62 @@ dependencies { |
50 | 56 | androidTestImplementation("org.jetbrains.kotlin:kotlin-test-junit") |
51 | 57 | } |
52 | 58 |
|
| 59 | +afterEvaluate { |
| 60 | + publishing { |
| 61 | + publications { |
| 62 | + create<MavenPublication>("maven") { |
| 63 | + groupId = "co.jurvis" |
| 64 | + artifactId = "ldk-node-android" |
| 65 | + version = libraryVersion |
| 66 | + |
| 67 | + from(components["release"]) |
| 68 | + pom { |
| 69 | + name.set("ldk-node-android") |
| 70 | + description.set( |
| 71 | + "Kotlin language bindings for LdkNode, a ready-to-go LDK node implementation" |
| 72 | + ) |
| 73 | + url.set("https://lightningdevkit.org") |
| 74 | + licenses { |
| 75 | + license { |
| 76 | + name.set("APACHE 2.0") |
| 77 | + url.set("https://github.com/lightningdevkit/ldk-node/blob/main/LICENSE-APACHE") |
| 78 | + } |
| 79 | + license { |
| 80 | + name.set("MIT") |
| 81 | + url.set("https://github.com/lightningdevkit/ldk-node/blob/main/LICENSE-MIT") |
| 82 | + } |
| 83 | + } |
| 84 | + developers { |
| 85 | + developer { |
| 86 | + id.set("tnull") |
| 87 | + name.set("Elias Rohrer") |
| 88 | + email.set("tnull@noreply.github.org") |
| 89 | + } |
| 90 | + developer { |
| 91 | + id.set("jurvis") |
| 92 | + name.set("Jurvis Tan") |
| 93 | + email.set("jurvis@noreply.github.org") |
| 94 | + } |
| 95 | + } |
| 96 | + scm { |
| 97 | + connection.set("scm:git:github.com/jurvis/ldk-node.git") |
| 98 | + developerConnection.set("scm:git:ssh://github.com/jurvis/ldk-node.git") |
| 99 | + url.set("https://github.com/jurvis/ldk-node/tree/main") |
| 100 | + } |
| 101 | + } |
| 102 | + } |
| 103 | + } |
| 104 | + } |
| 105 | +} |
| 106 | + |
| 107 | +signing { |
| 108 | + val signingKeyId: String? by project |
| 109 | + val signingKey: String? by project |
| 110 | + val signingPassword: String? by project |
| 111 | + useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) |
| 112 | + sign(publishing.publications) |
| 113 | +} |
| 114 | + |
53 | 115 | //tasks.named<Test>("test") { |
54 | 116 | // // Use JUnit Platform for unit tests. |
55 | 117 | // useJUnitPlatform() |
|
0 commit comments