enabled project for building with maven (eclipse building stays untouched)

added/updated compile instructions in setup.md
added some eclipse generated files to .gitignore
This commit is contained in:
Luke Owncloud 2013-10-21 09:29:05 +02:00
parent a67a6766a6
commit a43fef7dbf
3 changed files with 37 additions and 20 deletions

10
.gitignore vendored
View File

@ -18,3 +18,13 @@ local.properties
# Mac .DS_Store files
.DS_Store
# These files are created automatically by Eclipse:
tests/proguard-project.txt
tests/project.properties
tests/ant.properties
tests/build.xml
proguard-project.txt
# Should not be commited inside this repo:
actionbarsherlock/

View File

@ -2,27 +2,41 @@
If you want to start development of ownCloud first download required files, then compile using console or Eclipse, finally create pull request:
1. Fork and download android/develop repository:
- NOTE: You must have git in your enviroment path
- Navigate to https://github.com/owncloud/android, click fork.
- Clone your new repo: "git clone git@github.com:YOURGITHUBNAME/android.git"
- "cd android"
- Checkout remote develop branch: "git checkout -b develop remotes/origin/develop"
- Make sure to get the latest changes of android/develop branch: "git pull origin develop"
2. Building with console:
2. Building with console/maven:
- Use setup_env.sh or setup_env.bat
- NOTE: You must have mvn, git, ant/bin, android/tools, and 'platforms-tools' in your enviroment path
- OPTIONAL, CONTINUE WITH STEP 3 IF NOT REQUIRED!
- NOTE: You must have mvn in your enviroment path
- Download/install Android plugin for Maven, then build ownCloud with mvn:
- "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-17 -am install"
- "cd ../android"
- Now you can create APK using "mvn package"
3. Building with eclipse:
- Open Eclipse and create new "Android Project from Existing Code". As root choose *actionbarsherlock/library*
- Increase Android API level until project compiles. 14 should work. bin/library.jar needs to be created!
3. Building with Eclipse:
- NOTE: You must have android/tools, and 'platforms-tools' in your enviroment path
- Prepare building with Eclipse:
- "setup_env.bat" or "./setup_env.sh"
- Open Eclipse and create new "Android Project from Existing Code". As root choose android/actionbarsherlock/library
- Increase Android API level until project compiles. 14 should work.
- Clean project and compile.
- Make sure android/actionbarsherlock/library/bin/library.jar was created!
- Import OwnCloud Android project.
- Increase Android API level to 17.
- Clean all projects.
- Clean project and compile.
- After those actions you should be good to go. HAVE FUN!
- TODO: How to build for older devices?
- NOTE: Even though API level is set to 17, APK also runs on older devices because in AndroidManifest.xml minSdkVersion is set to 8.
4. Create pull request:
- Commit your changes locally: "git commit -a"

11
pom.xml
View File

@ -11,8 +11,7 @@
<properties>
<java-version>1.6</java-version>
<google.android-version>4.1.1.4</google.android-version>
<google.android.support-version>r7</google.android.support-version>
<google.android-version>4.2.2_r2</google.android-version>
<actionbarsherlock-version>4.2.0</actionbarsherlock-version>
</properties>
@ -27,18 +26,12 @@
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>${google.android-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>${google.android.support-version}</version>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>