Added APK generation to build scripts
authorRahul Rahul <rahul.rahul@intel.com>
Fri, 25 Sep 2015 16:58:50 +0000 (09:58 -0700)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Tue, 29 Sep 2015 16:01:06 +0000 (16:01 +0000)
Updated android_api SConscript and Gradle files to generate
the APK of android examples with the existing scons command.
If trying to build examples from android studio, the user might
need to update the default TARGET_ARCH, RELEASE and SECURED flags
in <iotivity>/android/examples/gradle.properties

Updated the gradle versions to 1.3.0 in all gradle files.

Change-Id: Id9da3594ac83a4d27b3b1272a5aef6d893b305f9
Signed-off-by: Rahul Rahul <rahul.rahul@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3135
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Tim Kourt <tim.a.kourt@intel.com>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
21 files changed:
android/android_api/SConscript
android/android_api/android_api.iml
android/android_api/base/build.gradle
android/android_api/build.gradle
android/examples/build.gradle
android/examples/devicediscoveryclient/build.gradle
android/examples/devicediscoveryserver/build.gradle
android/examples/fridgeclient/build.gradle
android/examples/fridgeserver/build.gradle
android/examples/gradle.properties [new file with mode: 0644]
android/examples/groupclient/build.gradle
android/examples/groupserver/build.gradle
android/examples/guiclient/build.gradle
android/examples/message/build.gradle
android/examples/presenceclient/build.gradle
android/examples/presenceserver/build.gradle
android/examples/provisioningclient/build.gradle
android/examples/settings.gradle
android/examples/simpleclient/build.gradle
android/examples/simpleserver/build.gradle
resource/csdk/connectivity/samples/android/casample/build.gradle

index 0f27318..5dfe91d 100644 (file)
@@ -46,7 +46,60 @@ if not os.path.exists(android_home + '/platforms/android-21') or not os.path.exi
 def ensure_libs(target, source, env):
     return target, [source, env.get('BUILD_DIR') + 'liboc.so', env.get('BUILD_DIR') + 'liboc_logger.so']
 
+# build android_api
 jdk_env = Environment(ENV=os.environ)
