X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=android%2Fandroid_api%2Fbase%2Fbuild.gradle;h=2d8cbcb6dd2dd6c8afd5155ff116e514ef7aee9b;hb=3c093548382bb2542c87a67e6e5fa32552c29cb3;hp=afeb10d07af70be4f33211b3641ccb239c8ed4ca;hpb=66ea6de691f2f58652110c9c9cfc9f46e435f669;p=platform%2Fupstream%2Fiotivity.git diff --git a/android/android_api/base/build.gradle b/android/android_api/base/build.gradle index afeb10d..2d8cbcb 100755 --- a/android/android_api/base/build.gradle +++ b/android/android_api/base/build.gradle @@ -1,37 +1,41 @@ /* - * //****************************************************************** - * // - * // 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. - * // - * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + ******************************************************************* + * + * 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. + * + *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */ apply plugin: 'com.android.library' android { - compileSdkVersion 21 + if (WITH_TRANSPORT_BLE == "0") { + compileSdkVersion 21 + }else{ + compileSdkVersion 22 + } buildToolsVersion "20.0.0" - archivesBaseName = "iotivity" + archivesBaseName = "iotivity-base" libraryVariants.all { variant -> variant.outputs.each { output -> def outputFile = output.outputFile if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${archivesBaseName}-${TARGET_ARCH}-${outputFile.name}" + def fileName = "${archivesBaseName}-${TARGET_ARCH}-${RELEASE}.aar" output.outputFile = new File(outputFile.parent, fileName) } } @@ -41,7 +45,17 @@ android { minSdkVersion 21 targetSdkVersion 21 versionCode 1 - versionName "0.9" + versionName "1.2.1" + buildConfigField 'int', 'SECURED', SECURED + buildConfigField 'int', 'WITH_TCP', WITH_TCP + buildConfigField 'int', 'WITH_CLOUD', WITH_CLOUD + buildConfigField "int", 'WITH_MQ_PUB', WITH_MQ_PUB + buildConfigField "int", 'WITH_MQ_SUB', WITH_MQ_SUB + buildConfigField "int", 'WITH_MQ_BROKER', WITH_MQ_BROKER + buildConfigField "String", 'RD_MODE', "\"RD_MODE\"" + buildConfigField "int", 'WITH_TRANSPORT_EDR', WITH_TRANSPORT_EDR + buildConfigField "int", 'WITH_TRANSPORT_BLE', WITH_TRANSPORT_BLE + buildConfigField "int", 'WITH_TRANSPORT_NFC', WITH_TRANSPORT_NFC } buildTypes { release { @@ -50,7 +64,7 @@ android { } lintOptions { - abortOnError false + abortOnError false } sourceSets { @@ -58,6 +72,22 @@ android { manifest.srcFile 'src/main/AndroidManifest.xml' jniLibs.srcDir 'libs' jni.srcDirs = [] //disable automatic ndk-build call + java{ + if (WITH_TRANSPORT_EDR == "0") { + exclude "**/ca/CaBtPairingInterface.java" + exclude "**/ca/CaEdrInterface.java" + println 'excluded EDR interface' + } + if (WITH_TRANSPORT_BLE == "0") { + exclude "**/ca/CaLeClientInterface.java" + exclude "**/ca/CaLeServerInterface.java" + println 'excluded BLE interface' + } + if (WITH_TRANSPORT_NFC == "0") { + exclude "**/ca/CaNfcInterface.java" + println 'excluded NFC interface' + } + } } } } @@ -93,8 +123,8 @@ task buildNative(type: Exec) { if (System.env.ANDROID_NDK_HOME != null) { //for windows use 'ndk-build.cmd' //def ndkBuild = new File(System.env.ANDROID_NDK_HOME, 'ndk-build.cmd') - def ndkBuild = new File(System.env.ANDROID_NDK_HOME, 'ndk-build') - commandLine ndkBuild, "APP_ABI=$TARGET_ARCH", "APP_OPTIM=$RELEASE", "SECURE=$SECURED" + def ndkBuild = new File(System.env.ANDROID_NDK_HOME, 'ndk-build') + commandLine ndkBuild, "APP_ABI=$TARGET_ARCH", "APP_OPTIM=$RELEASE", "SECURE=$SECURED", "WITH_CLOUD=$WITH_CLOUD", "RD_MODE=$RD_MODE", "WITH_MQ_PUB=$WITH_MQ_PUB", "WITH_MQ_SUB=$WITH_MQ_SUB", "WITH_MQ_BROKER=$WITH_MQ_BROKER", "WITH_TCP=$WITH_TCP" } else { println '##################' println 'Skipping NDK build' @@ -102,14 +132,3 @@ task buildNative(type: Exec) { println '##################' } } -// -//task (copyARR, type: Copy) { -// copy { -// from 'build/outputs/aar/' -// into '../../../out/android/' -// include '**/*.aar' -// } -//} -//build.finalizedBy(copyARR) - -