[gradle] add build of android/{hardware,topology} jars
"./gradlew release" includes these projects, and generates
targetDir/android/android/{hardware,topology}/lib/*.jar, if
ANDROID_SDK_PLATFORM ev is set.
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/31140020
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/31140020
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/31140020
Branch: refs/heads/master
Commit: 311400206ebd6bfbc611371c115d160563e85e12
Parents: fc0093e
Author: Dale LaBossiere <[email protected]>
Authored: Wed Sep 7 10:23:11 2016 -0400
Committer: Dale LaBossiere <[email protected]>
Committed: Wed Sep 7 10:23:11 2016 -0400
----------------------------------------------------------------------
android/hardware/build.gradle | 26 ++++++++++++++++++++++++++
android/topology/build.gradle | 27 +++++++++++++++++++++++++++
settings.gradle | 4 ++++
3 files changed, 57 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/31140020/android/hardware/build.gradle
----------------------------------------------------------------------
diff --git a/android/hardware/build.gradle b/android/hardware/build.gradle
new file mode 100644
index 0000000..75dadec
--- /dev/null
+++ b/android/hardware/build.gradle
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+// NB settings.gradle conditionally includes this project
+// based on System.env.ANDROID_SDK_PLATFORM
+
+dependencies {
+ compile project(':api:topology')
+ compile files("${System.env.ANDROID_SDK_PLATFORM}/android.jar")
+}
+
+test {
+ // this project lacks tests and this task fails if attempted
+ enabled = false
+}
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/31140020/android/topology/build.gradle
----------------------------------------------------------------------
diff --git a/android/topology/build.gradle b/android/topology/build.gradle
new file mode 100644
index 0000000..2d3ece9
--- /dev/null
+++ b/android/topology/build.gradle
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+// NB settings.gradle conditionally includes this project
+// based on System.env.ANDROID_SDK_PLATFORM
+
+dependencies {
+ compile project(':api:topology')
+ compile project(':api:oplet')
+ compile files("${System.env.ANDROID_SDK_PLATFORM}/android.jar")
+}
+
+test {
+ // this project lacks tests and this task fails if attempted
+ enabled = false
+}
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/31140020/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 1a46149..dd78693 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -66,5 +66,9 @@ include 'test:fvtiot'
include 'test:svt'
include 'platform:java7'
include 'platform:android'
+if (System.env.ANDROID_SDK_PLATFORM != null) {
+ include 'android:topology'
+ include 'android:hardware'
+}
rootProject.name = build_name