[IOT-1426] Clean android examples with scons clean option
authorGeorge Nash <george.nash@intel.com>
Fri, 28 Oct 2016 21:59:31 +0000 (14:59 -0700)
committerRick Bell <richard.s.bell@intel.com>
Tue, 1 Nov 2016 18:16:56 +0000 (18:16 +0000)
Change-Id: I29d57c2759d6073c01a9f888b2f7b9930c16590e
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13833
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
android/android_api/SConscript

index 895ebb6..1e507d7 100644 (file)
@@ -94,6 +94,21 @@ cmdBuildApi=jdk_env.Gradle(target="base/objs", source="base/src/main/java/org/io
 
 jdk_env['BUILDERS']['Gradle'] = Builder(action = env.get('ANDROID_GRADLE') + ' build -b' + 'android/examples/build.gradle -DWITH_TRANSPORT_EDR=%s -DWITH_TRANSPORT_BLE=%s -DWITH_TRANSPORT_NFC=%s -PTARGET_ARCH=%s -PRELEASE=%s -PSECURED=%s -DSECURE=%s -PWITH_CLOUD=%s -PRD_MODE=%s -PWITH_MQ_PUB=%s -PWITH_MQ_SUB=%s -PWITH_MQ_BROKER=%s -PWITH_TCP=%s --stacktrace' %(ANDROID_TRANSPORT_EDR, ANDROID_TRANSPORT_BLE, ANDROID_TRANSPORT_NFC, ANDROID_TARGET_ARCH, ANDROID_RELEASE, ANDROID_SECURED, ANDROID_SECURED, ANDROID_CLOUD, ANDROID_RD_MODE, ANDROID_MQ_PUB, ANDROID_MQ_SUB, ANDROID_MQ_BROKER, ANDROID_TCP))
 cmdBuildExamples=jdk_env.Gradle(target="../examples/devicediscoveryclient/apk", source="../examples/devicediscoveryclient/src/main/java/org/iotivity/base/examples/DeviceDiscoveryClient.java")
+# clean up the files built by Gradle builder
+jdk_env.Clean(cmdBuildExamples, '../examples/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/devicediscoveryclient/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/devicediscoveryserver/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/fridgeclient/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/fridgegroupclient/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/fridgegroupserver/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/fridgeserver/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/groupclient/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/groupserver/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/presenceclient/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/presenceserver/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/simpleclient/build')
+jdk_env.Clean(cmdBuildExamples, '../examples/simpleserver/build')
+
 
 # android examples require android api to be built before being invoked
 Depends(cmdBuildExamples, cmdBuildApi)