Skip to content

Commit 742003f

Browse files
authored
fix artifactory plugin (#316)
1 parent ac617d1 commit 742003f

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

AndroidSDK/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ android {
5656
release.setRoot('build-types/release')
5757
}
5858
}
59-
publishing_task(LEANPLUM_ARTIFACT_ID, 'AndroidSDK')

common-methods.gradle

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def publishing_task(libraryArtifactId, packageName) {
2828
from('build/intermediates/packaged-classes/release/')
2929
into('build/outputs/jar/')
3030
include('classes.jar')
31-
rename('classes.jar', packageName + '-release.jar')
31+
rename('classes.jar', packageName + '.jar')
3232
}
3333

3434
publishing {
@@ -37,7 +37,7 @@ def publishing_task(libraryArtifactId, packageName) {
3737
groupId LEANPLUM_GROUP_ID
3838
version LEANPLUM_SDK_VERSION
3939
artifactId libraryArtifactId
40-
artifact("$buildDir/outputs/aar/" + packageName + "-release.aar")
40+
artifact("$buildDir/outputs/aar/" + packageName + ".aar")
4141

4242
// The publication doesn't know about our dependencies,
4343
// so we have to manually add them to the pom.
@@ -49,7 +49,7 @@ def publishing_task(libraryArtifactId, packageName) {
4949
version LEANPLUM_SDK_VERSION
5050
artifactId libraryArtifactId
5151

52-
artifact("$buildDir/outputs/jar/" + packageName + "-release.jar")
52+
artifact("$buildDir/outputs/jar/" + packageName + ".jar")
5353

5454
// The publication doesn't know about our dependencies,
5555
// so we have to manually add them to the pom.
@@ -58,23 +58,21 @@ def publishing_task(libraryArtifactId, packageName) {
5858
}
5959
}
6060

61-
if (project.hasProperty('artifactoryUsername') && project.hasProperty('artifactoryPassword')) {
62-
artifactory {
63-
contextUrl = 'http://artifactory-upload.leanplum.com'
64-
publish {
65-
repository {
66-
repoKey = 'libs-snapshot-local'
61+
artifactory {
62+
contextUrl = 'http://artifactory.leanplum.com'
63+
publish {
64+
repository {
65+
repoKey = 'libs-release-local'
6766

68-
username = artifactoryUsername
69-
password = artifactoryPassword
70-
}
71-
defaults {
72-
publications('aar', 'jar')
73-
publishArtifacts = true
67+
username = System.getenv('ARTIFACTORY_USER')
68+
password = System.getenv('ARTIFACTORY_PASSWORD')
69+
}
70+
defaults {
71+
publications('aar', 'jar')
72+
publishArtifacts = true
7473

75-
properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
76-
publishPom = true
77-
}
74+
properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
75+
publishPom = true
7876
}
7977
}
8078
}

0 commit comments

Comments
 (0)