-
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
Fix #207 - Add Travis CI support #209
Conversation
@@ -18,7 +18,7 @@ dependencies { | |||
} | |||
|
|||
android { | |||
compileSdkVersion 23 | |||
compileSdkVersion "Google Inc.:Google APIs:21" |
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 I'd prefer to keep this on the latest API level. Can you set it to '23' here and override these when it's run through Travis?
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 assume that's possible, although I've never configured that setup before. Are you able to see if anyone on the Android team can explain why the API 23 Google API emulator isn't working with gradle commands?
If the emulator issue isn't something that's going to be fixed anytime soon I can look into running on API 21 only on Travis.
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.
Actually, I figured out a way to get this to run on API 21 emulator via the travis script itself. I'll force-push a new commit into this PR that keeps the project compileSdkVersion 23
while running on the API Level 21 Google API emulator.
* This patch keeps the project at `compileSdkVersion 23` while running on the API Level 21 Google API emulator on Travis, because: a) Google API emulator image is needed to run tests that require Google Play Services (see https://developers.google.com/android/guides/setup, googlemaps#203 (comment)) b) API Level 23 Google API emulator seems to have a bug preventing use on Travis - see googlemaps#207 (comment) * When the issue with the API Level 23 Google API emulator is resolved, the `EMULATOR_API_LEVEL` variable in .travis.yml can be bumped to 23 as well. * This patch also adds a command-line option to disable pre-dexing, which is used on Travis to decrease build times (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)
@markmcd Ok, I just force-pushed a new commit into this PR to replace the old one. Here is the new PR/commit description:
This is a much better solution, as it doesn't alter the project build config at all, but still allows it to run on Travis. |
Well, hold that thought...For some reason this is failing now, even though what should be the exact same config passed earlier. Will update again shortly... |
I think this should be ok to merge. Seems Travis had an existential crisis in the middle of the initial build of this branch. It initially failed, and when I tried to restart, it seems like its hanging indefinitely in the "created" state but refuses to start. I created a new branch from the exact same commit, and this passes on Travis. So, this should be ready for review/merge. |
Fix #207 - Add Travis CI support
Oh - and thanks again for doing this! It's huge 👍 |
No prob! :) Thanks for the review/merge. |
As discussed in #207 (comment), requires changing tocompileSdkVersion "Google Inc.:Google APIs:21"
, because:a) Google API emulator image is needed to run tests that require Google Play Services (see https://developers.google.com/android/guides/setup)
b) the Google API Level 23 emulator seems to have a bug that doesn't allow installing/running tests from the command line
This patch also adds a command-line option to disable pre-dexing, which is used on Travis to decrease build times (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)See below comment for revised PR contents, based on comments on the initial commit.