Skip to content

Fix duplicate class with the PDFium adapter #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2025
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. Take a look

**Warning:** Features marked as *experimental* may change or be removed in a future release without notice. Use with caution.

<!-- ## [Unreleased] -->
## [Unreleased]

### Fixed

* [#662](https://github.com/readium/kotlin-toolkit/issues/662) Fixed duplicate class when using `readium-adapter-pdfium`.


## [3.1.0]

Expand Down
17 changes: 17 additions & 0 deletions readium/adapters/pdfium/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2022 Readium Foundation. All rights reserved.
* Use of this source code is governed by the BSD-style license
* available in the top-level LICENSE file of the project.
*/

plugins {
id("readium.library-conventions")
}

android {
namespace = "org.readium.adapter.pdfium.common"
}

dependencies {
api(files("libs/pdfium-android-1.8.2.jar"))
}
1 change: 1 addition & 0 deletions readium/adapters/pdfium/common/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pom.artifactId=readium-adapter-pdfium-common
3 changes: 3 additions & 0 deletions readium/adapters/pdfium/common/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest />

2 changes: 1 addition & 1 deletion readium/adapters/pdfium/document/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {

dependencies {
api(project(":readium:readium-shared"))
implementation(files("../libs/pdfium-android-1.8.2.jar"))
implementation(project(":readium:adapters:pdfium:readium-adapter-pdfium-common"))

implementation(libs.timber)
implementation(libs.kotlinx.coroutines.android)
Expand Down
2 changes: 1 addition & 1 deletion readium/adapters/pdfium/navigator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
api(project(":readium:readium-shared"))
api(project(":readium:readium-navigator"))
api(project(":readium:adapters:pdfium:readium-adapter-pdfium-document"))
implementation(files("../libs/pdfium-android-1.8.2.jar"))
implementation(project(":readium:adapters:pdfium:readium-adapter-pdfium-common"))
implementation(files("libs/android-pdf-viewer-2.8.2.jar"))

implementation(libs.androidx.fragment.ktx)
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ dependencyResolutionManagement {

rootProject.name = "Readium"

include(":readium:adapters:pdfium:common")
project(":readium:adapters:pdfium:common")
.name = "readium-adapter-pdfium-common"

include(":readium:adapters:pdfium:document")
project(":readium:adapters:pdfium:document")
.name = "readium-adapter-pdfium-document"
Expand Down