Android building execute on notification SConscript.
And bug for build fail is fixed.
Change-Id: I6fad802576f34c32f5b2a36e3af23e2a89af2d65
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12627
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
# Go to build c++ wrapper
SConscript('cpp-wrapper/SConscript')
+
+if target_os == 'android':
+ SConscript('android/SConscript')
return target, [source, env.get('BUILD_DIR') + 'liboc.so',
env.get('BUILD_DIR') + 'liboc_logger.so',
env.get('BUILD_DIR') + 'libnotification_provider_wrapper.so',
- env.get('BUILD_DIR') + 'libnotification_consumer.so']
+ env.get('BUILD_DIR') + 'libnotification_consumer_wrapper.so']
jdk_env = Environment(ENV=os.environ)
' build -bservice/notification/android/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE),
emitter = ensure_libs)
jdk_env['BUILD_DIR'] = env.get('BUILD_DIR')
-jdk_env.Gradle(target="notification-service/objs",
+cmdBuildNotification = jdk_env.Gradle(target="notification-service/objs",
source="notification-service/src/main/java/org/iotivity/service/ns/consumer/ConsumerService.java")
+
+Depends(cmdBuildNotification, env.get('baseAAR'))
+
+env.AppendUnique(notificationAAR = cmdBuildNotification)
versionCode 1
versionName "1.0"
}
+ repositories {
+ flatDir {
+ dirs '../../../../android/android_api/base/build/outputs/aar'
+ }
+ }
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
-
+ compile ":iotivity-base-${TARGET_ARCH}-${RELEASE}@aar"
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.0'
androidTestCompile 'com.google.dexmaker:dexmaker:1.0'
androidTestCompile 'org.mockito:mockito-core:1.10.19'
mTopic = topic;
}
- public void setExtraInfo(OCRepresentation extraInfo)
+ public void setExtraInfo(OcRepresentation extraInfo)
{
mExtraInfo = extraInfo;
}
LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libnotification_consumer_wrapper.so
include $(PREBUILT_SHARED_LIBRARY)
+include $(CLEAR_VARS)
+OIC_LIB_PATH := $(ROOT_PATH)/android/android_api/base/libs/$(TARGET_ARCH_ABI)
+LOCAL_MODULE := android-ocstack
+LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libocstack-jni.so
+include $(PREBUILT_SHARED_LIBRARY)
+
include $(CLEAR_VARS)
LOCAL_MODULE := notification_consumer_jni
LOCAL_CPPFLAGS := -std=c++0x -frtti -fexceptions
LOCAL_SHARED_LIBRARIES += oc_logger
LOCAL_SHARED_LIBRARIES += octbstack
LOCAL_SHARED_LIBRARIES += oc
-LOCAL_SHARED_LIBRARIES += ocstack-jni
+LOCAL_SHARED_LIBRARIES += android-ocstack
+LOCAL_SHARED_LIBRARIES += notification_consumer
LOCAL_SHARED_LIBRARIES += notification_consumer_wrapper
OIC_SRC_DIR := ../../../../../..
LOCAL_SHARED_LIBRARIES += oc_logger
LOCAL_SHARED_LIBRARIES += octbstack
LOCAL_SHARED_LIBRARIES += oc
-LOCAL_SHARED_LIBRARIES += ocstack-jni
+LOCAL_SHARED_LIBRARIES += android-ocstack
LOCAL_SHARED_LIBRARIES += notification_provider
LOCAL_SHARED_LIBRARIES += notification_provider_wrapper