Skip to content

Commit

Permalink
Merge branch 'develop' into compose-fxl
Browse files Browse the repository at this point in the history
  • Loading branch information
qnga committed Nov 5, 2024
2 parents 7e5cf34 + d177e72 commit 8a1b819
Show file tree
Hide file tree
Showing 37 changed files with 171 additions and 178 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
Expand All @@ -30,9 +30,9 @@ jobs:
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
Expand All @@ -47,14 +47,14 @@ jobs:
scripts: ${{ 'readium/navigator/src/main/assets/_scripts' }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
package_json_file: readium/navigator/src/main/assets/_scripts/package.json
run_install: false
- name: Setup cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,6 @@ lcp.patch

# direnv file containing Maven Central secrets
.envrc

# Kotlin
.kotlin/
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ 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] -->

## [3.0.1]

### Fixed

#### Shared

* Improved performance when accessing a publication from the Shared Storage.

#### Navigator

* Fixed crash in the image navigator.
Expand Down Expand Up @@ -895,4 +901,5 @@ progression. Now if no reading progression is set, the `effectiveReadingProgress
[3.0.0-beta.1]: https://github.com/readium/kotlin-toolkit/compare/3.0.0-alpha.2...3.0.0-beta.1
[3.0.0-beta.2]: https://github.com/readium/kotlin-toolkit/compare/3.0.0-beta.1...3.0.0-beta.2
[3.0.0]: https://github.com/readium/kotlin-toolkit/compare/3.0.0-beta.2...3.0.0
[3.0.1]: https://github.com/readium/kotlin-toolkit/compare/3.0.0...3.0.1

13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

## Minimum Requirements

| Readium | Android min SDK | Android compile SDK | Kotlin compiler (✻) | Gradle (✻) |
|---------|-----------------|---------------------|---------------------|------------|
| 3.0.0 | 21 | 34 | 1.9.24 | 8.6.0 |
| 2.3.0 | 21 | 33 | 1.7.10 | 6.9.3 |
| Readium | Android min SDK | Android compile SDK | Kotlin compiler (✻) | Gradle (✻) |
|-----------|-----------------|---------------------|---------------------|------------|
| `develop` | 21 | 35 | 2.0.21 | 8.10.2 |
| 3.0.0 | 21 | 34 | 1.9.24 | 8.6.0 |
| 2.3.0 | 21 | 33 | 1.7.10 | 6.9.3 |

✻ Only required if you integrate Readium as a submodule instead of using Maven Central.

Expand All @@ -21,7 +22,7 @@ Readium modules are distributed with [Maven Central](https://search.maven.org/se

```groovy
buildscript {
ext.readium_version = '3.0.0'
ext.readium_version = '3.0.1'
}
allprojects {
Expand All @@ -43,6 +44,8 @@ dependencies {
}
```

:warning: If you target Android devices running below API 26, you must enable [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) in your application module.

### Using a local Git clone

You may prefer to use a local Git clone if you want to contribute to Readium, or if you are using your own fork.
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.jetbrains.dokka.gradle.DokkaTaskPartial
plugins {
alias(libs.plugins.dokka)
alias(libs.plugins.ktlint)
alias(libs.plugins.compose.compiler) apply false
}

subprojects {
Expand Down
10 changes: 7 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html

pom.groupId=org.readium.kotlin-toolkit
pom.version=3.0.0
pom.version=3.0.1

android.minSdk=21
android.compileSdk=34
android.targetSdk=34
android.compileSdk=35
android.targetSdk=35

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
Expand All @@ -27,3 +27,7 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

# FIXME: There are still a few issues with KSP and K2. It probably won't be ready until Room is
# updated to 2.7.0 (currently in alpha), and the KSP2 issue with @TypeConverters is fixed.
#ksp.useKSP2=true
78 changes: 32 additions & 46 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,61 +1,56 @@
[versions]

kotlin = "1.9.24"
agp = "8.4.0"
desugar_jdk_libs = "2.0.4"
kotlin = "2.0.21"
agp = "8.7.2"
desugar_jdk_libs = "2.1.2"
gradle-maven-publish-plugin = "0.28.0"

androidx-activity = "1.9.0"
androidx-appcompat = "1.6.1"
androidx-activity = "1.9.3"
androidx-annotation = "1.9.1"
androidx-appcompat = "1.7.0"
androidx-browser = "1.8.0"
androidx-cardview = "1.0.0"
# Make sure to align with the Kotlin version
# https://developer.android.com/jetpack/androidx/releases/compose-kotlin
androidx-compose-compiler = "1.5.14"
androidx-compose-animation = "1.7.0"
androidx-compose-foundation = "1.7.0"
androidx-compose-material = "1.7.0"
androidx-compose-material3 = "1.3.0"
androidx-compose-runtime = "1.7.0"
androidx-compose-ui = "1.7.0"
androidx-constraintlayout = "2.1.4"
androidx-core = "1.13.1"
androidx-compose-animation = "1.7.5"
androidx-compose-foundation = "1.7.5"
androidx-compose-material = "1.7.5"
androidx-compose-material3 = "1.3.1"
androidx-compose-runtime = "1.7.5"
androidx-compose-ui = "1.7.5"
androidx-constraintlayout = "2.2.0"
androidx-core = "1.15.0"
androidx-datastore = "1.1.1"
androidx-expresso-core = "3.5.1"
androidx-ext-junit = "1.1.5"
androidx-fragment = "1.8.4"
androidx-fragment-ktx = "1.8.5"
androidx-legacy = "1.0.0"
androidx-lifecycle = "2.8.0"
androidx-lifecycle-extensions = "2.2.0"
androidx-lifecycle = "2.8.7"
androidx-media = "1.7.0"
androidx-media2 = "1.3.0"
androidx-media3 = "1.3.1"
androidx-navigation = "2.7.7"
androidx-paging = "3.3.0"
androidx-media3 = "1.4.1"
androidx-navigation = "2.8.3"
androidx-paging = "3.3.2"
androidx-recyclerview = "1.3.2"
androidx-room = "2.6.1"
androidx-viewpager2 = "1.1.0"
androidx-webkit = "1.11.0"
androidx-webkit = "1.12.1"

assertj = "3.25.3"
assertj = "3.26.3"

dokka = "1.9.20"

google-exoplayer = "2.19.1"
google-material = "1.12.0"

joda-time = "2.12.7"
jsoup = "1.17.2"
joda-time = "2.13.0"
jsoup = "1.18.1"
junit = "4.13.2"

kotlinx-coroutines = "1.8.1"
kotlinx-coroutines-test = "1.8.1"
kotlinx-datetime = "0.6.0"
kotlinx-serialization-json = "1.6.3"
kotlinx-coroutines = "1.9.0"
kotlinx-coroutines-test = "1.9.0"
kotlinx-datetime = "0.6.1"
kotlinx-serialization-json = "1.7.3"

# Make sure to align with the Kotlin version.
# See https://github.com/google/ksp/releases
ksp = "1.9.24-1.0.20"
ksp = "2.0.21-1.0.25"

ktlint = "11.5.1"

Expand All @@ -68,14 +63,15 @@ pdf-viewer = "2.8.2"
picasso = "2.8"
pspdfkit = "8.4.1"

robolectric = "4.12.2"
robolectric = "4.13"

timber = "5.0.1"


[libraries]

androidx-activity-ktx = { group = "androidx.activity", name = "activity-ktx", version.ref = "androidx-activity" }
androidx-annotation = { group = "androidx.annotation", name = "annotation", version.ref = "androidx-annotation" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
androidx-browser = { group = "androidx.browser", name = "browser", version.ref = "androidx-browser" }
androidx-cardview = { group = "androidx.cardview", name = "cardview", version.ref = "androidx-cardview" }
Expand All @@ -91,19 +87,9 @@ androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-toolin
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-core = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core" }
androidx-datastore-preferences = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidx-datastore" }
androidx-expresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-expresso-core" }
androidx-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-ext-junit" }
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment" }
androidx-fragment-compose = { group = "androidx.fragment", name = "fragment-compose", version.ref = "androidx-fragment" }
androidx-legacy-v4 = { group = "androidx.legacy", name = "legacy-support-v4", version.ref = "androidx-legacy" }
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment-ktx" }
androidx-legacy-ui = { group = "androidx.legacy", name = "legacy-support-core-ui", version.ref = "androidx-legacy" }
androidx-lifecycle-common = { group = "androidx.lifecycle", name = "lifecycle-common-java8", version.ref = "androidx-lifecycle" }
androidx-lifecycle-extensions = { group = "androidx.lifecycle", name = "lifecycle-extensions", version.ref = "androidx-lifecycle-extensions" }
androidx-lifecycle-livedata = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
androidx-lifecycle-vmsavedstate = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-savedstate", version.ref = "androidx-lifecycle" }
androidx-media = { group = "androidx.media", name = "media", version.ref = "androidx-media" }
androidx-media2-session = { group = "androidx.media2", name = "media2-session", version.ref = "androidx-media2" }
androidx-media2-player = { group = "androidx.media2", name = "media2-player", version.ref = "androidx-media2" }
Expand Down Expand Up @@ -161,12 +147,12 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

[bundles]

compose = ["androidx-compose-activity", "androidx-compose-animation", "androidx-compose-foundation", "androidx-compose-material", "androidx-compose-material3", "androidx-compose-material-icons", "androidx-compose-runtime", "androidx-compose-ui", "androidx-compose-ui-tooling"]
exoplayer = ["google-exoplayer-core", "google-exoplayer-ui", "google-exoplayer-mediasession", "google-exoplayer-workmanager", "google-exoplayer-extension-media2"]
lifecycle = ["androidx-lifecycle-common", "androidx-lifecycle-extensions", "androidx-lifecycle-livedata", "androidx-lifecycle-runtime", "androidx-lifecycle-viewmodel", "androidx-lifecycle-vmsavedstate", "androidx-lifecycle-viewmodel-compose"]
media2 = ["androidx-media2-session", "androidx-media2-player", "google-exoplayer-core", "google-exoplayer-extension-media2"]
media3 = ["androidx-media3-session", "androidx-media3-common", "androidx-media3-exoplayer"]
room = ["androidx-room-runtime", "androidx-room-ktx"]
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
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ public class ExoPlayerEngine private constructor(

private suspend fun prepareExoPlayer(player: ExoPlayer) {
lateinit var listener: Player.Listener
suspendCancellableCoroutine { continuation ->
suspendCancellableCoroutine<Unit> { continuation ->
listener = object : Player.Listener {
override fun onPlaybackStateChanged(playbackState: Int) {
when (playbackState) {
Player.STATE_READY -> continuation.resume(Unit) {}
Player.STATE_READY -> continuation.resume(Unit) { _, _, _ -> }
Player.STATE_IDLE -> if (player.playerError != null) {
continuation.resume(Unit) {}
continuation.resume(Unit) { _, _, _ -> }
}
else -> {}
}
Expand Down
6 changes: 0 additions & 6 deletions readium/adapters/pdfium/document/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ android {
dependencies {
api(project(":readium:readium-shared"))

implementation(libs.androidx.core)
implementation(libs.pdfium)
implementation(libs.timber)
implementation(libs.kotlinx.coroutines.android)

testImplementation(libs.junit)

androidTestImplementation(libs.androidx.ext.junit)
androidTestImplementation(libs.androidx.expresso.core)
}
5 changes: 0 additions & 5 deletions readium/adapters/pdfium/navigator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ dependencies {
implementation(libs.timber)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.serialization.json)

testImplementation(libs.junit)

androidTestImplementation(libs.androidx.ext.junit)
androidTestImplementation(libs.androidx.expresso.core)
}
6 changes: 0 additions & 6 deletions readium/adapters/pspdfkit/document/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ android {
dependencies {
api(project(":readium:readium-shared"))

implementation(libs.androidx.core)
implementation(libs.timber)
implementation(libs.pspdfkit)
implementation(libs.kotlinx.coroutines.android)

testImplementation(libs.junit)

androidTestImplementation(libs.androidx.ext.junit)
androidTestImplementation(libs.androidx.expresso.core)
}
5 changes: 0 additions & 5 deletions readium/adapters/pspdfkit/navigator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,4 @@ dependencies {
implementation(libs.pspdfkit)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.serialization.json)

testImplementation(libs.junit)

androidTestImplementation(libs.androidx.ext.junit)
androidTestImplementation(libs.androidx.expresso.core)
}
Loading

0 comments on commit 8a1b819

Please sign in to comment.