Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Adding support for Gradle BOM #128

Merged
merged 1 commit into from
Jun 15, 2020
Merged

Adding support for Gradle BOM #128

merged 1 commit into from
Jun 15, 2020

Conversation

jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Jun 14, 2020

Issue

See Issue #127 for a summary

Summary of Changes

Since BOM files allow you to omit defining a version at all the requested version is null. At the apply override step we check the original version which when we see null we assumed the version was 0. This means we force either an invalid version or downgrade when should not. We now skip by these null versions as the BOM inserts a constraint entry which is picked up the same overrideVersion flow and can apply it like a normal direct dependency.


Useful debugging commit - 1333ef1
It was unneeded but if we ever need to omit BOMs from group alignment calculations see PR #129

@jkasten2 jkasten2 changed the title WIP - Adding support for Gradle BOM Adding support for Gradle BOM Jun 14, 2020
src/test/groovy/com/onesignal/androidsdk/MainTest.groovy Outdated Show resolved Hide resolved
implementation 'com.google.firebase:firebase-common:17.1.0'

// implementation 'com.google.firebase:firebase-messaging:15.0.2'
// implementation 'com.google.firebase:firebase-core:16.0.0'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there a few commented out lines here? Just curious

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should compile 'com.android.support:appcompat-v7:26.0.0' be flipped to implementation as well and commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't mean to commit this, I was just testing. Fixed!

*  If a project is using a BOM file (such as firebase-bom) as the
only source for a version number on a dependency we were
incorrectly downgrading.
* This was resloved by ignoring null versions
Copy link

@mikechoch mikechoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jkasten2 jkasten2 merged commit 1142690 into master Jun 15, 2020
@jkasten2 jkasten2 deleted the support_gradle_bom branch June 15, 2020 20:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants