/*\r
- * //******************************************************************\r
- * //\r
- * // Copyright 2015 Intel Corporation.\r
- * //\r
- * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
- * //\r
- * // Licensed under the Apache License, Version 2.0 (the "License");\r
- * // you may not use this file except in compliance with the License.\r
- * // You may obtain a copy of the License at\r
- * //\r
- * // http://www.apache.org/licenses/LICENSE-2.0\r
- * //\r
- * // Unless required by applicable law or agreed to in writing, software\r
- * // distributed under the License is distributed on an "AS IS" BASIS,\r
- * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * // See the License for the specific language governing permissions and\r
- * // limitations under the License.\r
- * //\r
- * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
+ *******************************************************************\r
+ *\r
+ * Copyright 2015 Intel Corporation.\r
+ *\r
+ *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
*/\r
\r
apply plugin: 'com.android.library'\r
\r
android {\r
- compileSdkVersion 21\r
+ if (WITH_TRANSPORT_BLE == "0") {\r
+ compileSdkVersion 21\r
+ }else{\r
+ compileSdkVersion 22\r
+ }\r
buildToolsVersion "20.0.0"\r
archivesBaseName = "iotivity-base"\r
\r
minSdkVersion 21\r
targetSdkVersion 21\r
versionCode 1\r
- versionName "1.0"\r
+ versionName "1.2.1"\r
+ buildConfigField 'int', 'SECURED', SECURED\r
+ buildConfigField 'int', 'WITH_TCP', WITH_TCP\r
+ buildConfigField 'int', 'WITH_CLOUD', WITH_CLOUD\r
+ buildConfigField "int", 'WITH_MQ_PUB', WITH_MQ_PUB\r
+ buildConfigField "int", 'WITH_MQ_SUB', WITH_MQ_SUB\r
+ buildConfigField "int", 'WITH_MQ_BROKER', WITH_MQ_BROKER\r
+ buildConfigField "String", 'RD_MODE', "\"RD_MODE\""\r
+ buildConfigField "int", 'WITH_TRANSPORT_EDR', WITH_TRANSPORT_EDR\r
+ buildConfigField "int", 'WITH_TRANSPORT_BLE', WITH_TRANSPORT_BLE\r
+ buildConfigField "int", 'WITH_TRANSPORT_NFC', WITH_TRANSPORT_NFC\r
}\r
buildTypes {\r
release {\r
manifest.srcFile 'src/main/AndroidManifest.xml'\r
jniLibs.srcDir 'libs'\r
jni.srcDirs = [] //disable automatic ndk-build call\r
+ java{\r
+ if (WITH_TRANSPORT_EDR == "0") {\r
+ exclude "**/ca/CaBtPairingInterface.java"\r
+ exclude "**/ca/CaEdrInterface.java"\r
+ println 'excluded EDR interface'\r
+ }\r
+ if (WITH_TRANSPORT_BLE == "0") {\r
+ exclude "**/ca/CaLeClientInterface.java"\r
+ exclude "**/ca/CaLeServerInterface.java"\r
+ println 'excluded BLE interface'\r
+ }\r
+ if (WITH_TRANSPORT_NFC == "0") {\r
+ exclude "**/ca/CaNfcInterface.java"\r
+ println 'excluded NFC interface'\r
+ }\r
+ }\r
}\r
}\r
}\r
if (System.env.ANDROID_NDK_HOME != null) {\r
//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"\r
+ 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"\r
} else {\r
println '##################'\r
println 'Skipping NDK build'\r