Skip to content

Commit

Permalink
release compatibility artifact in Jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyansong-adbe committed Sep 7, 2022
1 parent a0094cd commit 1b0e589
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
48 changes: 48 additions & 0 deletions code/android-core-compatiblity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,54 @@ android {
}
}

def isJitPackBuild() {
return hasProperty('jitpack')
}
def groupIdForPublish = isJitPackBuild()? 'com.github.adobe.aepsdk-core-android': 'com.adobe.marketing.mobile'
publishing {
publications {
release(MavenPublication) {
groupId = groupIdForPublish
artifactId = rootProject.compatibilityName
version = rootProject.compatibilityVersion
artifact("$buildDir/outputs/aar/${rootProject.compatibilityAARName}")

pom {
name = rootProject.mavenRepoName
description = rootProject.mavenRepoDescription
url = 'https://aep-sdks.gitbook.io'
licenses {
license {
name = 'Adobe Proprietary'
}
}
developers {
developer {
id = 'adobe'
name = 'adobe'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:github.com//Adobe-Marketing-Cloud/acp-sdks.git'
developerConnection = 'scm:git:ssh://github.com//Adobe-Marketing-Cloud/acp-sdks.git'
url = 'https://github.com/Adobe-Marketing-Cloud/acp-sdks'
}
withXml {
def dependenciesNode = asNode().appendNode('dependencies')

def coreDependencyNode = dependenciesNode.appendNode('dependency')
coreDependencyNode.appendNode('groupId', 'com.adobe.marketing.mobile')
coreDependencyNode.appendNode('artifactId', 'core')
coreDependencyNode.appendNode('version', rootProject.coreExtensionVersion)
}
}
}
}
}
tasks.withType(Javadoc).all { enabled = false }
publishToMavenLocal.dependsOn('assemblePhone')

dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation project(path: ':android-core-library')
Expand Down
6 changes: 6 additions & 0 deletions code/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ dokka_version = 1.7.0
signalExtensionVersion=2.0.0
signalExtensionName=signal
signalExtensionAARName=android-signal-library-phone-release.aar

#compatibility artifact
compatibilityVersion=2.0.0
compatibilityName=compatibility
compatibilityAARName=android-core-compatiblity-phone-release.aar

2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ install:
- ./code/gradlew -p code/android-core-library publishToMavenLocal -Pjitpack
- ./code/gradlew -p code/android-signal-library assemblePhone
- ./code/gradlew -p code/android-signal-library publishToMavenLocal -Pjitpack
- ./code/gradlew -p code/android-core-compatiblity assemblePhone
- ./code/gradlew -p code/android-core-compatiblity publishToMavenLocal -Pjitpack
# env:
# MYVAR: "custom environment variable"

0 comments on commit 1b0e589

Please sign in to comment.