|
5 | 5 | plugins { |
6 | 6 | id 'com.android.library' |
7 | 7 | id 'com.google.protobuf' version "0.8.19" |
| 8 | + id 'maven-publish' |
| 9 | + id 'signing' |
8 | 10 | } |
9 | 11 |
|
10 | 12 | android { |
@@ -43,6 +45,63 @@ android { |
43 | 45 | } |
44 | 46 | } |
45 | 47 | } |
| 48 | + |
| 49 | + publishing { |
| 50 | + singleVariant('release') { |
| 51 | + withSourcesJar() |
| 52 | + withJavadocJar() |
| 53 | + } |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +publishing { |
| 58 | + publications { |
| 59 | + release(MavenPublication) { |
| 60 | + groupId = group |
| 61 | + artifactId = 'digital-asset-links-android' |
| 62 | + pom { |
| 63 | + name = 'Digital Asset Links for Android' |
| 64 | + description = 'An implementation of Digital Asset Links for verifying Android packages against a domain hosting asset links' |
| 65 | + url = 'https://github.com/solana-mobile/digital-asset-links-android' |
| 66 | + licenses { |
| 67 | + license { |
| 68 | + name = 'The Apache License, Version 2.0' |
| 69 | + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 70 | + } |
| 71 | + } |
| 72 | + developers { |
| 73 | + developer { |
| 74 | + name = 'Solana Mobile Engineering' |
| 75 | + email = 'eng@solanamobile.com' |
| 76 | + organization = 'Solana Mobile Inc.' |
| 77 | + organizationUrl = 'https://solanamobile.com' |
| 78 | + } |
| 79 | + } |
| 80 | + organization { |
| 81 | + name = 'Solana Mobile Inc.' |
| 82 | + url = 'https://solanamobile.com' |
| 83 | + } |
| 84 | + scm { |
| 85 | + connection = 'scm:git:git://github.com/solana-mobile/digital-asset-links-android.git' |
| 86 | + developerConnection = 'scm:git:ssh://github.com/solana-mobile/digital-asset-links-android.git' |
| 87 | + url = 'https://github.com/solana-mobile/digital-asset-links-android/tree/main' |
| 88 | + } |
| 89 | + } |
| 90 | + |
| 91 | + afterEvaluate { |
| 92 | + from components.release |
| 93 | + } |
| 94 | + } |
| 95 | + } |
| 96 | +} |
| 97 | + |
| 98 | +signing { |
| 99 | + // Signing private key and password provided by ORG_GRADLE_PROJECT_signingKey and |
| 100 | + // ORG_GRADLE_PROJECT_signingPassword, respectively |
| 101 | + def signingKey = findProperty('signingKey') |
| 102 | + def signingPassword = findProperty('signingPassword') |
| 103 | + useInMemoryPgpKeys(signingKey, signingPassword) |
| 104 | + sign publishing.publications.release |
46 | 105 | } |
47 | 106 |
|
48 | 107 | protobuf { |
|
0 commit comments