2 If you want to start help developing ownCloud please follow the [contribution guidelines][0] and observe these instructions.
4 If you have any problems, start again with 1) and work your way down. If something still does not work as described here, please open a new issue describing exactly what you did, what happened, and what should have happened.
6 ### 1) Fork and download android/develop repository:
8 NOTE: Android SDK with platforms 8, 14 and 19 (and maybe others) need to be installed.
9 You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
10 "git" need to be installed and in your environment path variable.
12 * Navigate to https://github.com/owncloud/android, click fork.
13 * Clone your new repo: "git clone git@github.com:YOURGITHUBNAME/android.git"
14 * Move to the project folder with "cd android"
15 * Checkout remote develop branch: "git checkout -b develop remotes/origin/develop"
16 * Pull changes from your develop branch: "git pull origin develop"
17 * Make official ownCloud repo known as upstream: "git remote add upstream git@github.com:owncloud/android.git"
18 * Make sure to get the latest changes from official android/develop branch: "git pull upstream develop"
19 * Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
21 At this point you can continue using different tools to build the project. Sections 2a), 2b), and 2c) describe some of the existing alternatives.
23 ### 2a) Building with Ant:
25 NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
28 * Run "ant debug" to generate a debuggable version of the ownCloud app.
30 ### 2b) Building with console/maven:
32 NOTE: You must have mvn (version >= 3.1.1) in your environment path. Current Android 'platforms-tools' need to be installed.
34 Download/install Android plugin for Maven, install owncloud-android-library, then build ownCloud with mvn:
37 * git clone https://github.com/mosabua/maven-android-sdk-deployer.git
38 * cd maven-android-sdk-deployer
39 * mvn -pl com.simpligility.android.sdk-deployer:android-19 -am install
40 * cd ../android/owncloud-android-library
44 Now you can create ownCloud APK using "mvn package"
46 ### 2c) Building with Eclipse:
48 NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
50 * Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
51 * Open Eclipse and create new "Android Project from Existing Code". Choose android/actionbarsherlock/library as root.
52 * Clean project and compile.
53 * If any error appear, check the project properties; in the 'Android' section, API Level should be greater or equal than 14.
54 * If "error loading libz.so.1" appears, try "sudo apt-get install lib32z1"
55 * Make sure android/actionbarsherlock/library/bin/library.jar was created.
56 * Create a new "Android Project from Existing Code". Choose android/owncloud-android-library as root. (test and sample clients are not required.)
57 * Clean project and compile.
58 * If any error appear, check the project properties; in the 'Android' section, API Level should be 19 or greater.
59 * Make sure 'android/owncloud-android-library/bin/owncloud android library.jar' was created.
60 * Import ownCloud Android project.
61 * Clean project and compile.
62 * If any error appears, check the project properties of owncloud-android project; in the 'Android' section:
63 - API Level should be 19 or greater.
64 - Two library projects should appear referred in the bottom square: actionbarsherlock/library and owncloud-android-library. Add them if needed.
65 * After those actions you should be good to go. HAVE FUN!
67 NOTE: Even though API level is set to 19, APK also runs on older devices because in AndroidManifest.xml minSdkVersion is set to 8.
69 ### 3) Create pull request:
71 NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
73 * Commit your changes locally: "git commit -a"
74 * Push your changes to your Github repo: "git push"
75 * Browse to https://github.com/YOURGITHUBNAME/android/pulls and issue pull request
76 * Click "Edit" and set "base:develop"
77 * Again, click "Edit" and set "compare:develop"
78 * Enter description and send pull request.
80 ### 4) Create another pull request:
82 To make sure your new pull request does not contain commits which are already contained in previous PRs, create a new branch which is a clone of upstream/develop.
85 * git checkout -b my_new_develop_branch upstream/develop
86 * If you want to rename that branch later: "git checkout -b my_new_develop_branch_with_new_name"
87 * Push branch to server: "git push -u origin name_of_local_develop_branch"
88 * Use Github to issue PR
91 [0]: https://github.com/owncloud/android/blob/master/CONTRIBUTING.md
92 [1]: http://owncloud.org/about/contributor-agreement/