Skip to content

Commit 3b9f14c

Browse files
authored
Feature/sdk 348 maven central (#446)
* Add support for Maven Central * Turn off tests temporarily * bump beta * trigger build * Reorder package repos * bumb beta * Remove bintray * bump beta * Remove bintray * Uncomment tests * bump beta * revert beta version * Remove empty lines
1 parent 0055046 commit 3b9f14c

File tree

9 files changed

+59
-43
lines changed

9 files changed

+59
-43
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ after_deploy:
5858
deploy:
5959
- provider: script
6060
skip_cleanup: true
61-
script: ./gradlew artifactoryPublish bintrayUpload
61+
script: ./gradlew artifactoryPublish publishAarPublicationToSonatypeRepository
6262
on:
6363
tags: true

AndroidSDK/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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+
}
57
apply from: "../common-methods.gradle"
68

79
allprojects {

AndroidSDKCore/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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+
}
57
apply from: "../common-methods.gradle"
68

79
android {

AndroidSDKFcm/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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+
}
57
apply from: "../common-methods.gradle"
68

79
android {

AndroidSDKLocation/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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+
}
57
apply from: "../common-methods.gradle"
68

79
android {

AndroidSDKMiPush/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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+
}
57
apply from: "../common-methods.gradle"
68

79
android {

AndroidSDKPush/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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+
}
57
apply from: "../common-methods.gradle"
68

79
android {

build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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

common-methods.gradle

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)