Skip to content

Commit

Permalink
Fix building on JitPack
Browse files Browse the repository at this point in the history
They doesn't have latest CMake installed by default.
But to install it, we need to use sdkmanager which
doesn't support Java 11. So we must first use Java 8,
download cmake, then install and use Java 11.

Alternatively we can forget about installing newer CMake
as compilation works also with older version, but there
are warnings that NDK needs newer CMake. And we would also
have to remove the required CMake version from build.gradle.

Also we must ignore :sample project when building on JitPack
as it breaks build too.
  • Loading branch information
Robyer committed Oct 22, 2022
1 parent 3c98a32 commit 52e2060
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# NOTE: sdkmanager doesn't support Java 11, so we must run it with Java 8, and enable Java 11 afterwards
jdk:
- openjdk11
- openjdk8
# - openjdk11
before_install:
- yes | sdkmanager "cmake;3.22.1"
- sdk install java 11.0.2-open
- sdk use java 11.0.2-open
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include ':tesseract4android'
include ':sample'
if (!System.env.JITPACK) {
include ':sample'
}

0 comments on commit 52e2060

Please sign in to comment.