Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
version 2.0.2 -> 16KB page size support
  • Loading branch information
Aiuspaktyn committed Sep 27, 2025
commit 40003b210ac52f8a560d522e5a39f7220be926f9
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.0.2 (2025-09-27)
* Android 16 (16KB page size support)

## 1.9.2 (2025-03-15)
* Upgrade libfreetype to 2.13.3
* It is a security update, see [here](https://nvd.nist.gov/vuln/detail/CVE-2025-27363) for more details.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# PdfiumAndroid - SDK 35 / Android 15 Compatible
# PdfiumAndroid - SDK 36 / Android 16 Compatible

This repository is a fork of [meganz/PdfiumAndroid](https://github.com/meganz/PdfiumAndroid), which itself is based on [barteksc/PdfiumAndroid](https://github.com/barteksc/PdfiumAndroid).

## What's New in This Fork

This fork is updated to **SDK 35 / NDK 28** and delivers a working AAR compatible with **Android 15 (16KB page size support)**.

**Version 2.0.0** - Significant updates to the build layer and compatibility improvements warrant a major version bump from the original 1.9.0.
**Version 2.0.2** - Significant updates to the build layer and compatibility improvements warrant a major version bump from the original 1.9.0.

### Key Updates:
- **Android SDK 36** and **NDK 28** compatibility
- **Android Gradle Plugin 8.12.0** support
- **Android Gradle Plugin 8.13.0** support
- **Java 17** requirement (configured via `gradle.properties`)
- **BuildConfig generation** fixed for library modules
- **Native library packaging** corrected in AAR
Expand All @@ -19,7 +19,7 @@ This fork is updated to **SDK 35 / NDK 28** and delivers a working AAR compatibl

## Requirements

- **Java 17+** (required for AGP 8.12.0+)
- **Java 17+** (required for AGP 8.13.0+)
- **Android NDK 28.2.13676358**
- **Git Bash** (for Windows users)
- **Ninja build tool** - https://github.com/ninja-build/ninja/releases
Expand Down Expand Up @@ -56,11 +56,11 @@ Remark: you might need to update the 'javaHome' environment variable in the `gra
## Using in Your Project

### Method 1: Local AAR
1. Copy `PdfiumAndroid-2.0.0-release.aar` to your app's `libs/` folder
1. Copy `PdfiumAndroid-2.0.2-release.aar` to your app's `libs/` folder
2. Add to your app's `build.gradle`:
```groovy
dependencies {
implementation files('libs/PdfiumAndroid-2.0.0-release.aar')
implementation files('libs/PdfiumAndroid-2.0.2-release.aar')
implementation 'androidx.core:core:1.16.0'
}
```
Expand Down Expand Up @@ -94,7 +94,7 @@ PdfDocument pdfDocument = pdfiumCore.newDocument(parcelFileDescriptor);
## Changes Made

### Build System Updates
- Updated `build.gradle` for AGP 8.9.2 compatibility
- Updated `build.gradle` for AGP 8.13.0 compatibility
- Added `buildFeatures { buildConfig = true }`
- Added `buildConfigField` for `VERSION_NAME`
- Fixed `jniLibs.srcDir` path for native libraries
Expand Down
22 changes: 14 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:8.12.0'
classpath 'com.android.tools.build:gradle:8.13.0'
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
namespace 'com.shockwave.pdfium'
namespace = 'com.shockwave.pdfium'
compileSdkVersion 36

defaultConfig {
minSdkVersion 23
targetSdkVersion 36
versionCode 2
versionName "2.0.0"
versionCode 3
versionName "2.0.2"
buildConfigField "String", "VERSION_NAME", "\"${versionName}\""
}
buildTypes {
Expand All @@ -43,11 +43,17 @@ android {
}

buildFeatures {
viewBinding true
buildConfig true
viewBinding = true
buildConfig = true
}

ndkVersion '28.2.13676358'
ndkVersion = '28.2.13676358'

packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}

// Configure AAR filename to include version
libraryVariants.configureEach { variant ->
Expand All @@ -69,7 +75,7 @@ repositories {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.core:core:1.16.0'
implementation 'androidx.core:core:1.17.0'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
}
Binary file modified src/main/jni/lib/x86_64/libc++_shared.so
Binary file not shown.