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
18 changes: 17 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ release:
description: 'Issue has been released'
color: '#ededed'
files:
artifacts:
- path: 'target/{{projectName}}-{{projectVersion}}.jar'
globs:
- pattern: 'target/{{projectName}}-{{projectVersion}}*.jar'
137 changes: 128 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,134 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<!-- Pick the MANIFEST generated by the bundle plugin -->
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
<executions>
<!-- Default JAR with all classes/resources, except Android natives -->
<execution>
<id>default-jar</id>
<phase>package</phase>
<configuration>
<!-- Pick the MANIFEST generated by the bundle plugin -->
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
<excludes>
<exclude>org/sqlite/native/Linux-Android/</exclude>
</excludes>
</configuration>
</execution>
<!-- JAR without native libraries -->
<execution>
<id>without-natives</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>without-natives</classifier>
<!-- Pick the MANIFEST generated by the bundle plugin -->
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
<excludes>
<exclude>org/sqlite/native/</exclude>
</excludes>
</configuration>
</execution>
<!-- JAR with only native libraries, except Android -->
<execution>
<id>natives-all</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>natives-all</classifier>
<excludes>
<exclude>org/sqlite/native/Linux-Android/</exclude>
</excludes>
<includes>
<include>org/sqlite/native/**/*</include>
</includes>
</configuration>
</execution>
<!-- JAR with only native libraries: Android -->
<execution>
<id>natives-android</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>natives-android</classifier>
<includes>
<include>org/sqlite/native/Linux-Android/**/*</include>
</includes>
</configuration>
</execution>
<!-- JAR with only native libraries: Linux -->
<execution>
<id>natives-linux</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>natives-linux</classifier>
<includes>
<include>org/sqlite/native/Linux/**/*</include>
<include>org/sqlite/native/Linux-Musl/**/*</include>
</includes>
</configuration>
</execution>
<!-- JAR with only native libraries: Windows -->
<execution>
<id>natives-windows</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>natives-windows</classifier>
<includes>
<include>org/sqlite/native/Windows/**/*</include>
</includes>
</configuration>
</execution>
<!-- JAR with only native libraries: Mac -->
<execution>
<id>natives-mac</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>natives-mac</classifier>
<includes>
<include>org/sqlite/native/Mac/**/*</include>
</includes>
</configuration>
</execution>
<!-- JAR with only native libraries: FreeBSD -->
<execution>
<id>natives-freebsd</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>natives-freebsd</classifier>
<includes>
<include>org/sqlite/native/FreeBSD/**/*</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
Loading