-jdk_env['BUILDERS']['Gradle'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + os.getcwd()+'/build.gradle -PSECURED=%s -PTARGET_ARCH=%s -PRELEASE=%s --stacktrace' %(ANDROID_SECURED, ANDROID_TARGET_ARCH, ANDROID_RELEASE), emitter = ensure_libs)
+jdk_env['BUILDERS']['Gradle'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + os.getcwd()+'/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED), emitter = ensure_libs)
 jdk_env['BUILD_DIR'] = env.get('BUILD_DIR')
-jdk_env.Gradle(target="base/objs", source="base/src/main/java/org/iotivity/base/OcResource.java")
+cmdBuildApi=jdk_env.Gradle(target="base/objs", source="base/src/main/java/org/iotivity/base/OcResource.java")
+
+# build examples only once - this is to reduce build time on the Jenkins server
+if not os.path.exists(os.getcwd()+'../examples/devicediscoveryserver/build/outputs/apk'):
+    jdk_env1 = Environment(ENV=os.environ)
+    jdk_env1['BUILD_DIR'] = env.get('BUILD_DIR')
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/devicediscoveryclient/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd1=jdk_env1.Gradle1(target="../examples/devicediscoveryclient/apk", source="../examples/devicediscoveryclient/src/main/java/org/iotivity/base/examples/DeviceDiscoveryClient.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/devicediscoveryserver/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd2=jdk_env1.Gradle1(target="../examples/devicediscoveryserver/apk", source="../examples/devicediscoveryserver/src/main/java/org/iotivity/base/examples/DeviceDiscoveryServer.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/presenceclient/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd3=jdk_env1.Gradle1(target="../examples/presenceclient/apk", source="../examples/presenceclient/src/main/java/org/iotivity/base/examples/PresenceClient.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/presenceserver/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd4=jdk_env1.Gradle1(target="../examples/presenceserver/apk", source="../examples/presenceserver/src/main/java/org/iotivity/base/examples/PresenceServer.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/provisioningclient/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd5=jdk_env1.Gradle1(target="../examples/provisioningclient/apk", source="../examples/provisioningclient/src/main/java/org/iotivity/base/examples/provisioningclient/ProvisioningClient.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/groupclient/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd6=jdk_env1.Gradle1(target="../examples/groupclient/apk", source="../examples/groupclient/src/main/java/org/iotivity/base/examples/GroupClient.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/groupserver/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd7=jdk_env1.Gradle1(target="../examples/groupserver/apk", source="../examples/groupserver/src/main/java/org/iotivity/base/examples/GroupServer.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/simpleclient/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd8=jdk_env1.Gradle1(target="../examples/simpleclient/apk", source="../examples/simpleclient/src/main/java/org/iotivity/base/examples/SimpleClient.java")
+
+    jdk_env1['BUILDERS']['Gradle1'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/simpleserver/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED),
+    emitter = ensure_libs)
+    cmd9=jdk_env1.Gradle1(target="../examples/simpleserver/apk", source="../examples/simpleserver/src/main/java/org/iotivity/base/examples/SimpleServer.java")
+
+    # android examples require android api to be built before being invoked
+    Depends(cmd1, cmdBuildApi)
+    Depends(cmd2, cmdBuildApi)
+    Depends(cmd3, cmdBuildApi)
+    Depends(cmd4, cmdBuildApi)
+    Depends(cmd5, cmdBuildApi)
+    Depends(cmd6, cmdBuildApi)
+    Depends(cmd7, cmdBuildApi)
+    Depends(cmd8, cmdBuildApi)
+    Depends(cmd9, cmdBuildApi)
index 05c634c..108b2a4 100644 (file)
@@ -7,6 +7,16 @@
         <option name="BUILDABLE" value="false" />
       </configuration>
     </facet>
+    <facet type="android-gradle" name="Android-Gradle">
+      <configuration>
+        <option name="GRADLE_PROJECT_PATH" value=":" />
+      </configuration>
+    </facet>
+    <facet type="android" name="Android">
+      <configuration>
+        <option name="ALLOW_USER_CONFIGURATION" value="false" />
+      </configuration>
+    </facet>
   </component>
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
index afeb10d..b4286f3 100755 (executable)
@@ -31,7 +31,7 @@ android {
         variant.outputs.each { output ->\r
             def outputFile = output.outputFile\r
             if (outputFile != null && outputFile.name.endsWith('.aar')) {\r
-                def fileName = "${archivesBaseName}-${TARGET_ARCH}-${outputFile.name}"\r
+                def fileName = "${archivesBaseName}-base-${TARGET_ARCH}-${RELEASE}.aar"\r
                 output.outputFile = new File(outputFile.parent, fileName)\r
             }\r
         }\r
@@ -41,7 +41,7 @@ android {
         minSdkVersion 21\r
         targetSdkVersion 21\r
         versionCode 1\r
-        versionName "0.9"\r
+        versionName "1.0"\r
     }\r
     buildTypes {\r
         release {\r
@@ -50,7 +50,7 @@ android {
     }\r
 \r
     lintOptions {\r
-       abortOnError false\r
+        abortOnError false\r
     }\r
 \r
     sourceSets {\r
@@ -80,7 +80,14 @@ task copyNativeLibs(type: Copy, dependsOn: 'buildNative') {
     into new File(buildDir, 'native-libs')\r
 }\r
 \r
+task copyToJniLibs(type: Copy, dependsOn: 'buildNative') {\r
+    dependsOn 'buildNative'\r
+    from(new File('obj/local')) { include '**/*.so' }\r
+    into new File(buildDir, 'jniLibs')\r
+}\r
+\r
 tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn copyNativeLibs }\r
+tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn copyToJniLibs }\r
 \r
 clean.dependsOn 'cleanCopyNativeLibs'\r
 \r
@@ -94,22 +101,11 @@ task buildNative(type: Exec) {
         //for windows use 'ndk-build.cmd'\r
         //def ndkBuild = new File(System.env.ANDROID_NDK_HOME, 'ndk-build.cmd')\r
         def ndkBuild = new File(System.env.ANDROID_NDK_HOME, 'ndk-build')\r
-        commandLine ndkBuild, "APP_ABI=$TARGET_ARCH", "APP_OPTIM=$RELEASE", "SECURE=$SECURED"
+        commandLine ndkBuild, "APP_ABI=$TARGET_ARCH", "APP_OPTIM=$RELEASE", "SECURE=$SECURED"\r
     } else {\r
         println '##################'\r
         println 'Skipping NDK build'\r
         println 'Reason: ANDROID_NDK_HOME not set.'\r
         println '##################'\r
     }\r
-}\r
-//\r
-//task (copyARR, type: Copy) {\r
-//    copy {\r
-//        from 'build/outputs/aar/'\r
-//        into '../../../out/android/'\r
-//        include '**/*.aar'\r
-//    }\r
-//}\r
-//build.finalizedBy(copyARR)\r
-\r
-\r
+}
\ No newline at end of file
index 478166f..b8a6bed 100755 (executable)
@@ -27,7 +27,7 @@ buildscript {
         jcenter()\r
     }\r
     dependencies {\r
-        classpath 'com.android.tools.build:gradle:1.0.0'\r
+        classpath 'com.android.tools.build:gradle:1.3.0'\r
 \r
         // NOTE: Do not place your application dependencies here; they belong\r
         // in the individual module build.gradle files\r
index 50e899c..92e4303 100755 (executable)
@@ -5,7 +5,7 @@ buildscript {
         jcenter()\r
     }\r
     dependencies {\r
-        classpath 'com.android.tools.build:gradle:1.0.0'\r
+        classpath 'com.android.tools.build:gradle:1.3.0'\r
 \r
         // NOTE: Do not place your application dependencies here; they belong\r
         // in the individual module build.gradle files\r
index 0f56669..a7dd445 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.devicediscoveryclient"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index 7b7bd0d..788038d 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.devicediscoveryserver"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index 975453f..740c852 100755 (executable)
@@ -1,26 +1,37 @@
-apply plugin: 'com.android.application'\r
-\r
-android {\r
-    compileSdkVersion 21\r
-    buildToolsVersion "21.1.2"\r
-\r
-    defaultConfig {\r
-        applicationId "org.iotivity.base.examples.fridgeclient"\r
-        minSdkVersion 19\r
-        targetSdkVersion 21\r
-        versionCode 1\r
-        versionName "1.0"\r
-    }\r
-    buildTypes {\r
-        release {\r
-            minifyEnabled false\r
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
-        }\r
-    }\r
-}\r
-\r
-dependencies {\r
-    compile fileTree(dir: 'libs', include: ['*.jar'])\r
-    compile 'com.android.support:appcompat-v7:21.0.3'\r
-    compile project(':message')\r
-}\r
+//apply plugin: 'com.android.application'\r
+//\r
+//android {\r
+//    compileSdkVersion 21\r
+//    buildToolsVersion "20.0.0"\r
+//\r
+//    defaultConfig {\r
+//        applicationId "org.iotivity.base.examples.fridgeclient"\r
+//        minSdkVersion 21\r
+//        targetSdkVersion 21\r
+//        versionCode 1\r
+//        versionName "1.0"\r
+//    }\r
+//    buildTypes {\r
+//        release {\r
+//            minifyEnabled false\r
+//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
+//        }\r
+//    }\r
+//    lintOptions {\r
+//        abortOnError false\r
+//    }\r
+//}\r
+//repositories {\r
+//    flatDir {\r
+//        dirs "../../android_api/base/build/outputs/aar/"\r
+//    }\r
+//}\r
+//\r
+//try {\r
+//    dependencies {\r
+//        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"\r
+//    }\r
+//} catch (all) {\r
+//    print "${ERROR_MSG}"\r
+//    assert all\r
+//}
\ No newline at end of file
index b7327b6..0fbc5ca 100755 (executable)
@@ -1,26 +1,37 @@
-apply plugin: 'com.android.application'\r
-\r
-android {\r
-    compileSdkVersion 21\r
-    buildToolsVersion "21.1.2"\r
-\r
-    defaultConfig {\r
-        applicationId "org.iotivity.base.examples.fridgeserver"\r
-        minSdkVersion 19\r
-        targetSdkVersion 21\r
-        versionCode 1\r
-        versionName "1.0"\r
-    }\r
-    buildTypes {\r
-        release {\r
-            minifyEnabled false\r
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
-        }\r
-    }\r
-}\r
-\r
-dependencies {\r
-    compile fileTree(dir: 'libs', include: ['*.jar'])\r
-    compile 'com.android.support:appcompat-v7:21.0.3'\r
-    compile project(':message')\r
-}\r
+//apply plugin: 'com.android.application'\r
+//\r
+//android {\r
+//    compileSdkVersion 21\r
+//    buildToolsVersion "20.0.0"\r
+//\r
+//    defaultConfig {\r
+//        applicationId "org.iotivity.base.examples.fridgeserver"\r
+//        minSdkVersion 21\r
+//        targetSdkVersion 21\r
+//        versionCode 1\r
+//        versionName "1.0"\r
+//    }\r
+//    buildTypes {\r
+//        release {\r
+//            minifyEnabled false\r
+//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
+//        }\r
+//    }\r
+//    lintOptions {\r
+//        abortOnError false\r
+//    }\r
+//}\r
+//repositories {\r
+//    flatDir {\r
+//        dirs "../../android_api/base/build/outputs/aar/"\r
+//    }\r
+//}\r
+//\r
+//try {\r
+//    dependencies {\r
+//        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"\r
+//    }\r
+//} catch (all) {\r
+//    print "${ERROR_MSG}"\r
+//    assert all\r
+//}
\ No newline at end of file
diff --git a/android/examples/gradle.properties b/android/examples/gradle.properties
new file mode 100644 (file)
index 0000000..ee503bb
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# //******************************************************************
+# //
+# // Copyright 2015 Intel Corporation.
+# //
+# //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+# //
+# // Licensed under the Apache License, Version 2.0 (the "License");
+# // you may not use this file except in compliance with the License.
+# // You may obtain a copy of the License at
+# //
+# //      http://www.apache.org/licenses/LICENSE-2.0
+# //
+# // Unless required by applicable law or agreed to in writing, software
+# // distributed under the License is distributed on an "AS IS" BASIS,
+# // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# // See the License for the specific language governing permissions and
+# // limitations under the License.
+# //
+# //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#
+
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+TARGET_ARCH="armeabi"
+RELEASE="release"
+SECURED="1"
+ERROR_MSG="if building examples from android-studio, you might need to modify the default TARGET_ARCH\
+   and RELEASE in <iotivity>/android/examples/gradle.properties,\
+   if your aar file has different values for TARGET_ARCH and RELEASE"
+
index b1653de..f124840 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.groupclient"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index 209149f..0e83140 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.groupserver"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index d1326c9..9aec23e 100644 (file)
@@ -1,25 +1,25 @@
-apply plugin: 'com.android.application'\r
-\r
-android {\r
-    compileSdkVersion 21\r
-    buildToolsVersion "21.1.1"\r
-\r
-    defaultConfig {\r
-        applicationId "org.iotivity.guiclient"\r
-        minSdkVersion 19\r
-        targetSdkVersion 21\r
-        versionCode 1\r
-        versionName "1.0"\r
-    }\r
-    buildTypes {\r
-        release {\r
-            minifyEnabled false\r
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
-        }\r
-    }\r
-}\r
-\r
-dependencies {\r
-    compile fileTree(dir: 'libs', include: ['*.jar'])\r
-    compile 'com.android.support:appcompat-v7:21.0.2'\r
-}\r
+//apply plugin: 'com.android.application'\r
+//\r
+//android {\r
+//    compileSdkVersion 21\r
+//    buildToolsVersion "21.1.1"\r
+//\r
+//    defaultConfig {\r
+//        applicationId "org.iotivity.guiclient"\r
+//        minSdkVersion 19\r
+//        targetSdkVersion 21\r
+//        versionCode 1\r
+//        versionName "1.0"\r
+//    }\r
+//    buildTypes {\r
+//        release {\r
+//            minifyEnabled false\r
+//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
+//        }\r
+//    }\r
+//}\r
+//\r
+//dependencies {\r
+//    compile fileTree(dir: 'libs', include: ['*.jar'])\r
+//    compile 'com.android.support:appcompat-v7:21.0.2'\r
+//}\r
index 1ed1a39..70c59e6 100755 (executable)
@@ -1,24 +1,24 @@
-apply plugin: 'com.android.library'\r
-\r
-android {\r
-    compileSdkVersion 21\r
-    buildToolsVersion "21.1.2"\r
-\r
-    defaultConfig {\r
-        minSdkVersion 19\r
-        targetSdkVersion 21\r
-        versionCode 1\r
-        versionName "1.0"\r
-    }\r
-    buildTypes {\r
-        release {\r
-            minifyEnabled false\r
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
-        }\r
-    }\r
-}\r
-\r
-dependencies {\r
-    compile fileTree(dir: 'libs', include: ['*.jar'])\r
-    compile 'com.android.support:appcompat-v7:21.0.3'\r
-}\r
+//apply plugin: 'com.android.library'\r
+//\r
+//android {\r
+//    compileSdkVersion 21\r
+//    buildToolsVersion "21.1.2"\r
+//\r
+//    defaultConfig {\r
+//        minSdkVersion 19\r
+//        targetSdkVersion 21\r
+//        versionCode 1\r
+//        versionName "1.0"\r
+//    }\r
+//    buildTypes {\r
+//        release {\r
+//            minifyEnabled false\r
+//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
+//        }\r
+//    }\r
+//}\r
+//\r
+//dependencies {\r
+//    compile fileTree(dir: 'libs', include: ['*.jar'])\r
+//    compile 'com.android.support:appcompat-v7:21.0.3'\r
+//}\r
index c7e2a4f..dc6b0d5 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.presenceclient"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index 5270f78..fdee272 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.presenceserver"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index 252b151..6517346 100644 (file)
@@ -2,11 +2,11 @@ apply plugin: 'com.android.application'
 \r
 android {\r
     compileSdkVersion 21\r
-    buildToolsVersion "21.1.2"\r
+    buildToolsVersion "20.0.0"\r
 \r
     defaultConfig {\r
         applicationId "org.iotivity.base.examples.provisioningclient"\r
-        minSdkVersion 19\r
+        minSdkVersion 21\r
         targetSdkVersion 21\r
         versionCode 1\r
         versionName "1.0"\r
@@ -17,8 +17,22 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\r
         }\r
     }\r
+    lintOptions {\r
+        abortOnError false\r
+    }\r
+}\r
+repositories {\r
+    flatDir {\r
+        dirs "../../android_api/base/build/outputs/aar/"\r
+    }\r
 }\r
 \r
-dependencies {\r
-    compile 'com.android.support:appcompat-v7:21.0.3'\r
+try {\r
+    dependencies {\r
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"\r
+    }\r
+} catch (all) {\r
+    print "${ERROR_MSG}"\r
+    assert all\r
 }\r
+\r
index 5b4d254..be1cea7 100755 (executable)
@@ -1 +1 @@
-include ':simpleserver', ':simpleclient', ':message', ':fridgeserver', ':fridgeclient', ':guiclient', ':provisioningclient', ':presenceserver', ':presenceclient', ':devicediscoveryclient', ':devicediscoveryserver', ':iotivity-armeabi-base-debug'
+include ':simpleserver', ':simpleclient', ':message', ':fridgeserver', ':fridgeclient', ':guiclient', ':provisioningclient', ':presenceserver', ':presenceclient', ':devicediscoveryclient', ':devicediscoveryserver', ':groupclient', ':groupserver'
index 410756c..f105e1a 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.simpleclient"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index a7d76f8..81bdc88 100644 (file)
@@ -1,13 +1,13 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 22
-    buildToolsVersion "22.0.1"
+    compileSdkVersion 21
+    buildToolsVersion "20.0.0"
 
     defaultConfig {
         applicationId "org.iotivity.base.examples.simpleserver"
         minSdkVersion 21
-        targetSdkVersion 22
+        targetSdkVersion 21
         versionCode 1
         versionName "1.0"
     }
@@ -17,8 +17,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
+    lintOptions {
+        abortOnError false
+    }
+}
+repositories {
+    flatDir {
+        dirs "../../android_api/base/build/outputs/aar/"
+    }
 }
 
-dependencies {
-    compile fileTree(dir: 'libs', include: ['*.jar'])
+try {
+    dependencies {
+        compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
+    }
+} catch (all) {
+    print "${ERROR_MSG}"
+    assert all
 }
index 4035fa8..2712137 100755 (executable)
@@ -7,7 +7,7 @@ buildscript {
                }
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:1.1.0'
+        classpath 'com.android.tools.build:gradle:1.3.0'
     }
 }