File tree Expand file tree Collapse file tree 9 files changed +59
-43
lines changed Expand file tree Collapse file tree 9 files changed +59
-43
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,6 @@ after_deploy:
5858deploy :
5959 - provider : script
6060 skip_cleanup : true
61- script : ./gradlew artifactoryPublish bintrayUpload
61+ script : ./gradlew artifactoryPublish publishAarPublicationToSonatypeRepository
6262 on :
6363 tags : true
Original file line number Diff line number Diff line change 1- apply plugin : ' com.android.library'
2- apply plugin : ' com.jfrog.bintray'
3- apply plugin : ' com.jfrog.artifactory'
4- apply plugin : ' maven-publish'
1+ plugins {
2+ id ' com.android.library'
3+ id ' com.jfrog.artifactory' version ' 4.13.0'
4+ id ' maven-publish'
5+ id ' signing'
6+ }
57apply from : " ../common-methods.gradle"
68
79allprojects {
Original file line number Diff line number Diff line change 1- apply plugin : ' com.android.library'
2- apply plugin : ' com.jfrog.artifactory'
3- apply plugin : ' com.jfrog.bintray'
4- apply plugin : ' maven-publish'
1+ plugins {
2+ id ' com.android.library'
3+ id ' com.jfrog.artifactory' version ' 4.13.0'
4+ id ' maven-publish'
5+ id ' signing'
6+ }
57apply from : " ../common-methods.gradle"
68
79android {
Original file line number Diff line number Diff line change 1- apply plugin : ' com.android.library'
2- apply plugin : ' com.jfrog.artifactory'
3- apply plugin : ' com.jfrog.bintray'
4- apply plugin : ' maven-publish'
1+ plugins {
2+ id ' com.android.library'
3+ id ' com.jfrog.artifactory' version ' 4.13.0'
4+ id ' maven-publish'
5+ id ' signing'
6+ }
57apply from : " ../common-methods.gradle"
68
79android {
Original file line number Diff line number Diff line change 1- apply plugin : ' com.android.library'
2- apply plugin : ' com.jfrog.artifactory'
3- apply plugin : ' com.jfrog.bintray'
4- apply plugin : ' maven-publish'
1+ plugins {
2+ id ' com.android.library'
3+ id ' com.jfrog.artifactory' version ' 4.13.0'
4+ id ' maven-publish'
5+ id ' signing'
6+ }
57apply from : " ../common-methods.gradle"
68
79android {
Original file line number Diff line number Diff line change 1- apply plugin : ' com.android.library'
2- apply plugin : ' com.jfrog.artifactory'
3- apply plugin : ' com.jfrog.bintray'
4- apply plugin : ' maven-publish'
1+ plugins {
2+ id ' com.android.library'
3+ id ' com.jfrog.artifactory' version ' 4.13.0'
4+ id ' maven-publish'
5+ id ' signing'
6+ }
57apply from : " ../common-methods.gradle"
68
79android {
Original file line number Diff line number Diff line change 1- apply plugin : ' com.android.library'
2- apply plugin : ' com.jfrog.artifactory'
3- apply plugin : ' com.jfrog.bintray'
4- apply plugin : ' maven-publish'
1+ plugins {
2+ id ' com.android.library'
3+ id ' com.jfrog.artifactory' version ' 4.13.0'
4+ id ' maven-publish'
5+ id ' signing'
6+ }
57apply from : " ../common-methods.gradle"
68
79android {
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ buildscript {
66 jcenter()
77 }
88 dependencies {
9- classpath ' org.jfrog.buildinfo:build-info-extractor-gradle:4.13.0'
109 classpath ' com.android.tools.build:gradle:3.6.3'
11- classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.3'
1210 }
1311}
1412
Original file line number Diff line number Diff line change @@ -80,6 +80,19 @@ def publishing_task(libraryArtifactId) {
8080 }
8181 }
8282 }
83+
84+ repositories {
85+ maven {
86+ name = " sonatype"
87+ url = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
88+
89+ credentials {
90+ username = System . getenv(' SONATYPE_OSSRH_USER' )
91+ password = System . getenv(' SONATYPE_OSSRH_PASSWORD' )
92+ }
93+ }
94+ }
95+
8396 }
8497 }
8598
@@ -102,22 +115,15 @@ def publishing_task(libraryArtifactId) {
102115 }
103116 }
104117
105- bintray {
106- user = System . getenv(' BINTRAY_USER' )
107- key = System . getenv(' BINTRAY_API_KEY' )
108- publications = [' aar' ]
109- pkg {
110- repo = ' maven'
111- name = libraryArtifactId
112- userOrg = ' leanplum'
113- licenses = [' Apache-2.0' ]
114- vcsUrl = ' https://github.com/Leanplum/Leanplum-Android-SDK.git'
115- version {
116- name = LEANPLUM_SDK_VERSION
117- released = new Date ()
118- vcsTag = LEANPLUM_SDK_VERSION
119- }
120- publish = true
118+ signing {
119+ def signingKey = null
120+ def signingKeyBase64 = System . getenv(' SIGNING_KEY_BASE64' )
121+ if (signingKeyBase64 != null ) {
122+ signingKey = new String (Base64 . getDecoder(). decode((String ) signingKeyBase64))
121123 }
124+ def signingPassword = System . getenv(' SIGNING_PASSWORD' )
125+
126+ useInMemoryPgpKeys(signingKey, signingPassword)
127+ sign publishing. publications
122128 }
123129}
You can’t perform that action at this time.
0 commit comments