Going to start off with the .travis.yml file and then explain it.
This was based off the configuration found here.
The reason this has to be done stems from this issue on the travis-ci project. Unfortunately, this is a temporary workaround as the travis team needs to find a way to update their images.
-
envANDROID_TARGET: the source travis config usesandroid-20, however I chose to useandroid-Las that's what is used in thebuild.gradlefile as well.
-
before_install: this grabs the new android sdk and updates it for use on this build -
before_script: this is used specifically for my repository as I have specific properties for the build. -
script: utilize the gradle wrapper which will automatically get the correct gradle binary and execute the build -
deploy: based on the guide- I personally started this section using the travis cli tool and the command
travis setups releases file: use the${TRAVIS_BUILD_DIR}env var to get the root dir and append the gradle output dir to the string, no plus sign or quotations necessary.on: this is used for conditional deploymentstagsset to true makes sure the deployment only occurs on tags, this requires theall_branchesprop as well due to a known issue.
- I personally started this section using the travis cli tool and the command