forked from lightningdevkit/ldk-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
133 lines (118 loc) · 4.21 KB
/
build.gradle.kts
File metadata and controls
133 lines (118 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.*
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
// library version is defined in gradle.properties
val libraryVersion: String by project
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android") version "1.6.10"
id("maven-publish")
id("signing")
}
repositories {
mavenCentral()
google()
}
android {
compileSdk = 31
defaultConfig {
minSdk = 21
targetSdk = 31
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(file("proguard-android-optimize.txt"), file("proguard-rules.pro"))
}
}
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
dependencies {
implementation("net.java.dev.jna:jna:5.8.0@aar")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7")
implementation("androidx.appcompat:appcompat:1.4.0")
implementation("androidx.core:core-ktx:1.7.0")
api("org.slf4j:slf4j-api:1.7.30")
androidTestImplementation("com.github.tony19:logback-android:2.0.0")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
androidTestImplementation("org.jetbrains.kotlin:kotlin-test-junit")
}
afterEvaluate {
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "org.lightningdevkit"
artifactId = "ldk-node-android"
version = libraryVersion
from(components["release"])
pom {
name.set("ldk-node-android")
description.set(
"LDK Node, a ready-to-go node implementation built using LDK."
)
url.set("https://lightningdevkit.org")
licenses {
license {
name.set("APACHE 2.0")
url.set("https://github.com/lightningdevkit/ldk-node/blob/main/LICENSE-APACHE")
}
license {
name.set("MIT")
url.set("https://github.com/lightningdevkit/ldk-node/blob/main/LICENSE-MIT")
}
}
developers {
developer {
id.set("tnull")
name.set("Elias Rohrer")
email.set("tnull@noreply.github.org")
}
developer {
id.set("jurvis")
name.set("Jurvis Tan")
email.set("jurvis@noreply.github.org")
}
}
scm {
connection.set("scm:git:github.com/lightningdevkit/ldk-node.git")
developerConnection.set("scm:git:ssh://github.com/lightningdevkit/ldk-node.git")
url.set("https://github.com/lightningdevkit/ldk-node/tree/main")
}
}
}
}
}
}
signing {
val signingKeyId: String? by project
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publishing.publications)
}
//tasks.named<Test>("test") {
// // Use JUnit Platform for unit tests.
// useJUnitPlatform()
//
// testLogging {
// events(PASSED, SKIPPED, FAILED, STANDARD_OUT, STANDARD_ERROR)
// exceptionFormat = FULL
// showExceptions = true
// showCauses = true
// showStackTraces = true
// showStandardStreams = true
// }
//}
//// This task dependency ensures that we build the bindings
//// binaries before running the tests
//tasks.withType<KotlinCompile> {
// dependsOn("buildAndroidLib")
//}