Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The release run heads these entries with the version and opens a fresh

## Unreleased

- Android packaging rejects ABI directories missing either native library or
containing empty libraries. JNI jar configuration now requires its actual JDK 17 minimum.

- Java `Measure`, `DrawingPath` and `DrawingTransform` equality now agrees with
hashing for signed zero and is reflexive for NaN, following `Double` semantics.

Expand Down
11 changes: 10 additions & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,21 @@ val checkNative =
dependsOn(buildNative)
val jniLibs = layout.projectDirectory.dir("native/prebuilt/jniLibs").asFile
doLast {
if (jniLibs.list().isNullOrEmpty()) {
val abiDirectories = jniLibs.listFiles()?.filter { it.isDirectory }.orEmpty()
if (abiDirectories.isEmpty()) {
throw GradleException(
"nothing in $jniLibs — run android/build_native.py, " +
"or pass -Podr.abis=<abis> to have the build run it"
)
}
for (directory in abiDirectories) {
for (name in listOf("libodr_jni.so", "libc++_shared.so")) {
val library = directory.resolve(name)
if (!library.isFile || library.length() == 0L) {
throw GradleException("missing or empty native library: $library")
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif ()
# quietly shipping half a package.
option(ODR_JNI_JAR "Build the java half, `odr-core-java.jar`" ON)
if (ODR_JNI_JAR)
find_package(Java 11 REQUIRED COMPONENTS Development)
find_package(Java 17 REQUIRED COMPONENTS Development)
include(UseJava)
endif ()

Expand Down
Loading