From ac6a1e35198585b607840dced1280898f035e8b1 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 6 Mar 2026 11:47:31 +0800 Subject: [PATCH 1/6] build classifier jars --- pom.xml | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 164 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index d3f59f3b6..9efe17f99 100644 --- a/pom.xml +++ b/pom.xml @@ -138,15 +138,170 @@ maven-jar-plugin 3.5.0 - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - true - - - + + + + default-jar + package + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + true + + + + + + + without-natives + package + + jar + + + without-natives + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + true + + + + org/sqlite/native/**/* + + + + + + natives-desktop + package + + jar + + + natives-desktop + + **/*.class + **/*.properties + org/sqlite/native/Linux-Android/**/* + + + org/sqlite/native/**/* + + + + + + natives-android + package + + jar + + + natives-android + + **/*.class + **/*.properties + + + org/sqlite/native/Linux-Android/**/* + + + + + + natives-linux + package + + jar + + + natives-linux + + **/*.class + **/*.properties + + + org/sqlite/native/Linux/**/* + + + + + + natives-linux_musl + package + + jar + + + natives-linux_musl + + **/*.class + **/*.properties + + + org/sqlite/native/Linux-Musl/**/* + + + + + + natives-windows + package + + jar + + + natives-windows + + **/*.class + **/*.properties + + + org/sqlite/native/Windows/**/* + + + + + + natives-mac + package + + jar + + + natives-mac + + **/*.class + **/*.properties + + + org/sqlite/native/Mac/**/* + + + + + + natives-freebsd + package + + jar + + + natives-freebsd + + **/*.class + **/*.properties + + + org/sqlite/native/FreeBSD/**/* + + + + From dfc89e472aee7737052332e94da71748b49984d9 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Tue, 17 Mar 2026 15:28:30 +0800 Subject: [PATCH 2/6] adjust jars --- pom.xml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/pom.xml b/pom.xml index 9efe17f99..297a871a0 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ maven-jar-plugin 3.5.0 - + default-jar package @@ -151,6 +151,9 @@ true + + org/sqlite/native/Linux-Android/**/* + @@ -174,9 +177,9 @@ - + - natives-desktop + natives-all package jar @@ -226,23 +229,6 @@ org/sqlite/native/Linux/**/* - - - - - - natives-linux_musl - package - - jar - - - natives-linux_musl - - **/*.class - **/*.properties - - org/sqlite/native/Linux-Musl/**/* From eafb574d7f544fc617e32904a8fcabcc44ade4e7 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 13 Apr 2026 10:36:31 +0800 Subject: [PATCH 3/6] update docs --- README.adoc | 18 +++++++++++++++++- USAGE.md | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 01c326be4..701be1959 100644 --- a/README.adoc +++ b/README.adoc @@ -115,14 +115,30 @@ the following operating systems: |macOS | |✔ | | | |✔ | | |Linux (libc) |✔ |✔ |✔ |✔ |✔ |✔ |✔ |✔ |Linux (musl) |✔ |✔ | | | |✔ | | -|Android (API Level 24+) |✔ |✔ |✔ | | |✔ | | |FreeBSD |✔ |✔ | | | |✔ | | +|link:USAGE.md[Android (API Level 24+)] |✔ |✔ |✔ | | |✔ | | |=== In the other OSs not listed above, the pure-java SQLite is used. (Applies to versions before 3.7.15) If you want to use the native library for your OS, link:./CONTRIBUTING.md[build the source from scratch]. +=== JARs + +Since version `3.53.0.0` multiple JARs are published with different classifiers: + +|=== +|Classifier|Content +|Default jar|Classes + all native libraries (except Android) +|`without-natives`|Classes only +|`natives-all`|Only native libraries (except Android) +|`natives-linux`|Only native libraries for Linux +|`natives-mac`|Only native libraries for Mac +|`natives-windows`|Only native libraries for Windows +|`natives-freebsd`|Only native libraries for FreeBSD +|`natives-android`|Only native libraries for Android +|=== + === GraalVM native-image support Sqlite JDBC supports https://www.graalvm.org/native-image/[GraalVM native-image] out of the box starting from version 3.40.1.0. diff --git a/USAGE.md b/USAGE.md index 06e4c9c5a..241a5ba20 100644 --- a/USAGE.md +++ b/USAGE.md @@ -189,7 +189,7 @@ try (Connection connection = DriverManager.getConnection("jdbc:sqlite::memory:?j Android expects JNI native libraries to be bundled differently than a normal Java application. -You will need to extract the native libraries from our jar (from `org/sqlite/native/Linux-Android`), and place them in the `jniLibs` directory: +You will need to extract the native libraries from our jar with classifier `natives-android` (from `org/sqlite/native/Linux-Android`), and place them in the `jniLibs` directory: ![android-studio-screenshot](./.github/README_IMAGES/android_jnilibs.png) From 30673c89260f620fa5bc912aefddbc1ce40c3e99 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 13 Apr 2026 10:36:40 +0800 Subject: [PATCH 4/6] fix classifier --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 297a871a0..3cc62b8a4 100644 --- a/pom.xml +++ b/pom.xml @@ -185,7 +185,7 @@ jar - natives-desktop + natives-all **/*.class **/*.properties From 9dafa0358d837c28b6ffb11ac20090831efaaf3a Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 13 Apr 2026 10:46:41 +0800 Subject: [PATCH 5/6] adjust include and exclude list --- pom.xml | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/pom.xml b/pom.xml index 3cc62b8a4..c7ef5d4f9 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,7 @@ - org/sqlite/native/Linux-Android/**/* + org/sqlite/native/Linux-Android/ @@ -173,7 +173,7 @@ - org/sqlite/native/**/* + org/sqlite/native/ @@ -187,9 +187,7 @@ natives-all - **/*.class - **/*.properties - org/sqlite/native/Linux-Android/**/* + org/sqlite/native/Linux-Android/ org/sqlite/native/**/* @@ -205,10 +203,6 @@ natives-android - - **/*.class - **/*.properties - org/sqlite/native/Linux-Android/**/* @@ -223,10 +217,6 @@ natives-linux - - **/*.class - **/*.properties - org/sqlite/native/Linux/**/* org/sqlite/native/Linux-Musl/**/* @@ -242,10 +232,6 @@ natives-windows - - **/*.class - **/*.properties - org/sqlite/native/Windows/**/* @@ -260,10 +246,6 @@ natives-mac - - **/*.class - **/*.properties - org/sqlite/native/Mac/**/* @@ -278,10 +260,6 @@ natives-freebsd - - **/*.class - **/*.properties - org/sqlite/native/FreeBSD/**/* From 6e01768805f435d9942c1e3887887a26b767baa2 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Tue, 14 Apr 2026 10:17:37 +0800 Subject: [PATCH 6/6] jreleaser upload all jars --- jreleaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jreleaser.yml b/jreleaser.yml index 88710f7f5..a87744b7b 100644 --- a/jreleaser.yml +++ b/jreleaser.yml @@ -44,5 +44,5 @@ release: description: 'Issue has been released' color: '#ededed' files: - artifacts: - - path: 'target/{{projectName}}-{{projectVersion}}.jar' \ No newline at end of file + globs: + - pattern: 'target/{{projectName}}-{{projectVersion}}*.jar' \ No newline at end of file