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
12 changes: 6 additions & 6 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3.11.0
with:
java-version: 11
distribution: 'adopt'
java-version: 17
distribution: 'temurin'

- name: Build & Test
run: ./gradlew build test
Expand All @@ -42,8 +42,8 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3.11.0
with:
java-version: 11
distribution: 'adopt'
java-version: 17
distribution: 'temurin'

- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
Expand Down Expand Up @@ -79,8 +79,8 @@ jobs:
- name: Configure JDK
uses: actions/setup-java@v3.11.0
with:
java-version: 11
distribution: 'adopt'
java-version: 17
distribution: 'temurin'

- name: Upload Snapshot
run: ./gradlew publish
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- name: Configure JDK
uses: actions/setup-java@v3.11.0
with:
java-version: 11
distribution: 'adopt'
java-version: 17
distribution: 'temurin'

- name: Set Release Version Name
run: sed -e s/-SNAPSHOT//g -i gradle.properties;
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ Reading JPX Images

Android does not come with native support for handling JPX images. These images can be read using the [JP2Android library](https://github.com/ThalesGroup/JP2ForAndroid). As JPX is not a common image format, this library is not included with PdfBox-Android by default. If the JP2Android library is not on the classpath of your application, JPX images will be ignored and a warning will be logged.

To include the JP2Android library in your own application, either build it from its [source repository](https://github.com/ThalesGroup/JP2ForAndroid) or copy the prebuilt AAR vendored in this repository (`sample/libs/jp2-android-1.0.3.aar`) and reference it as a file dependency:
```gradle
To include the JP2Android library with 16 KB page-size alignment in your own application, add the Maven Central dependency:
```kotlin
dependencies {
implementation("dev.keiji.jp2:jp2-android:1.0.5")
}
```
Or in Groovy DSL:
```groovy
dependencies {
implementation files('libs/jp2-android-1.0.3.aar')
implementation 'dev.keiji.jp2:jp2-android:1.0.5'
}
```
Note: the library was originally distributed through JCenter, which no longer hosts the artifact. The vendored copy is unmodified and is licensed under the BSD 2-Clause license (Copyright (c) 2018 Gemalto s.r.o., see the [upstream repository](https://github.com/ThalesGroup/JP2ForAndroid) for the full license text).
Note: `dev.keiji.jp2:jp2-android` is distributed through Maven Central and includes 16 KB page-size aligned ELF LOAD segments for modern Android (Android 15+) compatibility.

Important notes
==============
Expand Down
33 changes: 0 additions & 33 deletions build.gradle

This file was deleted.

8 changes: 8 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
}

allprojects {
version = project.findProperty("VERSION_NAME") as String? ?: "2.0.37.0-SNAPSHOT"
}
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ org.gradle.parallel=true
VERSION_NAME=2.0.37.0-SNAPSHOT
VERSION_CODE=1

ANDROID_BUILD_MIN_SDK_VERSION=14
ANDROID_BUILD_TARGET_SDK_VERSION=33
ANDROID_BUILD_SDK_VERSION=33
ANDROID_BUILD_MIN_SDK_VERSION=21
ANDROID_BUILD_TARGET_SDK_VERSION=36
ANDROID_BUILD_SDK_VERSION=36

android.useAndroidX=true
android.nonTransitiveRClass=true
android.suppressUnsupportedCompileSdk=36
24 changes: 24 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[versions]
agp = "8.7.3"
bouncycastle = "1.85"
appcompat = "1.7.0"
junit = "4.13.2"
mockito = "5.12.0"
diffutils = "1.3.0"
testRunner = "1.6.2"
jp2Android = "1.0.5"

[libraries]
bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk15to18", version.ref = "bouncycastle" }
bouncycastle-bcpkix = { module = "org.bouncycastle:bcpkix-jdk15to18", version.ref = "bouncycastle" }
bouncycastle-bcutil = { module = "org.bouncycastle:bcutil-jdk15to18", version.ref = "bouncycastle" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
jp2-android = { module = "dev.keiji.jp2:jp2-android", version.ref = "jp2Android" }
junit = { module = "junit:junit", version.ref = "junit" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
java-diffutils = { module = "com.googlecode.java-diff-utils:diffutils", version.ref = "diffutils" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "testRunner" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
109 changes: 0 additions & 109 deletions library/build.gradle

This file was deleted.

Loading
Loading