From d6d2cea5c9fe0b9b2680702e7240422ba265210f Mon Sep 17 00:00:00 2001 From: nsingh-branch Date: Mon, 16 Dec 2024 18:32:38 -0800 Subject: [PATCH] Fixed dependencies section --- AdobeBranchExtension/build.gradle | 39 +++++++++++++++++++------------ ChangeLog.md | 5 ++++ gradle.properties | 4 ++-- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/AdobeBranchExtension/build.gradle b/AdobeBranchExtension/build.gradle index 8d9c085..79ee0a6 100644 --- a/AdobeBranchExtension/build.gradle +++ b/AdobeBranchExtension/build.gradle @@ -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 @@ -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') + } } } } @@ -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 diff --git a/ChangeLog.md b/ChangeLog.md index 31d687f..b456f7f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/gradle.properties b/gradle.properties index df29286..cf5a2a4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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