-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
refactor: simplify doFindLatestInstalledBuildTools #900
Conversation
framework/cordova.gradle
Outdated
"No usable Android build tools found. Highest installed version is " + | ||
highestBuildToolsVersion.getOriginalString() + "; minimum version required is " + | ||
minBuildToolsVersionString + ".") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For informational purposes, since Gradle scripts are written in Groovy, using double quotations gives you string interpolation. String literals works 👍
These three lines could be written in one as,
"No usable Android build tools found. Highest installed version is ${highestBuildToolsVersion.getOriginalString()}; minimum version required is ${minBuildToolsVersionString}."
If this way is preferred just because the string is long, I would suggest single quotes so there is no string interpolation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a commit that uses string interpolation for the error messages while still avoiding line lengths of > 80 characters. What do you think of it?
framework/cordova.gradle
Outdated
"No installed build tools found. Install the Android build tools version " + | ||
minBuildToolsVersionString + " or higher.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though this line is not touched, same could apply here as an example.
Codecov Report
@@ Coverage Diff @@
## master #900 +/- ##
=======================================
Coverage 66.17% 66.17%
=======================================
Files 19 19
Lines 1839 1839
=======================================
Hits 1217 1217
Misses 622 622 Continue to review full report at Codecov.
|
Motivation and Context
Just minor code cleanup
Description
doFindLatestInstalledBuildTools
getAvailableBuildTools
Testing
npm t