Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,14 @@ branches:
- /^\d+\.\d+\.\d+$/ # regex

language: android
sudo: false

jdk:
- oraclejdk8

android:
components:
- tools
- platform-tools
- build-tools-27.0.0
- android-27
- doc-27

before_install:
- pip install --user codecov
- yes | sdkmanager "platforms;android-27"
- mkdir "$ANDROID_HOME/licenses" || true
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just do this?

https://stackoverflow.com/a/45782695

yes | sdkmanager --licenses

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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>]

Copy link
Contributor

@rogerhu rogerhu Jan 31, 2018

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

Copy link
Member Author

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

Copy link
Contributor

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.


script:
- ./gradlew clean testDebugUnitTest jacocoTestReport
Expand Down
3 changes: 1 addition & 2 deletions Parse/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ buildscript {

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -51,7 +50,7 @@ android {
}

ext {
okhttpVersion = '3.9.0'
okhttpVersion = '3.9.1'
}

dependencies {
Expand Down