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) 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 diff --git a/pom.xml b/pom.xml index d3f59f3b6..c7ef5d4f9 100644 --- a/pom.xml +++ b/pom.xml @@ -138,15 +138,134 @@ 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 + + + + org/sqlite/native/Linux-Android/ + + + + + + without-natives + package + + jar + + + without-natives + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + true + + + + org/sqlite/native/ + + + + + + natives-all + package + + jar + + + natives-all + + org/sqlite/native/Linux-Android/ + + + org/sqlite/native/**/* + + + + + + natives-android + package + + jar + + + natives-android + + org/sqlite/native/Linux-Android/**/* + + + + + + natives-linux + package + + jar + + + natives-linux + + org/sqlite/native/Linux/**/* + org/sqlite/native/Linux-Musl/**/* + + + + + + natives-windows + package + + jar + + + natives-windows + + org/sqlite/native/Windows/**/* + + + + + + natives-mac + package + + jar + + + natives-mac + + org/sqlite/native/Mac/**/* + + + + + + natives-freebsd + package + + jar + + + natives-freebsd + + org/sqlite/native/FreeBSD/**/* + + + +