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 - allow changing min sdk version #1117

Merged

Conversation

PieterVanPoyer
Copy link
Contributor

Platforms affected

Android

Motivation and Context

Give the users the opportunity to overwrite the minSdkVersion without a failing build.

Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in
library [:CordovaLib]

Description

This PR uses the overriden cdvMinSdkVersion if it is provided, else it is defaulted to 22 for now.

Testing

I did ran the Java Android tests.
I tested it in next repo: https://github.com/PieterVanPoyer/cordova-plugin-splashscreen-testing-app/tree/testing/changing-min-sdk-version

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

Copy link
Contributor

@breautek breautek left a comment

Choose a reason for hiding this comment

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

Just a few nitpicks.

PieterVanPoyer and others added 2 commits November 3, 2020 22:47
No printing of default behaviour

Co-authored-by: Norman Breau <[email protected]>
typo + match case of cdvMinSdkVersion

Co-authored-by: Norman Breau <[email protected]>
@codecov-io
Copy link

codecov-io commented Nov 3, 2020

Codecov Report

Merging #1117 (8cf8140) into master (335b0f2) will increase coverage by 0.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1117      +/-   ##
==========================================
+ Coverage   69.71%   70.06%   +0.35%     
==========================================
  Files          20       20              
  Lines        1806     1784      -22     
==========================================
- Hits         1259     1250       -9     
+ Misses        547      534      -13     
Impacted Files Coverage Δ
bin/templates/cordova/lib/device.js 100.00% <0.00%> (ø)
bin/templates/cordova/lib/build.js 33.33% <0.00%> (+2.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 335b0f2...8cf8140. Read the comment docs.

Copy link
Contributor

@breautek breautek left a comment

Choose a reason for hiding this comment

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

lgtm

@breautek breautek requested a review from erisu November 4, 2020 13:57
@PieterVanPoyer
Copy link
Contributor Author

@breautek what do you think? Should we wait for another review? Or can this be merged now, or should this be merged later? Kind regards

@PieterVanPoyer
Copy link
Contributor Author

@timbru31 I completed/resolved your requesting changes. I did learn a bit about Groovy and Gradle with this PR. Nice. If there are still remarks, just let it know.

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

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

LGTM; thanks for addressing my comments.

@breautek
Copy link
Contributor

I'll give it a couple more days or so to give a chance for anybody else to pitch in. Assuming there are no objections I'll merge.

@breautek
Copy link
Contributor

Tests are green, and there haven't been any objections so I'm merging!

Thank you @PieterVanPoyer for your time and effort in preparing this PR and thank you @erisu and @timbru31 for your reviews.

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.

Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library
5 participants