Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android dependencies - Always use latest #236

Closed
wants to merge 1 commit into from

Conversation

jkasten2
Copy link

Most Android plugins / SDKs depend on com.android.support and having mismatched versions creates a number of issues.
To avoid conflicts with other Cordova plugins most plugins have opted to use '+' which will always use the latest available.
Ideally it would be better to define a version range however Gradle has some resolution limitations and issues.

Most Android plugins / SDKs depend on `com.android.support` and having mismatched versions creates a number of issues.
To avoid conflicts with other Cordova plugins most plugins have opted to use '+' which will always use the latest available.
Ideally it would be better to define a version range however Gradle has some resolution limitations and issues.
@dpa99c
Copy link
Owner

dpa99c commented Sep 27, 2017

Thanks for the pull request, however I'm afraid that the solution isn't quite so simple:

Firstly, due to the way that Gradle versioning differs from, for example, npm versioning, setting the version to :+ will cause Gradle to pull in the very latest version of the library.
This may cause an Alpha or Beta release to be pulled in which is non-production-ready (may contain bugs, may change before final release, is incompatible with other libraries).
You can see in the release history that Alpha and Beta builds are published for the Android Support Library.
It is for this reason I have taken the policy of setting the Gradle version to a specific major version. Although v26 is now in final release, hence the pinned version could now be bumped to 26.+, this will not necessarily help - see below.

most plugins have opted to use '+'

Even if this were the case (which it is not, for example cordova-plugin-camera, Telerik ImagePicker plugin, cordova-plugin-local-notifications to name a few), it only requires one mismatched Gradle version in a plugin to break the build. It is for this reason I created cordova-android-support-gradle-release, which provides a mechanism by which the Gradle version specified by (almost all) plugins can be overriden to a specific version, making them align and therefore allowing the build to succeed. I have had much success with this in resolving build failures caused by Gradle version mismatches, as I have with it's sister plugin cordova-android-play-services-gradle-release.

There have been numerous discussions regarding this issue (e.g. here, here, here).

Again, I thank you for the pull request but hope you understand why I do not accept it.

@dpa99c dpa99c closed this Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants