Commit for the PR
authorMMMarcy <steiner.marcello@gmail.com>
Fri, 3 Oct 2014 10:33:41 +0000 (12:33 +0200)
committerMMMarcy <steiner.marcello@gmail.com>
Fri, 17 Oct 2014 12:42:11 +0000 (14:42 +0200)
The pull request targets:

1) Introduces Gradle support
2) Updates maven support (even thou the apk generated is not
stable)
3) Updates the setup_env.* scripts to support different building
tools
4) Removes non UTF-8 characters
5) Removes switches on R.id entries (not supported anymore from
ADT >= 14)
6) Introduced a binary dependency (.aar) that replace the actionbarsherlock
sub-module

Remainders:

1) Change the sub-module back to the owncloud android library
once the PR will be merge

29 files changed:
.classpath
.gitignore
.gitmodules
.travis.yml
SETUP.md
actionbarsherlock [deleted submodule]
build.gradle [new file with mode: 0644]
gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
gradlew [new file with mode: 0755]
gradlew.bat [new file with mode: 0644]
libs/actionbarsherlock_lib/build.gradle [new file with mode: 0644]
libs/actionbarsherlock_lib/library-4.1.0.aar [new file with mode: 0644]
oc_jb_workaround/build.gradle [new file with mode: 0644]
oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
oc_jb_workaround/gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
oc_jb_workaround/gradlew [new file with mode: 0755]
oc_jb_workaround/gradlew.bat [new file with mode: 0644]
oc_jb_workaround/project.properties
owncloud-android-library
pom.xml
settings.gradle [new file with mode: 0644]
setup_env.bat
setup_env.sh
src/com/owncloud/android/datamodel/FileDataStorageManager.java
src/com/owncloud/android/operations/CreateShareOperation.java
src/com/owncloud/android/operations/GetSharesForFileOperation.java
tests/.classpath
third_party/android-support-library/android-support-v4.jar

index 7bc01d9..5176974 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="src" path="gen"/>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="gen"/>
        <classpathentry kind="output" path="bin/classes"/>
 </classpath>
        <classpathentry kind="output" path="bin/classes"/>
 </classpath>
index 9b9bd8e..9892374 100644 (file)
@@ -30,5 +30,11 @@ oc_framework/proguard-project.txt
 oc_framework-test-project/proguard-project.txt
 tests/proguard-project.txt
 
 oc_framework-test-project/proguard-project.txt
 tests/proguard-project.txt
 
-# Should not be commited inside this repo:
-actionbarsherlock/
\ No newline at end of file
+# Android Studio and Gradle specific entries
+.gradle
+.idea
+*.iml
+build
+
+# Actionbarsherlock is now ignored since scripts takes care of init the sub-modules.
+actionbarsherlock
index f0ca872..119bb29 100644 (file)
@@ -1,6 +1,3 @@
-[submodule "actionbarsherlock"]
-       path = actionbarsherlock
-       url = git://github.com/JakeWharton/ActionBarSherlock.git
 [submodule "owncloud-android-library"]
        path = owncloud-android-library
 [submodule "owncloud-android-library"]
        path = owncloud-android-library
-       url = git://github.com/owncloud/android-library.git
+       url = git://github.com/owncloudChalmers/android-library.git
index d205021..fbab8f4 100644 (file)
@@ -1,17 +1,16 @@
-language: java
-jdk: oraclejdk7
+language: android
+android:
+  components:
+    - platform-tools
+    - tools
+    - build-tools-20.0.0
+    - android-19
 before_install:
 before_install:
-  # Install base Android SDK
-    - sudo apt-get update -qq
-    - sudo apt-get install -qq libstdc++6:i386 lib32z1 expect
-    - export COMPONENTS="build-tools-20.0.0,android-14,android-17,android-19,sysimg-19,extra-android-support"
-    - export LICENSES="android-sdk-license-5be876d5|android-sdk-license-598b93a6"
-    - curl -3L https://raw.github.com/embarkmobile/android-sdk-installer/version-2/android-sdk-installer | bash /dev/stdin --install=$COMPONENTS --accept=$LICENSES
-    - source ~/.android-sdk-installer/env
-    - rm pom.xml
-    - ./setup_env.sh
-
+  - rm pom.xml
+  - ./setup_env.sh gradle
 script:
 script:
+  - ./gradlew clean build
+  - ./setup_env.sh ant
   - ant clean
   - ant debug
 
   - ant clean
   - ant debug
 
index a965064..3392db2 100644 (file)
--- a/SETUP.md
+++ b/SETUP.md
@@ -1,10 +1,10 @@
-  
+
 If you want to start help developing ownCloud please follow the [contribution guidelines][0] and observe these instructions:
 If you want to start help developing ownCloud please follow the [contribution guidelines][0] and observe these instructions:
-  
+
 ### 1. Fork and download android/develop repository:
 
 NOTE: You must have git in your environment path variable to perform the next operations.
 ### 1. Fork and download android/develop repository:
 
 NOTE: You must have git in your environment path variable to perform the next operations.
-  
+
 * 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"
 * 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"
@@ -12,23 +12,28 @@ NOTE: You must have git in your environment path variable to perform the next op
 * Pull changes from your develop branch: "git pull origin develop"
 * Make official ownCloud repo known as upstream: "git remote add upstream git@github.com:owncloud/android.git"
 * Make sure to get the latest changes from official android/develop branch: "git pull upstream develop"
 * Pull changes from your develop branch: "git pull origin develop"
 * Make official ownCloud repo known as upstream: "git remote add upstream git@github.com:owncloud/android.git"
 * Make sure to get the latest changes from official android/develop branch: "git pull upstream develop"
-* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
 
 
-At this point you can continue using different tools to build the project. Section 2, 3 and 4 describe some of the existing alternatives.  
+At this point you can continue using different tools to build the project. Section 2, 3, 4, 5 and 6 describe some of the existing alternatives.
 
 ### 2. Building with Ant:
 
 ### 2. Building with Ant:
-  
+
 NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
 
 NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
 
-* Run "ant clean" .
+* Resolve necessary dependencies running:
+    - Windows: "setup_env.bat ant"
+    - Mac OS/Linux: "./setup_env.sh ant"
+* Run "ant clean".
 * Run "ant debug" to generate a debuggable version of the ownCloud app.
 
 ### 3. Building with console/maven:
 
 NOTE: You must have mvn (version >= 3.1.1) in your environment path. Current Android 'platforms-tools' need to be installed.
 
 * Run "ant debug" to generate a debuggable version of the ownCloud app.
 
 ### 3. Building with console/maven:
 
 NOTE: You must have mvn (version >= 3.1.1) in your environment path. Current Android 'platforms-tools' need to be installed.
 
-Download/install Android plugin for Maven, install owncloud-android-library, then build ownCloud with mvn:
+Download/install Android plugin for Maven, then build ownCloud with mvn:
 
 
+* Resolve necessary dependencies running:
+    - Windows: "setup_env.bat maven"
+    - Mac OS/Linux: "./setup_env.sh maven"
 * cd ..
 * git clone https://github.com/mosabua/maven-android-sdk-deployer.git
 * cd maven-android-sdk-deployer
 * cd ..
 * git clone https://github.com/mosabua/maven-android-sdk-deployer.git
 * cd maven-android-sdk-deployer
@@ -37,42 +42,65 @@ Download/install Android plugin for Maven, install owncloud-android-library, the
 * mvn install
 * cd ..
 
 * mvn install
 * cd ..
 
-Now you can create ownCloud APK using "mvn package"
+Now you can create ownCloud APK using "mvn package" and find it as ownCloud.apk under the target
+
+### 4. Building with Gradle:
 
 
-### 4. Building with Eclipse:
+* Complete the setup of project properties running:
+    - Windows: "setup_env.bat gradle"
+    - Mac OS/Linux: "./setup_env.sh gradle"
+* Open a terminal and go to the "android" directory that contains the repository.
+* Run the 'clean' and 'build' tasks using the Gradle wrapper provided:
+    - Windows: gradlew.bat clean build
+    - Mac OS/Linux: ./gradlew clean build
+* You can find the generated apk file in android/build/outputs/apk
+
+### 5. Building with Eclipse:
 
 NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
 
 
 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.
+* Resolve necessary dependencies running:
+    - Windows: "setup_env.bat ant"
+    - Mac OS/Linux: "./setup_env.sh ant"
+    * Open Eclipse and create new "Android Project from Existing Code". Choose android/actionbarsherlock/library as root.
 * Clean project and compile.
 * 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.
+* If any error appears, check the project properties; in the 'Android' section, API Level should be greater or equal than 14.
 * Make sure android/actionbarsherlock/library/bin/library.jar was created.
 * Create a new "Android Project from Existing Code". Choose android/owncloud-android-library as root.
 * Clean project and compile.
 * Make sure android/actionbarsherlock/library/bin/library.jar was created.
 * Create a new "Android Project from Existing Code". Choose android/owncloud-android-library as root.
 * Clean project and compile.
-* If any error appear, check the project properties; in the 'Android' section, API Level should be 19 or greater.
-* Make sure android/owncloud-android-library/bin/classes.jar was created.  
+* If any error appears, check the project properties; in the 'Android' section, API Level should be 19 or greater.
+* Make sure android/owncloud-android-library/bin/classes.jar was created.
 * Import ownCloud Android project.
 * Clean project and compile.
 * If any error appears, check the project properties of owncloud-android project; in the 'Android' section:
 * Import ownCloud Android project.
 * Clean project and compile.
 * If any error appears, check the project properties of owncloud-android project; in the 'Android' section:
-  - API Level should be 19 or greater.
-  - Two library projects should appear referred in the bottom square: actionbarsherlock/library and owncloud-android-library. Add them if needed. 
+    - API Level should be 19 or greater.
+    - Two library projects should appear referred in the bottom square: actionbarsherlock/library and owncloud-android-library. Add them if needed.
 * 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.
 
 * 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.
 
-### 5. Create pull request:
-  
+### 6. Building with Android Studio:
+
+* Complete the setup of project properties running:
+    - Windows: "setup_env.bat gradle"
+    - Mac OS/Linux: "./setup_env.sh gradle"
+* The first time you want to open the project in Android Studio, select 'Import Project...' and choose the file "android/settings.gradle".
+  Android Studio will then create the '.iml' files it needs. If you ever close the project but the files are still there, you just select
+  'Open Project...'. The file chooser will show an Android face as the folder icon, which you can select to reopen the project.
+* To build the project, follow the guidelines shown on [4. Building with Gradle][2].
+
+### 7. Create pull request:
+
 NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
 
 * Commit your changes locally: "git commit -a"
 NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
 
 * Commit your changes locally: "git commit -a"
-* Push your changes to your Github repo: "git push"
+* 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.
 
 * 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.
 
-### 6. Create another pull request:
+### 8. Create another pull request:
 
 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.
 
 
 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.
 
@@ -80,8 +108,9 @@ To make sure your new pull request does not contain commits which are already co
 * 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"
 * Push branch to server: "git push -u origin name_of_local_develop_branch"
 * 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"
 * Push branch to server: "git push -u origin name_of_local_develop_branch"
-* Use Github to issue PR
+* Use GitHub to issue PR
 
 
 [0]: https://github.com/owncloud/android/blob/master/CONTRIBUTING.md
 [1]: http://owncloud.org/about/contributor-agreement/
 
 
 [0]: https://github.com/owncloud/android/blob/master/CONTRIBUTING.md
 [1]: http://owncloud.org/about/contributor-agreement/
+[2]: https://github.com/owncloud/android/blob/master/SETUP.md#4-building-with-gradle
diff --git a/actionbarsherlock b/actionbarsherlock
deleted file mode 160000 (submodule)
index 9598f2b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 9598f2bb2ceed4a834cd5586a903f270ca4c0ccc
diff --git a/build.gradle b/build.gradle
new file mode 100644 (file)
index 0000000..75231ed
--- /dev/null
@@ -0,0 +1,78 @@
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.13.0'
+    }
+}
+
+apply plugin: 'com.android.application'
+
+
+repositories {
+    mavenCentral()
+
+    flatDir {
+        dirs 'libs'
+    }
+}
+
+artifacts.add("default", file('libs/actionbarsherlock.aar'))
+
+dependencies {
+    compile name: 'touch-image-view'
+    compile 'com.android.support:support-v4:19.1.0'
+    compile project('libs/actionbarsherlock_lib')
+    compile project(':owncloud-android-library')
+    compile 'com.jakewharton:disklrucache:2.0.2'
+}
+
+android {
+    compileSdkVersion 19
+    buildToolsVersion "20.0.0"
+    sourceSets {
+        main {
+            manifest.srcFile 'AndroidManifest.xml'
+            java.srcDirs = ['src']
+            resources.srcDirs = ['src']
+            aidl.srcDirs = ['src']
+            renderscript.srcDirs = ['src']
+            res.srcDirs = ['res']
+            assets.srcDirs = ['res']
+        }
+
+        // Move the tests to tests/java, tests/res, etc...
+        instrumentTest.setRoot('tests')
+
+        // Move the build types to build-types/<type>
+        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
+        // This moves them out of them default location under src/<type>/... which would
+        // conflict with src/ being used by the main source set.
+        // Adding new build types or product flavors should be accompanied
+        // by a similar customization.
+        debug.setRoot('build-types/debug')
+        release.setRoot('build-types/release')
+    }
+
+    android {
+        lintOptions {
+            abortOnError false
+        }
+    }
+
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_7
+        targetCompatibility JavaVersion.VERSION_1_7
+    }
+    
+    productFlavors {
+    }
+
+    packagingOptions {
+        exclude 'META-INF/LICENSE.txt'
+    }
+}
+
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644 (file)
index 0000000..3d0dee6
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644 (file)
index 0000000..8d63f89
--- /dev/null
@@ -0,0 +1,6 @@
+#Wed Oct 15 10:45:44 CEST 2014
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755 (executable)
index 0000000..91a7e26
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644 (file)
index 0000000..aec9973
--- /dev/null
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off\r
+@rem ##########################################################################\r
+@rem\r
+@rem  Gradle startup script for Windows\r
+@rem\r
+@rem ##########################################################################\r
+\r
+@rem Set local scope for the variables with windows NT shell\r
+if "%OS%"=="Windows_NT" setlocal\r
+\r
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r
+set DEFAULT_JVM_OPTS=\r
+\r
+set DIRNAME=%~dp0\r
+if "%DIRNAME%" == "" set DIRNAME=.\r
+set APP_BASE_NAME=%~n0\r
+set APP_HOME=%DIRNAME%\r
+\r
+@rem Find java.exe\r
+if defined JAVA_HOME goto findJavaFromJavaHome\r
+\r
+set JAVA_EXE=java.exe\r
+%JAVA_EXE% -version >NUL 2>&1\r
+if "%ERRORLEVEL%" == "0" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:findJavaFromJavaHome\r
+set JAVA_HOME=%JAVA_HOME:"=%\r
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe\r
+\r
+if exist "%JAVA_EXE%" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:init\r
+@rem Get command-line arguments, handling Windowz variants\r
+\r
+if not "%OS%" == "Windows_NT" goto win9xME_args\r
+if "%@eval[2+2]" == "4" goto 4NT_args\r
+\r
+:win9xME_args\r
+@rem Slurp the command line arguments.\r
+set CMD_LINE_ARGS=\r
+set _SKIP=2\r
+\r
+:win9xME_args_slurp\r
+if "x%~1" == "x" goto execute\r
+\r
+set CMD_LINE_ARGS=%*\r
+goto execute\r
+\r
+:4NT_args\r
+@rem Get arguments from the 4NT Shell from JP Software\r
+set CMD_LINE_ARGS=%$\r
+\r
+:execute\r
+@rem Setup the command line\r
+\r
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar\r
+\r
+@rem Execute Gradle\r
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r
+\r
+:end\r
+@rem End local scope for the variables with windows NT shell\r
+if "%ERRORLEVEL%"=="0" goto mainEnd\r
+\r
+:fail\r
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r
+rem the _cmd.exe /c_ return code!\r
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1\r
+exit /b 1\r
+\r
+:mainEnd\r
+if "%OS%"=="Windows_NT" endlocal\r
+\r
+:omega\r
diff --git a/libs/actionbarsherlock_lib/build.gradle b/libs/actionbarsherlock_lib/build.gradle
new file mode 100644 (file)
index 0000000..58172e2
--- /dev/null
@@ -0,0 +1,2 @@
+configurations.create("default")
+artifacts.add("default", file('library-4.1.0.aar'))
diff --git a/libs/actionbarsherlock_lib/library-4.1.0.aar b/libs/actionbarsherlock_lib/library-4.1.0.aar
new file mode 100644 (file)
index 0000000..f340e01
Binary files /dev/null and b/libs/actionbarsherlock_lib/library-4.1.0.aar differ
diff --git a/oc_jb_workaround/build.gradle b/oc_jb_workaround/build.gradle
new file mode 100644 (file)
index 0000000..882a090
--- /dev/null
@@ -0,0 +1,42 @@
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.13.0'
+    }
+}
+apply plugin: 'com.android.library'
+
+dependencies {
+    compile fileTree(dir: 'libs', include: '*.jar')
+}
+
+android {
+    compileSdkVersion 19
+    buildToolsVersion "20.0.0"
+
+    sourceSets {
+        main {
+            manifest.srcFile 'AndroidManifest.xml'
+            java.srcDirs = ['src']
+            resources.srcDirs = ['src']
+            aidl.srcDirs = ['src']
+            renderscript.srcDirs = ['src']
+            res.srcDirs = ['res']
+            assets.srcDirs = ['assets']
+        }
+
+        // Move the tests to tests/java, tests/res, etc...
+        instrumentTest.setRoot('tests')
+
+        // Move the build types to build-types/<type>
+        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
+        // This moves them out of them default location under src/<type>/... which would
+        // conflict with src/ being used by the main source set.
+        // Adding new build types or product flavors should be accompanied
+        // by a similar customization.
+        debug.setRoot('build-types/debug')
+        release.setRoot('build-types/release')
+    }
+}
diff --git a/oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar b/oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar
new file mode 100644 (file)
index 0000000..8c0fb64
Binary files /dev/null and b/oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/oc_jb_workaround/gradle/wrapper/gradle-wrapper.properties b/oc_jb_workaround/gradle/wrapper/gradle-wrapper.properties
new file mode 100644 (file)
index 0000000..1e61d1f
--- /dev/null
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
diff --git a/oc_jb_workaround/gradlew b/oc_jb_workaround/gradlew
new file mode 100755 (executable)
index 0000000..91a7e26
--- /dev/null
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/oc_jb_workaround/gradlew.bat b/oc_jb_workaround/gradlew.bat
new file mode 100644 (file)
index 0000000..aec9973
--- /dev/null
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off\r
+@rem ##########################################################################\r
+@rem\r
+@rem  Gradle startup script for Windows\r
+@rem\r
+@rem ##########################################################################\r
+\r
+@rem Set local scope for the variables with windows NT shell\r
+if "%OS%"=="Windows_NT" setlocal\r
+\r
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r
+set DEFAULT_JVM_OPTS=\r
+\r
+set DIRNAME=%~dp0\r
+if "%DIRNAME%" == "" set DIRNAME=.\r
+set APP_BASE_NAME=%~n0\r
+set APP_HOME=%DIRNAME%\r
+\r
+@rem Find java.exe\r
+if defined JAVA_HOME goto findJavaFromJavaHome\r
+\r
+set JAVA_EXE=java.exe\r
+%JAVA_EXE% -version >NUL 2>&1\r
+if "%ERRORLEVEL%" == "0" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:findJavaFromJavaHome\r
+set JAVA_HOME=%JAVA_HOME:"=%\r
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe\r
+\r
+if exist "%JAVA_EXE%" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:init\r
+@rem Get command-line arguments, handling Windowz variants\r
+\r
+if not "%OS%" == "Windows_NT" goto win9xME_args\r
+if "%@eval[2+2]" == "4" goto 4NT_args\r
+\r
+:win9xME_args\r
+@rem Slurp the command line arguments.\r
+set CMD_LINE_ARGS=\r
+set _SKIP=2\r
+\r
+:win9xME_args_slurp\r
+if "x%~1" == "x" goto execute\r
+\r
+set CMD_LINE_ARGS=%*\r
+goto execute\r
+\r
+:4NT_args\r
+@rem Get arguments from the 4NT Shell from JP Software\r
+set CMD_LINE_ARGS=%$\r
+\r
+:execute\r
+@rem Setup the command line\r
+\r
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar\r
+\r
+@rem Execute Gradle\r
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r
+\r
+:end\r
+@rem End local scope for the variables with windows NT shell\r
+if "%ERRORLEVEL%"=="0" goto mainEnd\r
+\r
+:fail\r
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r
+rem the _cmd.exe /c_ return code!\r
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1\r
+exit /b 1\r
+\r
+:mainEnd\r
+if "%OS%"=="Windows_NT" endlocal\r
+\r
+:omega\r
index a3ee5ab..4ab1256 100644 (file)
@@ -11,4 +11,4 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 # Project target.
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 # Project target.
-target=android-17
+target=android-19
index 5ebf81e..19d453d 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5ebf81e26ed0827359aa468fb813353656b7cf27
+Subproject commit 19d453dd55233d689754335af641e77087a1c431
diff --git a/pom.xml b/pom.xml
index 15bd0b6..36c5d94 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.owncloud.android</groupId>
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.owncloud.android</groupId>
@@ -13,7 +14,7 @@
         <owncloud.version>1.5.1-SNAPSHOT</owncloud.version>
         <java-version>1.6</java-version>
         <!-- Given by maven-android-sdk-deployer -->
         <owncloud.version>1.5.1-SNAPSHOT</owncloud.version>
         <java-version>1.6</java-version>
         <!-- Given by maven-android-sdk-deployer -->
-        <google.android-version>4.4.2_r2</google.android-version>
+        <google.android-version>4.4.2_r4</google.android-version>
         <!-- Usually the latest Android API -->
         <google.android-api>19</google.android-api>
         <actionbarsherlock-version>4.2.0</actionbarsherlock-version>
         <!-- Usually the latest Android API -->
         <google.android-api>19</google.android-api>
         <actionbarsherlock-version>4.2.0</actionbarsherlock-version>
         <developerConnection>scm:git:git@github.com:owncloud/android.git</developerConnection>
         <url>https://github.com/owncloud/android</url>
     </scm>
         <developerConnection>scm:git:git@github.com:owncloud/android.git</developerConnection>
         <url>https://github.com/owncloud/android</url>
     </scm>
-    
+
+
+    <!--<repositories>-->
+        <!--<repository>-->
+            <!--<id>android-support</id>-->
+            <!--<url>file://${env.ANDROID_HOME}/extras/android/m2repository</url>-->
+        <!--</repository>-->
+    <!--</repositories>-->
+
     <dependencies>
 
     <dependencies>
 
+        <!--<dependency>-->
+            <!--<groupId>com.actionbarsherlock</groupId>-->
+            <!--<artifactId>library</artifactId>-->
+            <!--<version>4.1.0</version>-->
+        <!--</dependency>-->
+
         <dependency>
         <dependency>
