https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
c

Colton Idle

12/15/2023, 12:20 AM
Possible to use a JdbcSqliteDriver with a specific version of sqlite?
j

jw

12/15/2023, 12:22 AM
Yes. Specify the xenial sqlite dependency yourself with force=true, or use a resolution strategy to force the version
Curious why you'd need this, though. For downgrade support?
c

Colton Idle

12/15/2023, 12:31 AM
Interesting. Can't setForce to true.
And yep. Doing some downgrade stuff
Anyone have ideas why I get No native library is found for aarch64 After adding testImplementation('org.xerial:sqlite-jdbc') { // Override the version of sqlite used by sqlite-driver to match Android API 23 version { strictly('3.8.10.2') } }
j

jw

12/15/2023, 1:05 AM
They probably didn't build ARM binaries way back then
ARM Macs didn't exist!
c

Colton Idle

12/15/2023, 1:05 AM
Good point. Any workaround you can think of?
j

jw

12/15/2023, 1:11 AM
Not really. You could build it yourself I guess and then drop it in src/main/resources or wherever it looks
👍 1
c

Colton Idle

12/15/2023, 1:15 AM
Cool. I was able to get the jar of it. Will try to figure out where to actually put it. Does not like sec/main/resources
j

jw

12/15/2023, 1:16 AM
Look in the jar where it packages the native libs
Then emulate that folder structure with an ARM build of its JNI library
🤯 1
For that version
c

Colton Idle

12/15/2023, 1:17 AM
Alright. Some of that went over my head but I'll give it a shot. Thanks
j

jw

12/15/2023, 1:18 AM
The xenial project builds a native library which has the sqlite library plus the JNI bindings it binds to
You need to go back to the version you want and build it yourself for ARM
Then you're going to take that binary and put it in src/main/resources under the same folder structure that it uses inside the jar, except for aarch64 instead of like x86_64 or whatever is in there now for macs
c

Colton Idle

12/15/2023, 1:28 AM
Alright. That made a bit more sense to me. I'm going to give it a whirl
Making seems to be straightforward actually, but can't find a resulting jar. Hrrrrrrm
alright. so it def generates a directory that matches up with platform-abi. but no jar. wonder if im supposed to compress that directory and make the jar myself. lol
fwiw. i was able to build the native pieces of it. seems like i still need to use maven to package things up, but i wasn't able to figure that out in time when i realized that i also didn't have to go this route. so if anyone stumbles upon this. thats where i left off