Compile BundledSQLiteDriver's JNI for Windows
Adds MINGW_X64 as a compilation target for sqlite-bundled. Fixes androidx Gradle logic to find Windows's JNI and refactor the location of the native artifacts to the '/natives/<platform>' folder in the jar (instead of top-level platform folders). Finally, fix a bit NativeLibraryLoader to support Window's '.dll' files.
Bug: 335521661
Test: Validated sqlite-bundled usage in sample JVM app in a Windows host.
Change-Id: I03c10d3437b5d16bcb42520b9f5d0f3807718b23
diff --git a/sqlite/sqlite-bundled/build.gradle b/sqlite/sqlite-bundled/build.gradle
index 8df8903..1f3d1d3 100644
--- a/sqlite/sqlite-bundled/build.gradle
+++ b/sqlite/sqlite-bundled/build.gradle
@@ -106,6 +106,7 @@
KonanTarget.ANDROID_X86,
KonanTarget.MACOS_ARM64,
KonanTarget.MACOS_X64,
+ KonanTarget.MINGW_X64,
KonanTarget.LINUX_X64,
].collect { it.INSTANCE } // Use INSTANCE to get object class instance from kotlin
@@ -144,7 +145,7 @@
)
// Define C++ compilation of JNI
- def jvmArtJniImplementation = createNativeCompilation("jvmArtJniImplementation") {
+ def jvmArtJniImplementation = createNativeCompilation("sqliteJni") {
configureEachTarget { nativeCompilation ->
// add JNI headers as sources
nativeCompilation.addJniHeaders()