-            <groupId>android</groupId>
-            <artifactId>android</artifactId>
-            <version>${google.android-version}</version>
-            <scope>provided</scope>
+            <groupId>com.jakewharton</groupId>
+            <artifactId>disklrucache</artifactId>
+            <version>2.0.2</version>
         </dependency>
 
         <dependency>
         </dependency>
 
         <dependency>
-            <groupId>com.actionbarsherlock</groupId>
-            <artifactId>actionbarsherlock</artifactId>
-            <version>${actionbarsherlock-version}</version>
-            <scope>provided</scope>
+            <groupId>android-support-v4.jar</groupId>
+            <artifactId>android-support-v4.jar</artifactId>
+            <version>1.0</version>
+            <scope>system</scope>
+            <systemPath>${basedir}/third_party/android-support-library/android-support-v4.jar</systemPath>
         </dependency>
 
         </dependency>
 
+
         <dependency>
             <groupId>com.actionbarsherlock</groupId>
         <dependency>
             <groupId>com.actionbarsherlock</groupId>
-            <artifactId>actionbarsherlock</artifactId>
+            <artifactId>library</artifactId>
             <version>${actionbarsherlock-version}</version>
             <type>apklib</type>
         </dependency>
 
             <version>${actionbarsherlock-version}</version>
             <type>apklib</type>
         </dependency>
 
