This repository has been archived by the owner on Oct 25, 2021. It is now read-only.
forked from ProtonMail/gopenpgp
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
65 lines (60 loc) · 1.94 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
plugins {
`maven-publish`
signing
}
group = "com.github.android-password-store"
version = "0.1.6"
val buildGoMobile = tasks.register<Exec>("buildGomobile") {
commandLine("./build.sh", "android")
}
tasks.publish.configure { dependsOn(buildGoMobile) }
tasks.build.configure { dependsOn(buildGoMobile) }
publishing {
publications {
create<MavenPublication>("gopenpgp") {
artifactId = "gopenpgp"
artifact("dist/android/Gopenpgp.aar")
pom {
name.set("gopenpgp")
description.set("A high-level OpenPGP library")
url.set("https://github.com/protonmail/gopenpgp")
licenses {
license {
name.set("MIT")
url.set("https://raw.githubusercontent.com/ProtonMail/gopenpgp/master/LICENSE")
}
}
developers {
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/gopenpgp.git")
developerConnection.set("scm:git:ssh://[email protected]:Android-Password-Store/gopenpgp.git")
url.set("https://github.com/Android-Password-Store/gopenpgp")
}
}
}
}
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["gopenpgp"])
}