Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 0d6b7f1

Browse files
authored
autofill-parser: flesh out generated POM file (#1140)
Signed-off-by: Harsh Shandilya <[email protected]>
1 parent e730a77 commit 0d6b7f1

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

autofill-parser/build.gradle.kts

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,37 @@ afterEvaluate {
3939
}
4040
publications {
4141
create<MavenPublication>("apsMaven") {
42+
fun getKey(propertyName: String): String {
43+
return findProperty(propertyName)?.toString() ?: error("Failed to find property for $propertyName")
44+
}
45+
4246
from(components.getByName("release"))
43-
groupId = findProperty("GROUP").toString()
44-
artifactId = findProperty("POM_ARTIFACT_ID").toString()
45-
version = findProperty("VERSION_NAME").toString()
47+
groupId = getKey("GROUP")
48+
artifactId = getKey("POM_ARTIFACT_ID")
49+
version = getKey("VERSION_NAME")
50+
pom {
51+
name.set(getKey("POM_ARTIFACT_ID"))
52+
description.set(getKey("POM_ARTIFACT_DESCRIPTION"))
53+
url.set(getKey("POM_URL"))
54+
licenses {
55+
license {
56+
name.set(getKey("POM_LICENSE_NAME"))
57+
url.set(getKey("POM_LICENSE_URL"))
58+
}
59+
}
60+
developers {
61+
developer {
62+
id.set(getKey("POM_DEVELOPER_ID"))
63+
name.set(getKey("POM_DEVELOPER_NAME"))
64+
email.set(getKey("POM_DEVELOPER_EMAIL"))
65+
}
66+
}
67+
scm {
68+
connection.set(getKey("POM_SCM_CONNECTION"))
69+
developerConnection.set(getKey("POM_SCM_DEV_CONNECTION"))
70+
url.set(getKey("POM_SCM_URL"))
71+
}
72+
}
4673
}
4774
}
4875
}

autofill-parser/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
GROUP=com.github.androidpasswordstore
22
VERSION_NAME=1.0.0
33
POM_ARTIFACT_ID=autofill-parser
4+
POM_ARTIFACT_DESCRIPTION=Android library for low-level parsing of Autofill structures
45

56
POM_URL=https://github.com/Android-Password-Store/android-password-store
67
POM_SCM_URL=https://github.com/Android-Password-Store/android-password-store
@@ -13,3 +14,4 @@ POM_LICENSE_DIST=repo
1314

1415
POM_DEVELOPER_ID=android-password-store
1516
POM_DEVELOPER_NAME=The Android Password Store Authors
17+
POM_DEVELOPER_EMAIL[email protected]

0 commit comments

Comments
 (0)