Skip to content

Commit

Permalink
Fixed dependencies section
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch committed Dec 17, 2024
1 parent dd743b4 commit d6d2cea
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 17 deletions.
39 changes: 24 additions & 15 deletions AdobeBranchExtension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

// Branch
api 'io.branch.sdk.android:library:5.14.0'
api 'io.branch.sdk.android:library:5.15.0'
implementation ('com.google.android.gms:play-services-ads-identifier:17.0.0')
// for Huawei devices without GMS, adding it requires bumping up min api level to 19 though, so we
// leave it up to the client to add it following Branch documentation here: https://help.branch.io/developers-hub/docs/android-basic-integration
Expand Down Expand Up @@ -124,14 +124,23 @@ def applyCommonConfig = { MavenPublication publication ->
}

withXml {
asNode().dependencies.dependency.findAll {
it.artifactId.text() == 'okhttp' || it.artifactId.text() == 'firebase-appindexing'
}.each { dependency ->
def optionalNode = dependency.optional
if (optionalNode) {
optionalNode[0].value = 'true'
} else {
dependency.appendNode('optional', 'true')
def node = asNode()
def dependenciesNode = node.appendNode('dependencies')

configurations.implementation.allDependencies.each { dependency ->
if (dependency.group != null && dependency.name != null && dependency.version != null) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)

// Default scope to compile
dependencyNode.appendNode('scope', 'compile')

// Check for specific artifact IDs and add 'optional' flag
if (dependency.name in ['okhttp', 'firebase-appindexing']) {
dependencyNode.appendNode('optional', 'true')
}
}
}
}
Expand All @@ -154,15 +163,15 @@ project.afterEvaluate {
}

repositories {
maven {
url = isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl()
credentials {
username = getRepositoryUsername()
password = getRepositoryPassword()
maven {
url = isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl()
credentials {
username = getRepositoryUsername()
password = getRepositoryPassword()
}
}
}
}
}

signing {
sign publishing.publications.release
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Adobe Branch SDK Extension change log

- 3.0.2
* Dec 16, 2024
* Update Branch Android SDK to 5.15.0
* Fix to include compile dependencies

- 3.0.1
* Nov 19, 2024
* Fix for missing .aar in 3.0.0
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
VERSION_NAME=3.0.1
VERSION_CODE=300001
VERSION_NAME=3.0.2
VERSION_CODE=300002
GROUP=io.branch.sdk.android

POM_NAME=Branch Adobe Android SDK
Expand Down

0 comments on commit d6d2cea

Please sign in to comment.