Skip to content

Add native libs for Android arm64, x86, x86_64 via dockcross#662

Merged
xerial merged 7 commits intoxerial:masterfrom
gotson:android
Sep 20, 2021
Merged

Add native libs for Android arm64, x86, x86_64 via dockcross#662
xerial merged 7 commits intoxerial:masterfrom
gotson:android

Conversation

@gotson
Copy link
Copy Markdown
Collaborator

@gotson gotson commented Sep 12, 2021

This should address #659

Following #659 (comment) I went for a dedicated folder Linux-Android which is IMHO easier to understand than the prefix/suffix notation.

I had to refactor OSInfo to be able to better test it. Static classes are difficult to test, but I also didn't want to change the contract or make it a non-static class.

I am bringing 2 new dependencies, only on the test scope:

  • Mockito, to mock things, which i'm sure will be useful in other places
  • Junit-Pioneer which has useful extensions

I also changed a bit the Makefile.common to make use of some of the Dockcross variables like CROSS_ROOT.

}

@Nested
@SetSystemProperty(key = "java.runtime.name", value = "Java for Android")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I didn't know there is such a feature.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library also has some rules to make it easier to work with stdin and stdout, I might try to refractor some of the existing code at some point.

import java.io.InputStream;
import java.util.concurrent.TimeUnit;

public class ProcessRunner {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@xerial
Copy link
Copy Markdown
Owner

xerial commented Sep 20, 2021

Looks good. Thanks for refactoring and enhancing the Android support!

@xerial xerial merged commit c57be93 into xerial:master Sep 20, 2021
@gotson gotson deleted the android branch September 20, 2021 18:50
Willena added a commit to Willena/sqlite-jdbc-crypt that referenced this pull request Jan 15, 2022
* Tried updating github actions file
* Add CI tests for aarch64 and armv7 (xerial#658)
* multiarch test
* cleanup before PR
* revert file
* fix action version
* update CI badge on README.md (xerial#661)
* Switch to Temurin JDK builds as AdoptJDK has been discontinued (xerial#660)
* Update Eclipse settings to use Java 8 (xerial#664)
* Fix file descriptor (handle) leak when opening database fails (xerial#665)
xerial#431
* Add native libs for Android arm64, x86, x86_64 via dockcross (xerial#662)
* cleanup OSInfo.java with IDE suggestions
* add native build for android aarch64, x86 and x86_64
* add android native builds
* change native lib resolution for Android
* refactor for tests in OSInfo.java
* add missing test scope for mockito dep
* add new targets to native-all
* Use more specific types instead of String when fetching JDBC3ResultSet.getBigDecimal (xerial#666)
* detect musl by checking /proc/self/map_files (xerial#675)
* detect musl by checking /proc/self/map_files
* spotless:apply
* Update src/main/java/org/sqlite/util/OSInfo.java
Co-authored-by: Roman Parshikov <promansew@gmail.com>
* spotless:apply
Co-authored-by: Roman Parshikov <promansew@gmail.com>
* let's start by testsing ;)
* Let's try building natives
* Add missing packages
* Another try
* Maximise build space :)
* in fact might not be needed. Just removing dirs !
* Removed freebsd32 freebsd64 freebsd-arm64 temporarily
* Add missing Linux-aarch64 def
* Updated compile option for Android x86 and Android x64
* Added Package target and build binary zip !
* Now download specific SQLite3MC versions
* Updated existing "quick" tests
* Revert removing dependency in pom.xml
* Fixing build with theses changes ?
* Revert version upgrades in pom.xml
* Fixed CI errors (windows build)
* Small fix for strip
* Moved to curl as it works best
* Removed outdated version of OSInfo.class; Updated Makefile.common to rebuild it if missing.
* Applied spotless fixes
* Upgrade SQLite3MC to 1.3.4 - 3.36.0
* Configured credentials for auto-deploy

Co-authored-by: Gauthier <gotson@users.noreply.github.com>
Co-authored-by: Carl Dea <carl.dea@gmail.com>
Co-authored-by: Taro L. Saito <leo@xerial.org>
Co-authored-by: Andy-2639 <Andy-2639@users.noreply.github.com>
Co-authored-by: Andrey.Tarashevskiy <fantocci@gmail.com>
Co-authored-by: Roman Parshikov <promansew@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants