Skip to content
Draft
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
The table of contents is too big for display.
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
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Add the following to dependency to `build.gradle`:

```gradle
dependencies {
implementation 'com.tom-roush:pdfbox-android:2.0.27.0'
implementation 'com.tom-roush:pdfbox-android:2.0.37.1'
}
```

Expand All @@ -36,16 +36,23 @@ 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, add the following to your project's Gradle `dependencies` section. Note that this library is available in JCenter only, so you will need to add `jcenter()` to your repository list.
```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 'com.gemalto.jp2:jp2-android:1.0.3'
implementation 'dev.keiji.jp2:jp2-android:1.0.5'
}
```
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
==============

* Currently based on PDFBox v2.0.27
* Currently based on PDFBox v2.0.37

* Requires API 19 or greater for full functionality
* Requires API 23 or greater for full functionality
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.1"
}
14 changes: 8 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m
org.gradle.jvmargs=-Xmx2048m
org.gradle.parallel=true

VERSION_NAME=2.0.27.1-SNAPSHOT
VERSION_CODE=1
VERSION_NAME=2.0.37.1
VERSION_CODE=2

ANDROID_BUILD_MIN_SDK_VERSION=14
ANDROID_BUILD_TARGET_SDK_VERSION=33
ANDROID_BUILD_SDK_VERSION=33
ANDROID_BUILD_MIN_SDK_VERSION=23
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.8.2"
bouncycastle = "1.86"
appcompat = "1.8.0"
junit = "4.13.2"
mockito = "5.24.0"
diffutils = "1.3.0"
testRunner = "1.7.0"
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