Continuous integration with jenkins using android studio - android

I am new here to develop android application with android studio.
I created sample basic application, from this i got the project structure of the application with build.gradle files in each module(which is different from eclipse).
Then I successfully commit the code and push the entire project code to git repository by using Version Control System (VCS) in it.
I need to configure my project with jenkins server for continuous integration.
Can any one give me the step by step procedure, how to configure android studio project code (which is commited in git repository) with jenkins server.
So far i didn't find any clear procedure to configure android studio code with jenkins server for continuous integration.
Thanks in adavance

Unfortunately for you, this isn't a "Tutorial" site. If you have a specific issue, people will help you. But for a tutorial, google around some blogs.
Based on your description, you need to:
Configure some triggers (prolly SCM change, or timer based)
Perform GIT checkout
Perform Gradle build step
Decide where to Archive your artifacts
Do that, and when you have a specific issue, then ask a specific question

Related

Android Studio: Override remote dependency with local checkout for development

If an Android app depends on a library that is developed simultaneously in a separate git repository, it would be convenient to develop them in the same project, but keep the proper remote location of this library as dependency.
So during development I would want to use a local checkout of the dependency, which I can constantly develop alongside the app and push updates to its own repo. Yet the app project's configuration should properly refer to the dependency's remote URL.
In Xcode I can do this easily by creating a Workspace, into which I drag the app project, and the local checkout of the package I want to develop in concert. The app project will then use my local checkout instead of pulling the remote dependency.
Is something like this possible with Android Studio, or what is the best way to have a library from a separate git repository (that is used in other projects as well for example) be developed in sync with an app. I want to avoid changing the API in the library, then pushing, only to then find out that the app project doesn't compile anymore with the latest version for example. If the app project already tries with the local checkout of the library, this is a much better development experience.
Is it possible for example to specify the dependency as local with a fallback to the remote? Then I could check out app and library alongside, but on CI or any other developer's build machine, which doesn't have the library checked out, it would pull the dependency and it would work as well.

How to version an Android app?

I'm still at the path of learning programming, but my apps are getting quite complicated and I want to learn how to store a snapshot of current working app version before continuing with implementing other enhancements so that I could go back to that stored version if need be? Could anyone give me a link to tutorial about it? My search only returns tips how to set app version in gradle files.
What you are looking for I believe is a source control software that will be able to control your versioning, there are plenty, I recommend: Git
Tutorials:
Tutorials Point
Tutorial for begginers by Roger Dudler
One of Git concept is being able to work offline (you can work locally on your PC).
AndroidStudio Integration:
After installing Git on your machine you can easily integrate Git with AndroidStudio (Although I prefer working from Git Bash CLI), by doing:
Go to File -> Settings -> Version Control -> Git and configure Git
Go to VCS -> Enable Version Control Integration -> select 'Git'
You should take a look at vogella
for a starter I recommend
https://www.tutorialspoint.com/git/
http://javapapers.com/android/android-studio-git-tutorial/
https://www.londonappdeveloper.com/how-to-use-git-hub-with-android-studio/

Github issues integration with android studio

I already have Github set up in Android studio.
I can commit, push and everything else.
What I can't figure out is how do create and manage Github issues with Android studio?
That's pretty easy to do.
Integrate Github (not git) server
Tools -> Tasks & Contexts -> Configure Servers
Add a github server (not gitlab) an set your repo stuff there
Work on issues
Once done, you can create, work on, close issues
Tools -> Tasks & Contexts -> Switch task (or Alt+Shift+T on windows)
You can open, mark as resolved, create branch for the issue.
If you want it closed you can include closes #123 in your commit message which will close it (this doesn't have to be from within android studio, github recognizes it as a command).
Actually, what you've got set up in Android Studio is Git, not GitHub. Git is the version control system, GitHub just hosts the repositories and essentially pretties it up for you. Issues aren't in any way actually associated with your git repository, except through GitHub and as a result, what you're trying to do isn't possible.

TFS automated build setup for android application

I am developing an android application. TFS is used for version control. Even the automated build also needs to setup for the android app on TFS server.
It would be great If anyone can guilde me on this.
This is a really broad question, so I'm giving you a really broad answer:
Install the Java SDK, the Android SDK, and whatever you need to build your application on your build agent(s).
Create a custom build process template (or find one online) that can execute an ANT or Maven script.

Android Git: Making one project and doing changes

I am working on an android project that have later to be translated to many other languages and some changes have to do in design.
Now I want to know is there any way to make one project and keep it on git and later having changes should change the git project accordingly. So is it possible to create multiple apps for Android project. If yes, is it possible with Eclipse and git or someone has any other idea?
For the time being I am saving project in local directory and copy that project to make changes for next app.
This sounds that you should give git-subtrees a try. There, you create one repo with your base project and then import this repo into your specific app project. If you want to propagate your changes to the API, you push the changes to the base repo. We use this for component development.
But from my experience: do not use eclipse for working with git. It has some major drawbacks and might corrupt the repos. Use the CLI or another tool.

Categories

Resources