initial hackery to build java7 and android - make platform/java7/build.xml sufficiently overridable - add clean to platform/android/build.xml; explicitly omit console things - add missing components to JAVA_SUPPORT.md - fix java7 to include connector/http/ext (needed because java7 includes edgent.connectors.http.jar and is doc'd as supporting it) - add java7,android task to build.gradle
With this commit, "./gradlew release" does seemingly correctly assemble java7 and android in the gradle targetDir. TODO java7,android test TODO building of android/{hardware,topology Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/7b85f486 Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/7b85f486 Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/7b85f486 Branch: refs/heads/master Commit: 7b85f486d38051a222403b26d47ee0118905ed25 Parents: 9924192 Author: Dale LaBossiere <dlab...@us.ibm.com> Authored: Wed Aug 31 15:16:15 2016 -0400 Committer: Dale LaBossiere <dlab...@us.ibm.com> Committed: Wed Aug 31 15:16:15 2016 -0400 ---------------------------------------------------------------------- DEVELOPMENT.md | 4 +-- JAVA_SUPPORT.md | 8 ++++++ platform/android/build.xml | 6 ++++- platform/java7/build.xml | 56 ++++++++++++++++++++++++++++++++++++++--- 4 files changed, 68 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/7b85f486/DEVELOPMENT.md ---------------------------------------------------------------------- diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 70efaea..f89b4e3 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -105,7 +105,7 @@ Running the reports target produces two reports: Work is ongoing to replace the Ant based build system with a Gradle based one [EDGENT-139]. Delivered functionality is expected to work though is not yet -be complete. +complete. **TODO: The primary build process is using Gradle, any pull request is expected to maintain the build success of `clean, assemble, test, reports`.** @@ -130,7 +130,7 @@ unique tasks: * `reports` : Generate JUnit and Code Coverage reports in `build\distributions\reports`. Use after executing the `test` target. * `reports\tests\overview-summary.html` - JUnit test report * `reports\coverage\index.html` - Code coverage report -* `release` : Build a release bundle in `build/release-edgent`, **TODO: that includes subsets of the Edgent jars that run on Java 7 (`build/distributions/java7`) and Android (`build/distributions/android`)**. +* `release` : Build a release bundle in `build/release-edgent`, that includes subsets of the Edgent jars that run on Java 7 (`build/distributions/java7`) and Android (`build/distributions/android`). The build process has been tested on Linux and MacOSX. http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/7b85f486/JAVA_SUPPORT.md ---------------------------------------------------------------------- diff --git a/JAVA_SUPPORT.md b/JAVA_SUPPORT.md index 45aea8d..4434d2a 100644 --- a/JAVA_SUPPORT.md +++ b/JAVA_SUPPORT.md @@ -9,6 +9,11 @@ Building a release `ant release` produces three sets of Jars under * target/java7 - Java 7 SE * target/android - Android +[WIP] Building a release `./gradlew release` produces three sets of Jars under +* build/distributions/java8 - Java 8 SE +* build/distributions/java7 - Java 7 SE +* build/distributions/android - Android + This page documents which jars are expected to work in each environment. ## Core @@ -37,6 +42,8 @@ This page documents which jars are expected to work in each environment. | Jar | Java 8 SE | Java 7 SE | Android | Notes | |---|---|---|---|---| |edgent.connectors.common.jar | yes | yes | yes | | +|edgent.connectors.command.jar | yes | | | | +|edgent.connectors.csv.jar | yes | | | | |edgent.connectors.file.jar | yes | | | | |edgent.connectors.http.jar | yes | yes | yes | | |edgent.connectors.iotf.jar | yes | yes | yes | | @@ -68,6 +75,7 @@ This page documents which jars are expected to work in each environment. | Jar | Java 8 SE | Java 7 SE | Android | Notes | |---|---|---|---|---| |edgent.utils.metrics.jar | yes | | | | +|edgent.utils.streamscope.jar | yes | | | | ### Development Console http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/7b85f486/platform/android/build.xml ---------------------------------------------------------------------- diff --git a/platform/android/build.xml b/platform/android/build.xml index 7e573ce..232308f 100644 --- a/platform/android/build.xml +++ b/platform/android/build.xml @@ -38,7 +38,7 @@ <target name="copyFrom7" depends="init"> <copy todir="${edgent.android.target}"> <fileset dir="${edgent7.target}" - excludes="scripts/** lib/edgent.runtime.jmxcontrol.jar" + excludes="scripts/** lib/edgent.runtime.jmxcontrol.jar lib/edgent.providers.development.jar console/**" /> </copy> @@ -48,4 +48,8 @@ <delete dir="${edgent7.target}/android"/> </target> + <target name="clean"> + <delete dir="${edgent.android.target}"/> + </target> + </project> http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/7b85f486/platform/java7/build.xml ---------------------------------------------------------------------- diff --git a/platform/java7/build.xml b/platform/java7/build.xml index bc818a3..467796e 100644 --- a/platform/java7/build.xml +++ b/platform/java7/build.xml @@ -32,11 +32,19 @@ <property name="output.dir" location="classes.out"/> <property name="test.classes.dir" location="classes.test"/> <property name="ext.dir" location="${edgent}/ext"/> + + <property name="slf4j.version" location="1.7.12"/> + <property name="gson.version" location="2.2.4"/> + <property name="metrics.version" location="3.1.2"/> + + <property name="slf4j.ext.dir" location="slf4j-${slf4j.version}/"/> + <property name="gson.ext.dir" location="google-gson-${gson.version}/"/> + <property name="metrics.ext.dir" location="metrics-${metrics.version}/"/> <path id="edgent.classpath"> - <pathelement location="${ext.dir}/slf4j-1.7.12/slf4j-api-1.7.12.jar"/> - <pathelement location="${ext.dir}/google-gson-2.2.4/gson-2.2.4.jar"/> - <pathelement location="${ext.dir}/metrics-3.1.2/metrics-core-3.1.2.jar"/> + <pathelement location="${ext.dir}/${slf4j.ext.dir}slf4j-api-${slf4j.version}.jar"/> + <pathelement location="${ext.dir}/${gson.ext.dir}gson-${gson.version}.jar"/> + <pathelement location="${ext.dir}/${metrics.ext.dir}metrics-core-${metrics.version}.jar"/> </path> <property name="qcp" refid="edgent.classpath"/> @@ -112,14 +120,26 @@ <retro7 qjar="edgent.runtime.jobregistry.jar" /> <retro7 qjar="edgent.utils.metrics.jar" qdir="utils/metrics/lib" /> + <!-- utils/streamscope - why not java7? --> <retro7 qjar="edgent.providers.direct.jar" /> + <!-- providers/development - why not java7? --> <retro7 qjar="edgent.connectors.common.jar" qdir="connectors/common/lib" /> <retro7 qjar="edgent.connectors.iot.jar" qdir="connectors/iot/lib" /> <retro7 qjar="edgent.connectors.iotp.jar" qdir="connectors/iotp/lib" /> <retro7 qjar="edgent.connectors.http.jar" qdir="connectors/http/lib" /> <retro7 qjar="edgent.connectors.pubsub.jar" qdir="connectors/pubsub/lib" /> + <!-- connectors/command - why not java7? --> + <!-- connectors/csv - why not java7? --> + <!-- connectors/file - why not java7? --> + <!-- connectors/jdbc - why not java7? --> + <!-- connectors/mqtt - why not java7? --> + <!-- connectors/kafka - why not java7? --> + <!-- connectors/wsclient - why not java7? --> + <!-- connectors/javax.websocket-client - why not java7? --> <retro7 qjar="edgent.apps.iot.jar" qdir="apps/iot/lib" /> <retro7 qjar="edgent.apps.runtime.jar" qdir="apps/runtime/lib" /> + <!-- analytics/math3 - why not java7? --> + <!-- analytics/sensors - why not java7? --> <retro7 qjar="edgent.providers.iot.jar" /> <retro7 qjar="edgent.samples.apps.jar" qdir="samples/lib" /> @@ -138,10 +158,16 @@ <copy todir="${edgent7.target}/connectors/iotp/ext"> <fileset dir="${edgent8.target}/connectors/iotp/ext"/> </copy> + <mkdir dir="${edgent7.target}/connectors/http/ext"/> + <copy todir="${edgent7.target}/connectors/http/ext"> + <fileset dir="${edgent8.target}/connectors/http/ext"/> + </copy> + <!-- why mqtt/ext when connectors/mqtt not included above? --> <mkdir dir="${edgent7.target}/connectors/mqtt/ext"/> <copy todir="${edgent7.target}/connectors/mqtt/ext"> <fileset dir="${edgent8.target}/connectors/mqtt/ext"/> </copy> + <!-- why math3/ext when analytics/math3 not included above? --> <mkdir dir="${edgent7.target}/analytics/math3/ext"/> <copy todir="${edgent7.target}/analytics/math3/ext"> <fileset dir="${edgent8.target}/analytics/math3/ext"/> @@ -242,13 +268,25 @@ <retro7.test.setup tdir="runtime/jsoncontrol" /> <retro7.test.setup tdir="runtime/jobregistry" /> <retro7.test.setup tdir="utils/metrics" ldir="utils/metrics/lib"/> + <!-- utils/streamscope - why not java7? --> <retro7.test.setup tdir="providers/direct" /> + <!-- providers/development - why not java7? --> <retro7.test.setup tdir="connectors/common" ldir="connectors/common/lib"/> <retro7.test.setup tdir="connectors/iotp" ldir="connectors/iotp/lib"/> <retro7.test.setup tdir="connectors/http" ldir="connectors/http/lib"/> <retro7.test.setup tdir="connectors/pubsub" ldir="connectors/pubsub/lib"/> + <!-- connectors/command - why not java7? --> + <!-- connectors/csv - why not java7? --> + <!-- connectors/file - why not java7? --> + <!-- connectors/jdbc - why not java7? --> + <!-- connectors/mqtt - why not java7? --> + <!-- connectors/kafka - why not java7? --> + <!-- connectors/wsclient - why not java7? --> + <!-- connectors/javax.websocket-client - why not java7? --> <retro7.test.setup tdir="apps/iot" ldir="apps/iot/lib"/> <retro7.test.setup tdir="apps/runtime" ldir="apps/runtime/lib"/> + <!-- analytics/math3 - why not java7? --> + <!-- analytics/sensors - why not java7? --> </target> <!-- @@ -272,13 +310,25 @@ <retro7.test.run tdir="runtime/jsoncontrol" /> <retro7.test.run tdir="runtime/jobregistry" /> <retro7.test.run tdir="utils/metrics" ldir="utils/metrics/lib"/> + <!-- utils/streamscope - why not java7? --> <retro7.test.run tdir="providers/direct" /> + <!-- providers/development - why not java7? --> <retro7.test.run tdir="connectors/common" ldir="connectors/common/lib"/> <retro7.test.run tdir="connectors/iotp" ldir="connectors/iotp/lib"/> <retro7.test.run tdir="connectors/http" ldir="connectors/http/lib"/> <retro7.test.run tdir="connectors/pubsub" ldir="connectors/pubsub/lib"/> + <!-- connectors/command - why not java7? --> + <!-- connectors/csv - why not java7? --> + <!-- connectors/file - why not java7? --> + <!-- connectors/jdbc - why not java7? --> + <!-- connectors/mqtt - why not java7? --> + <!-- connectors/kafka - why not java7? --> + <!-- connectors/wsclient - why not java7? --> + <!-- connectors/javax.websocket-client - why not java7? --> <retro7.test.run tdir="apps/iot" ldir="apps/iot/lib"/> <retro7.test.run tdir="apps/runtime" ldir="apps/runtime/lib"/> + <!-- analytics/math3 - why not java7? --> + <!-- analytics/sensors - why not java7? --> </target> <target name="clean">