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

Quick fix to support ANDROID_SDK_ROOT #656

Merged
merged 2 commits into from
Feb 12, 2019

Conversation

brodybits
Copy link
Contributor

@brodybits brodybits commented Feb 8, 2019

This is a quick fix. Purpose is that upcoming major release of cordova-android should not depend on deprecated behavior as discussed in #617.

TODO:

  • NEEDS TO BE TESTED now tested on my own dev system
  • review

FUTURE TODO:

  • cleanup
  • more elegant

@codecov-io
Copy link

Codecov Report

Merging #656 into master will decrease coverage by 0.05%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #656      +/-   ##
==========================================
- Coverage   64.66%   64.61%   -0.06%     
==========================================
  Files          18       18              
  Lines        1817     1820       +3     
==========================================
+ Hits         1175     1176       +1     
- Misses        642      644       +2
Impacted Files Coverage Δ
bin/templates/cordova/lib/check_reqs.js 49.5% <25%> (-0.25%) ⬇️

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 73692e6...7f1bfe1. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Feb 8, 2019

Codecov Report

Merging #656 into master will decrease coverage by 0.05%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #656      +/-   ##
==========================================
- Coverage   64.66%   64.61%   -0.06%     
==========================================
  Files          18       18              
  Lines        1817     1820       +3     
==========================================
+ Hits         1175     1176       +1     
- Misses        642      644       +2
Impacted Files Coverage Δ
bin/templates/cordova/lib/check_reqs.js 49.5% <25%> (-0.25%) ⬇️

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 73692e6...bedaf90. Read the comment docs.


if (!String(values[0]).startsWith('1.8.')) {
throw new CordovaError(
'Requirements check failed for JDK 8 (\'1.8.*\')! Detected version: ' + values[0] + '\n' +
'Check your JAVA_HOME / ANDROID_HOME / PATH environment variables.'
'Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.'
'Check your `ANDROID_SDK_ROOT` and `JAVA_HOME` PATH environment variables.'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not 100% convinced by this suggestion. It is possible that a developer could set a PATH environment variable that already includes the Android SDK bin directory.

Copy link
Member

Choose a reason for hiding this comment

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

ah, then I misread the meaning.

Suggested change
'Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.'
'Check your `ANDROID_SDK_ROOT`, `JAVA_HOME` and `PATH` environment variables.'

@janpio
Copy link
Member

janpio commented Feb 9, 2019

Is this WIP or should this be reviewed? Please decide.

Co-Authored-By: brodybits <chris.brody@gmail.com>
@brodybits brodybits changed the title [WIP] Quick fix to support ANDROID_SDK_ROOT WIP (NOT TESTED) Quick fix to support ANDROID_SDK_ROOT Feb 11, 2019
@brodybits
Copy link
Contributor Author

Now tested, with one of the suggestions applied and my comment left on the other one. I would like to request a quick review, hope we can merge it soon.

@oliversalzburg
Copy link

LGTM

Copy link
Member

@janpio janpio left a comment

Choose a reason for hiding this comment

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

Looks good in theory, we'll see if it also works with all the different installations out there.

@brodybits brodybits merged commit b4de6f5 into apache:master Feb 12, 2019
@brodybits brodybits deleted the android-sdk-home-quick-fix branch February 12, 2019 14:20
erisu added a commit to erisu/cordova-android that referenced this pull request Feb 16, 2019
erisu added a commit that referenced this pull request Feb 18, 2019
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.

None yet

4 participants