How to Publish Android Library in Bintray using Travis CI
In this article, I am not going to write about how to create an android library or how to publish an android library rather than publish the library using Continuous integration. Because I found a simple way and sharing that with you all. I recommend to read the below articles. If you already know ignore it.
An Android library is structurally the same as an Android app module. It can include everything needed to build an app…developer.android.com
Sometimes being a lazy developer is a good thing, especially when you want to reduce repetitive tasks and find…blogs.quovantis.com
In my previous post about Android library project initialization I wrote how to write our own library or module to…medium.com
Before getting started,
Why Travis CI?
- Travis CI is the most widely used automation tool in open source projects like Github, Bitbucket, etc.
- It is totally free for unlimited public repositories.
- Painless Integration.
The following example tells Travis CI that this is a Ruby project that should be built with Ruby 2.2, and the latest…docs.travis-ci.com
In 5 Steps to integrate Travis CI for android library.
Let’s get started,
- First add below dependency in your Project build.gradle,
2. In library module build.gradle,
3. Integrate Travis CI in Github account,
- Go to marketplace in Github account and search for Travis CI
- Select Open source in Pricing and setup and click install it for free and its asking for Github authentication.
4. Integrate Travis CI in project,
- Create .travis.yml file in root project folder, add the below lines,
5. Setup environment variable,
Before setup environment variable we need to get bintray user name and API key
- Go to Bintray account, Select Edit profile will see your user name.
- Then, Click API key and press show button it reveals the API key and copy it.
- Go to Travis CI, Select your repo and click more option in this menu choose Settings
Additionally, Travis CI sets environment variables you can use in your build, e.g. to tag the build, or to run…docs.travis-ci.com
- In Settings, Add environment variables
That’s all 🙌. Commit your code build will started automatically.
Note: By default, Build started for every commit and pull request.
Thanks for reading this article…!
Please let me know if you have any suggestions or feedbacks.