+        <dependency>
+            <groupId>android</groupId>
+            <artifactId>android</artifactId>
+            <version>${google.android-version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!--<dependency>-->
+            <!--<groupId>android.support</groupId>-->
+            <!--<artifactId>compatibility-v4</artifactId>-->
+            <!--<version>19.1.0</version>-->
+        <!--</dependency>-->
+
+
         <!-- MUST BE INSTALLED FIRST: cd owncloud-android-library; mvn install -->
         <dependency>
         <!-- MUST BE INSTALLED FIRST: cd owncloud-android-library; mvn install -->
         <dependency>
-         <groupId>com.owncloud.android</groupId>
-         <artifactId>owncloud-android-library</artifactId>
-         <version>${owncloud.version}</version>
-      </dependency>
+            <groupId>com.owncloud.android</groupId>
+            <artifactId>owncloud-android-library</artifactId>
+            <version>${owncloud.version}</version>
+        </dependency>
 
     </dependencies>
 
 
     </dependencies>
 
@@ -69,7 +99,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.0</version>
+                <version>3.1</version>
                 <configuration>
                     <source>${java-version}</source>
                     <target>${java-version}</target>
                 <configuration>
                     <source>${java-version}</source>
                     <target>${java-version}</target>
             <plugin>
                 <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                 <artifactId>android-maven-plugin</artifactId>
             <plugin>
                 <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                 <artifactId>android-maven-plugin</artifactId>
-                <version>3.8.0</version>
+                <version>3.8.2</version>
                 <configuration>
                     <sdk>
                         <path>${env.ANDROID_HOME}</path>
                 <configuration>
                     <sdk>
                         <path>${env.ANDROID_HOME}</path>
diff --git a/settings.gradle b/settings.gradle
new file mode 100644 (file)
index 0000000..66022f5
--- /dev/null
@@ -0,0 +1,3 @@
+include ':owncloud-android-library'
+include 'libs/actionbarsherlock_lib'
+include ':'
index dc44a12..0781036 100644 (file)
@@ -1,8 +1,59 @@
+@echo off
+
+:: Use argument to decide which build system should be used
+if "%1" == "gradle" goto initForGradle
+if "%1" == "maven" goto initForMaven
+if "%1" == "ant" goto initForAnt
+goto invalidInput
+
+:initForGradle
+echo "Executing Gradle setup..."
+goto initDefault
+
+:initForMaven
+echo "Executing Maven setup..."
+goto initDefault
+
+:initForAnt
+echo "Executing Ant setup..."
+::If the directory exists the script has already been executed
+if not exist .\actionbarsherlock (
+
+    ::Gets the owncloud-android-library
+    call git submodule init
+    call git submodule update
+    
+    ::Clones the actionbarsherlock and checks-out the right release (4.2.0)
+    git clone "https://github.com/JakeWharton/ActionBarSherlock.git" "actionbarsherlock"
+    cd "actionbarsherlock"
+    git checkout "90939dc3925ffaaa0de269bbbe1b35e274968ea1"
+    cd ../
+
+    call android.bat update project -p actionbarsherlock/library -n ActionBarSherlock --target android-19
+    call android.bat update lib-project -p owncloud-android-library
+    call android.bat update project -p .
+    call android.bat update project -p oc_jb_workaround
+    copy /Y third_party\android-support-library\android-support-v4.jar actionbarsherlock\library\libs\android-support-v4.jar
+    call android.bat update test-project -p tests -m ..
+)
+goto complete
+
+:initDefault
 call git submodule init
 call git submodule update
 call git submodule init
 call git submodule update
-call android.bat update project -p actionbarsherlock\library -n ActionBarSherlock
 call android.bat update lib-project -p owncloud-android-library
 call android.bat update project -p .
 call android.bat update project -p oc_jb_workaround
 call android.bat update lib-project -p owncloud-android-library
 call android.bat update project -p .
 call android.bat update project -p oc_jb_workaround
-copy /Y third_party\android-support-library\android-support-v4.jar actionbarsherlock\library\libs\android-support-v4.jar
 call android.bat update test-project -p tests -m ..
 call android.bat update test-project -p tests -m ..
+goto complete
+
+:invalidInput
+echo "Input argument invalid."
+echo "Usage: %0 [ant | maven | gradle]."
+goto exit
+
+:complete
+echo "...setup complete."
+goto exit
+
+:exit
\ No newline at end of file
index e604752..364d273 100755 (executable)
@@ -1,10 +1,75 @@
 #!/bin/bash
 
 #!/bin/bash
 
-git submodule init
-git submodule update
-android update project -p actionbarsherlock/library -n ActionBarSherlock
-android update lib-project -p owncloud-android-library
-android update project -p .
-android update project -p oc_jb_workaround
-cp third_party/android-support-library/android-support-v4.jar actionbarsherlock/library/libs/android-support-v4.jar 
-android update test-project -p tests -m ..
+
+#Repository
+ActionBarSherlockRepo="https://github.com/JakeWharton/ActionBarSherlock.git"
+
+#Directory for actionbarsherlock
+DIRECTORY="actionbarsherlock"
+
+#Commit for version 4.2 of actionbar sherlock
+COMMIT="90939dc3925ffaaa0de269bbbe1b35e274968ea1"
+
+
+function initDefault {
+    git submodule init
+    git submodule update
+    android update lib-project -p owncloud-android-library
+    android update project -p .
+    android update project -p oc_jb_workaround
+    android update test-project -p tests -m ..
+}
+
+function initForAnt {
+    #If the directory exists the script has already been executed
+    if [ ! -d "$DIRECTORY" ]; then
+
+        #Gets the owncloud-android-library
+        git submodule init
+        git submodule update
+
+        #Clones the actionbarsherlock and checks-out the right release (4.2.0)
+        git clone $ActionBarSherlockRepo $DIRECTORY
+        cd $DIRECTORY
+        git checkout $COMMIT
+        cd ../
+
+        #As default it updates the ant scripts
+        android update project -p "$DIRECTORY"/library -n ActionBarSherlock --target android-19
+        android update lib-project -p owncloud-android-library
+        android update project -p .
+        android update project -p oc_jb_workaround
+        cp third_party/android-support-library/android-support-v4.jar actionbarsherlock/library/libs/android-support-v4.jar
+        android update test-project -p tests -m ..
+    fi
+}
+
+#No args
+if [ $# -lt 1 ]; then
+        echo "No args found"
+        echo "Usage : $0 [gradle | maven | ant]"
+        exit
+fi
+
+#checking args
+case "$1" in
+
+    "ant")  
+        echo "Creating Ant environment"
+        initForAnt
+        ;;
+
+    "gradle")  echo  "Creating gradle environment"
+        initDefault
+        ;;
+
+    "maven")  echo  "Creating maven environment"
+        initDefault
+        ;;
+
+    *)  echo "Argument not recognized"
+        echo "Usage : $0 [gradle | maven | ant]"
+       ;;
+esac
+
+exit
index c8c0d24..26c1455 100644 (file)
@@ -1169,7 +1169,7 @@ public class FileDataStorageManager {
                 path = path + FileUtils.PATH_SEPARATOR;
             }           
 
                 path = path + FileUtils.PATH_SEPARATOR;
             }           
 
