-
-
Notifications
You must be signed in to change notification settings - Fork 735
Build for any SDK on Travis. #774
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #774 +/- ##
=========================================
Coverage 53.42% 53.42%
Complexity 1748 1748
=========================================
Files 132 132
Lines 10295 10295
Branches 1428 1428
=========================================
Hits 5500 5500
Misses 4340 4340
Partials 455 455Continue to review full report at Codecov.
|
| - pip install --user codecov | ||
| - yes | sdkmanager "platforms;android-27" | ||
| - mkdir "$ANDROID_HOME/licenses" || true | ||
| - echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license" |
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.
what is that licence key?
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.
It's a hash that signifies that you have read and agreed to the Android license. Here it is used in ButterKnife as well https://github.com/JakeWharton/butterknife/blob/master/.travis.yml
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 don't think it's necessary? i already added yes to the sdk manager.. besides Travis needs line 22 to pass
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.
The downside to what you added is that you will have to continue to update it each time the SDK gets a bump, such as when API 28 releases. With this setup, it accepts all licenses for the Android SDK and therefore will install anything from the sdkmanager that it needs.
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.
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.
Looks like Travis doesn't like that https://travis-ci.org/parse-community/Parse-SDK-Android/builds/335729767
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.
Hmm it's using an older sdkmanager tools.
https://docs.travis-ci.com/user/languages/android/#Installing-a-newer-SDK-Platform-Tools-revision
When I run it locally, I see:
./sdkmanager
Usage:
sdkmanager [--uninstall] [<common args>] [--package_file <file>] [<packages>...]
sdkmanager --update [<common args>]
sdkmanager --list [<common args>]
sdkmanager --licenses [<common args>]
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 think you need to specify a build tools, which should hopefully give you a newer sdkmanager.
No build-tools version is specified in android.components. Consider adding one of:
build-tools-27.0.3
The following versions are pre-installed:
build-tools-25.0.2
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.
Well yeah thats the nice thing about doing it the way I have it now. It does not require changing the build tools version in the travis config each time you change it in code. On top of that, if we let the SDK decide which build tools to use based on the Android plugin, then we would not know the build tools version to install ahead of time. Instead, if we accept the license the way it is now, it would accept all build tools versions
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.
Ok well we should fix and change to use the more obvious sdkmanager line when Travis bumps the default build tools version.
|
Does this sound good @rogerhu ? |
* Build for any SDK on Travis. * Use sdkmanager to approve licenses * Revert "Use sdkmanager to approve licenses" This reverts commit b51d415.
Trying this again. This time, leaving the build only restriction