forked from SphericalKat/age-mobile
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
69 lines (64 loc) · 2.09 KB
/
build.gradle.kts
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
plugins {
`maven-publish`
signing
}
group = "com.github.android-password-store"
version = "0.3.0-SNAPSHOT"
tasks.register<Exec>("buildGomobile") {
commandLine("./build.sh")
}
tasks.getByName("publish").dependsOn(tasks.getByName("buildGomobile"))
publishing {
publications {
create<MavenPublication>("ageMobile") {
artifactId = "age-mobile"
artifact("dist/android/ageMobile.aar")
pom {
name.set("age-mobile")
description.set("Gomobile-based bindings to the age encryption tool")
url.set("https://github.com/Android-Password-Store/age-mobile")
licenses {
license {
name.set("MIT")
url.set("https://raw.githubusercontent.com/Android-Password-Store/age-mobile/develop/LICENSE")
}
}
developers {
developer {
id.set("SphericalKat")
name.set("Amogh Lele")
email.set("[email protected]")
}
developer {
id.set("android-password-store")
name.set("The Android Password Store Authors")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/Android-Password-Store/age-mobile.git")
developerConnection.set("scm:git:ssh://[email protected]:Android-Password-Store/age-mobile.git")
url.set("https://github.com/Android-Password-Store/age-mobile")
}
}
}
}
repositories {
maven {
val hostUrl = "https://oss.sonatype.org/"
val releasesRepoUrl = uri("$hostUrl/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("$hostUrl/content/repositories/snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = findProperty("mavenUsername") as String?
password = findProperty("mavenPassword") as String?
}
}
}
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["ageMobile"])
}