Skip to content

Commit

Permalink
Updated Java build (non-Android)
Browse files Browse the repository at this point in the history
Generated makefile needs to see a .class file so it doesn't need to build every time make is run
  • Loading branch information
mitza-oci committed Jun 13, 2024
1 parent c1418e1 commit eb6ada1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions java/dds/OpenDDS/DCPS/FakeAndroidNetworkCallback.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
*
*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/

// Empty file to build on non-android platforms
// Empty class to build on non-android platforms

package OpenDDS.DCPS;

public class FakeAndroidNetworkCallback {
}
4 changes: 2 additions & 2 deletions java/dds/dcps_java.mpc
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ project: idl2jni, javah, dcpslib, optional_jni_check, dcps_java_optional, dcps_m
verbatim(gnuace, top, 1) {
android_target_api ?= 0
need_network_callback = $(shell [ $(android_target_api) -ge 24 ] && echo "ok")
opendds_android_network_callback = $(if $(need_network_callback),AndroidNetworkCallback.java,FakeAndroidNetworkCallback.java)
opendds_android_network_callback = $(if $(need_network_callback),AndroidNetworkCallback,FakeAndroidNetworkCallback)
android_jar_file = $(if $(need_network_callback),-classpath $(android_sdk)/platforms/android-$(android_target_api)/android.jar)
}

Java_Files {
conditional(gnuace) {
commandflags += $(android_jar_file)
OpenDDS/DCPS/$(opendds_android_network_callback)
OpenDDS/DCPS/$(opendds_android_network_callback).java
}
}

Expand Down

0 comments on commit eb6ada1

Please sign in to comment.