This repository was archived by the owner on Oct 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed
Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 11plugins {
22 kotlin(" android" )
3+ id(" maven-publish" )
4+ }
5+
6+ // Type safety can sometimes suck
7+ fun getCredential (type : String ): String {
8+ return when (type) {
9+ // Attempt to find credentials passed by -Pmaven.$type=
10+ " user" , " password" -> (findProperty(" maven.$type " )
11+ // Fall back to MAVEN_$type from env
12+ ? : System .getenv(" MAVEN_${type.toUpperCase()} " ))?.toString()
13+ // Finally fallthrough to an empty string to let task configuration complete
14+ // even if actual publishing is going to fail
15+ ? : " "
16+ else -> throw IllegalArgumentException (" Invalid credential type: $type " )
17+ }
318}
419
520android {
@@ -10,6 +25,29 @@ android {
1025 }
1126}
1227
28+ afterEvaluate {
29+ publishing {
30+ repositories {
31+ maven {
32+ name = " aps"
33+ url = uri(" https://maven.msfjarvis.dev/android-password-store/${findProperty(" POM_ARTIFACT_ID" )} " )
34+ credentials {
35+ username = getCredential(" user" )
36+ password = getCredential(" password" )
37+ }
38+ }
39+ }
40+ publications {
41+ create<MavenPublication >(" apsMaven" ) {
42+ from(components.getByName(" release" ))
43+ groupId = findProperty(" GROUP" ).toString()
44+ artifactId = findProperty(" POM_ARTIFACT_ID" ).toString()
45+ version = findProperty(" VERSION_NAME" ).toString()
46+ }
47+ }
48+ }
49+ }
50+
1351dependencies {
1452 implementation(Dependencies .AndroidX .core_ktx)
1553 implementation(Dependencies .AndroidX .autofill)
Original file line number Diff line number Diff line change 1+ GROUP =com.github.androidpasswordstore
2+ VERSION_NAME =1.0.0
3+ POM_ARTIFACT_ID =autofill-parser
4+
5+ POM_URL =https://github.com/Android-Password-Store/android-password-store
6+ POM_SCM_URL =https://github.com/Android-Password-Store/android-password-store
7+ POM_SCM_CONNECTION =scm:git:https://github.com/Android-Password-Store/android-password-store.git
8+ POM_SCM_DEV_CONNECTION =scm:git:ssh://
[email protected] :Android-Password-Store/android-password-store
9+
10+ POM_LICENSE_NAME =LGPL-3.0-only WITH LGPL-3.0-linking-exception
11+ POM_LICENSE_URL =https://www.gnu.org/licenses/lgpl-3.0.txt
12+ POM_LICENSE_DIST =repo
13+
14+ POM_DEVELOPER_ID =android-password-store
15+ POM_DEVELOPER_NAME =The Android Password Store Authors
Original file line number Diff line number Diff line change 44 */
55include(" :autofill-parser" )
66include(" :app" )
7+
8+ pluginManagement {
9+ repositories {
10+ gradlePluginPortal()
11+ jcenter()
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments