2014-11-06 13:17:18 +03:00
2014-10-12 22:36:34 +04:00
If you want to start help developing ownCloud please follow the [contribution guidelines][0] and observe these instructions.
2013-11-18 15:03:06 +04:00
2014-10-12 22:36:34 +04:00
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.
2014-11-06 13:17:18 +03:00
2014-10-12 22:36:34 +04:00
### 1) Fork and download android/develop repository:
NOTE: Android SDK with platforms 8, 14 and 19 (and maybe others) need to be installed.
You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
"git" need to be installed and in your environment path variable.
2013-11-18 15:03:06 +04:00
* Navigate to https://github.com/owncloud/android, click fork.
* Clone your new repo: "git clone git@github.com:YOURGITHUBNAME/android.git"
* Move to the project folder with "cd android"
* Checkout remote develop branch: "git checkout -b develop remotes/origin/develop"
* Pull changes from your develop branch: "git pull origin develop"
2013-11-18 15:27:29 +04:00
* Make official ownCloud repo known as upstream: "git remote add upstream git@github.com:owncloud/android.git"
2013-11-18 15:03:06 +04:00
* Make sure to get the latest changes from official android/develop branch: "git pull upstream develop"
2014-02-27 17:37:44 +04:00
* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
2013-11-18 15:03:06 +04:00
2014-10-12 22:36:34 +04:00
At this point you can continue using different tools to build the project. Sections 2a), 2b), and 2c) describe some of the existing alternatives.
2013-11-18 15:03:06 +04:00
2014-10-12 22:36:34 +04:00
### 2a) Building with Ant:
2013-08-06 13:19:30 +04:00
2013-11-18 15:03:06 +04:00
NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
* Run "ant clean" .
2014-02-27 17:37:44 +04:00
* Run "ant debug" to generate a debuggable version of the ownCloud app.
2013-11-18 15:03:06 +04:00
2014-10-12 22:36:34 +04:00
### 2b) Building with console/maven:
2013-11-18 15:03:06 +04:00
2014-11-05 21:54:50 +03:00
WARNING: OBSOLETE!
2013-12-11 14:50:18 +04:00
NOTE: You must have mvn (version >= 3.1.1) in your environment path. Current Android 'platforms-tools' need to be installed.
2013-11-18 15:03:06 +04:00
2014-01-30 11:51:07 +04:00
Download/install Android plugin for Maven, install owncloud-android-library, then build ownCloud with mvn:
2014-01-25 09:20:02 +04:00
* cd ..
* git clone https://github.com/mosabua/maven-android-sdk-deployer.git
* cd maven-android-sdk-deployer
* mvn -pl com.simpligility.android.sdk-deployer:android-19 -am install
2014-01-30 11:51:07 +04:00
* cd ../android/owncloud-android-library
2014-01-25 09:20:02 +04:00
* mvn install
* cd ..
Now you can create ownCloud APK using "mvn package"
2013-11-18 15:03:06 +04:00
2014-10-12 22:36:34 +04:00
### 2c) Building with Eclipse:
2013-11-18 15:03:06 +04:00
NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
* Open Eclipse and create new "Android Project from Existing Code". Choose android/actionbarsherlock/library as root.
* Clean project and compile.
* If any error appear, check the project properties; in the 'Android' section, API Level should be greater or equal than 14.
2014-10-12 22:36:34 +04:00
* If "error loading libz.so.1" appears, try "sudo apt-get install lib32z1"
2013-11-18 15:03:06 +04:00
* Make sure android/actionbarsherlock/library/bin/library.jar was created.
2014-10-12 22:36:34 +04:00
* Create a new "Android Project from Existing Code". Choose android/owncloud-android-library as root. (test and sample clients are not required.)
2013-11-18 15:03:06 +04:00
* Clean project and compile.
* If any error appear, check the project properties; in the 'Android' section, API Level should be 19 or greater.
2014-10-12 22:36:34 +04:00
* Make sure 'android/owncloud-android-library/bin/owncloud android library.jar' was created.
2013-11-18 15:03:06 +04:00
* Import ownCloud Android project.
* Clean project and compile.
2013-12-11 14:50:18 +04:00
* If any error appears, check the project properties of owncloud-android project; in the 'Android' section:
2013-11-18 15:03:06 +04:00
- API Level should be 19 or greater.
2014-01-30 11:51:07 +04:00
- Two library projects should appear referred in the bottom square: actionbarsherlock/library and owncloud-android-library. Add them if needed.
2013-11-18 15:03:06 +04:00
* After those actions you should be good to go. HAVE FUN!
NOTE: Even though API level is set to 19, APK also runs on older devices because in AndroidManifest.xml minSdkVersion is set to 8.
2014-10-12 22:36:34 +04:00
### 3) Create pull request:
2013-11-18 15:03:06 +04:00
NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
* Commit your changes locally: "git commit -a"
2014-10-31 15:32:25 +03:00
* If substantial changes were done to the official repository while you were working, merge those changes: "git merge upstream/develop"
2013-11-18 15:03:06 +04:00
* Push your changes to your Github repo: "git push"
* Browse to https://github.com/YOURGITHUBNAME/android/pulls and issue pull request
* Click "Edit" and set "base:develop"
* Again, click "Edit" and set "compare:develop"
* Enter description and send pull request.
2013-03-14 01:32:44 +04:00
2014-10-12 22:36:34 +04:00
### 4) Create another pull request:
2014-01-25 09:20:02 +04:00
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.
* git fetch upstream
* git checkout -b my_new_develop_branch upstream/develop
* If you want to rename that branch later: "git checkout -b my_new_develop_branch_with_new_name"
2014-01-25 17:50:15 +04:00
* Push branch to server: "git push -u origin name_of_local_develop_branch"
2014-01-25 09:23:46 +04:00
* Use Github to issue PR
2014-01-25 09:20:02 +04:00
2013-03-14 01:32:44 +04:00
2013-10-24 11:20:13 +04:00
[0]: https://github.com/owncloud/android/blob/master/CONTRIBUTING.md
[1]: http://owncloud.org/about/contributor-agreement/