-            // Update OCFile with data from share: ShareByLink  ¿and publicLink?
+            // Update OCFile with data from share: ShareByLink  and publicLink
             OCFile file = getFileByPath(path);
             if (file != null) {
                 if (share.getShareType().equals(ShareType.PUBLIC_LINK)) {
             OCFile file = getFileByPath(path);
             if (file != null) {
                 if (share.getShareType().equals(ShareType.PUBLIC_LINK)) {
index 896ecca..a85f8d4 100644 (file)
@@ -57,20 +57,20 @@ public class CreateShareOperation extends SyncOperation {
     /**
      * Constructor
      * @param path          Full path of the file/folder being shared. Mandatory argument
     /**
      * Constructor
      * @param path          Full path of the file/folder being shared. Mandatory argument
-     * @param shareType     \910\92 = user, \911\92 = group, \913\92 = Public link. Mandatory argument
+     * @param shareType     0 = user, 1 = group, 3 = Public link. Mandatory argument
      * @param shareWith     User/group ID with who the file should be shared.  This is mandatory for shareType of 0 or 1
      * @param shareWith     User/group ID with who the file should be shared.  This is mandatory for shareType of 0 or 1
-     * @param publicUpload  If \91false\92 (default) public cannot upload to a public shared folder. 
-     *                      If \91true\92 public can upload to a shared folder. Only available for public link shares
+     * @param publicUpload  If false (default) public cannot upload to a public shared folder. 
+     *                      If true public can upload to a shared folder. Only available for public link shares
      * @param password      Password to protect a public link share. Only available for public link shares
      * @param password      Password to protect a public link share. Only available for public link shares
-     * @param permissions   1 - Read only \96 Default for \93public\94 shares
+     * @param permissions   1 - Read only - Default for public shares
      *                      2 - Update
      *                      4 - Create
      *                      8 - Delete
      *                      16- Re-share
      *                      2 - Update
      *                      4 - Create
      *                      8 - Delete
      *                      16- Re-share
-     *                      31- All above \96 Default for \93private\94 shares
+     *                      31- All above - Default for private shares
      *                      For user or group shares.
      *                      To obtain combinations, add the desired values together.  
      *                      For user or group shares.
      *                      To obtain combinations, add the desired values together.  
-     *                      For instance, for \93Re-Share\94\93delete\94\93read\94\93update\94, add 16+8+2+1 = 27.
+     *                      For instance, for Re-Share, delete, read, update, add 16+8+2+1 = 27.
      */
     public CreateShareOperation(String path, ShareType shareType, String shareWith, boolean publicUpload, 
             String password, int permissions, Intent sendIntent) {
      */
     public CreateShareOperation(String path, ShareType shareType, String shareWith, boolean publicUpload, 
             String password, int permissions, Intent sendIntent) {
index 3ffb0a5..9416999 100644 (file)
@@ -45,10 +45,10 @@ public class GetSharesForFileOperation extends SyncOperation {
      * Constructor
      * 
      * @param path      Path to file or folder
      * Constructor
      * 
      * @param path      Path to file or folder
-     * @param reshares  If set to \91false\92 (default), only shares from the current user are returned
-     *                  If set to \91true\92, all shares from the given file are returned
-     * @param subfiles  If set to \91false\92 (default), lists only the folder being shared
-     *                  If set to \91true\92, all shared files within the folder are returned.
+     * @param reshares  If set to false (default), only shares from the current user are returned
+     *                  If set to true, all shares from the given file are returned
+     * @param subfiles  If set to false (default), lists only the folder being shared
+     *                  If set to true, all shared files within the folder are returned.
      */
     public GetSharesForFileOperation(String path, boolean reshares, boolean subfiles) {
         mPath = path;
      */
     public GetSharesForFileOperation(String path, boolean reshares, boolean subfiles) {
         mPath = path;
index 9b141f6..26d8fe4 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="src" path="gen"/>
        <classpathentry combineaccessrules="false" kind="src" path="/owncloud-android"/>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
        <classpathentry combineaccessrules="false" kind="src" path="/owncloud-android"/>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
        <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="gen"/>
        <classpathentry kind="output" path="bin/classes"/>
 </classpath>
        <classpathentry kind="output" path="bin/classes"/>
 </classpath>
index 187bdf4..d0b8535 100644 (file)
Binary files a/third_party/android-support-library/android-support-v4.jar and b/third_party/android-support-library/android-support-v4.jar differ