Skip to content

Commit cfa55e8

Browse files
committed
3.0.0 (#569)
1 parent 775f742 commit cfa55e8

File tree

6 files changed

+51
-56
lines changed

6 files changed

+51
-56
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Documentation
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
5+
# push:
6+
# branches:
7+
# - main
88

99
jobs:
1010
docs:

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ All notable changes to this project will be documented in this file. Take a look
44

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

7-
## [Unreleased]
7+
<!-- ## [Unreleased] -->
8+
9+
## [3.0.0]
810

911
### Fixed
1012

@@ -885,4 +887,5 @@ progression. Now if no reading progression is set, the `effectiveReadingProgress
885887
[3.0.0-alpha.2]: https://github.com/readium/kotlin-toolkit/compare/3.0.0-alpha.1...3.0.0-alpha.2
886888
[3.0.0-beta.1]: https://github.com/readium/kotlin-toolkit/compare/3.0.0-alpha.2...3.0.0-beta.1
887889
[3.0.0-beta.2]: https://github.com/readium/kotlin-toolkit/compare/3.0.0-beta.1...3.0.0-beta.2
890+
[3.0.0]: https://github.com/readium/kotlin-toolkit/compare/3.0.0-beta.2...3.0.0
888891

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Readium modules are distributed with [Maven Central](https://search.maven.org/se
2121

2222
```groovy
2323
buildscript {
24-
ext.readium_version = '3.0.0-beta.2'
24+
ext.readium_version = '3.0.0'
2525
}
2626
2727
allprojects {

docs/migration-guide.md

Lines changed: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,24 @@ All migration steps necessary in reading apps to upgrade to major versions of th
44

55
<!-- ## Unreleased -->
66

7-
## 3.0.0-beta.1
7+
## 3.0.0
88

9-
### Core library desugaring
10-
11-
If you target Android devices running below API 26, you now must enable [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) in your application module.
12-
13-
### Removing JVM dependencies
14-
15-
To reduce our depency to the JVM, we no longer use `Date` objects in the toolkit. Instead, we added a custom `Instant` type.
16-
17-
You can still translate from and to a `Date` object with `Instant.fromJavaDate()` and `instant.toJavaDate()`.
18-
19-
20-
## 3.0.0-alpha.2
21-
22-
### Deprecation of `DownloadManager`
23-
24-
The `DownloadManager` introduced in version 3.0.0-alpha.1 has been removed due to the Android Download Manager introducing unnecessary complexities in the toolkit. Instead, we chose to enable apps to manually handle an LCP download with `LcpService.injectLicenseDocument()`.
25-
26-
### EPUB footnote pop-ups
27-
28-
The EPUB navigator no longer displays a pop-up when the user activates a footnote link. This change was made to give reading apps control over the entire user interface.
29-
30-
The navigator now moves to the footnote content by default. To show your own pop-up instead, implement the new callback `HyperlinkNavigator.Listener.shouldFollowInternalLink(Link, LinkContext?)`.
31-
32-
```kotlin
33-
override fun shouldFollowInternalLink(
34-
link: Link,
35-
context: HyperlinkNavigator.LinkContext?
36-
): Boolean =
37-
when (context) {
38-
is HyperlinkNavigator.FootnoteContext -> {
39-
val text =
40-
if (link.mediaType?.isHtml == true) {
41-
Html.fromHtml(context.noteContent, Html.FROM_HTML_MODE_COMPACT)
42-
} else {
43-
context.noteContent
44-
}
45-
46-
showPopup(text)
47-
false
48-
}
49-
else -> true
50-
}
51-
```
9+
:warning: If you synchronize `Locator` objects between iOS and Android, you should wait for the 3.0 release of the Swift toolkit to upgrade your HREFs at the same time.
5210

53-
54-
## 3.0.0-alpha.1
55-
56-
First of all, upgrade to version 2.4.0 and resolve any deprecation notices. This will help you avoid troubles, as the APIs that were deprecated in version 2.x have been removed in version 3.0.
11+
First of all, upgrade to version 2.4.3 and resolve any deprecation notices. This will help you avoid troubles, as the APIs that were deprecated in version 2.x have been removed in version 3.0.
5712

5813
### Minimum requirements
5914

60-
If you integrate Readium 3.0 as a submodule, it requires Kotlin 1.9.22 and Gradle 8.2.2. You should start by updating these dependencies in your application.
15+
If you integrate Readium 3.0 as a submodule, it requires Kotlin 1.9.24 and Gradle 8.6.0. You should start by updating these dependencies in your application.
6116

6217
#### Targeting Android SDK 34
6318

6419
The modules now target Android SDK 34. If your app also targets it, you will need the `FOREGROUND_SERVICE_MEDIA_PLAYBACK` permission in your `AndroidManifest.xml` file to use TTS and audiobook playback.
6520

21+
#### Core library desugaring
22+
23+
If you target Android devices running below API 26, you now must enable [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) in your application module.
24+
6625
### `Publication`
6726

6827
#### Opening a `Publication`
@@ -219,6 +178,33 @@ navigator.addInputListener(object : InputListener {
219178
})
220179
```
221180

181+
#### EPUB footnote pop-ups
182+
183+
The EPUB navigator no longer displays a pop-up when the user activates a footnote link. This change was made to give reading apps control over the entire user interface.
184+
185+
The navigator now moves to the footnote content by default. To show your own pop-up instead, implement the new callback `HyperlinkNavigator.Listener.shouldFollowInternalLink(Link, LinkContext?)`.
186+
187+
```kotlin
188+
override fun shouldFollowInternalLink(
189+
link: Link,
190+
context: HyperlinkNavigator.LinkContext?
191+
): Boolean =
192+
when (context) {
193+
is HyperlinkNavigator.FootnoteContext -> {
194+
val text =
195+
if (link.mediaType?.isHtml == true) {
196+
Html.fromHtml(context.noteContent, Html.FROM_HTML_MODE_COMPACT)
197+
} else {
198+
context.noteContent
199+
}
200+
201+
showPopup(text)
202+
false
203+
}
204+
else -> true
205+
}
206+
```
207+
222208
### LCP
223209

224210
#### Creating an `LcpService`
@@ -242,6 +228,12 @@ Instead, call on your instance of `LcpDialogAuthentication`:
242228

243229
You can monitor these events by setting a `View.OnAttachStateChangeListener` on your view. [See the Test App for an example](https://github.com/readium/kotlin-toolkit/blob/01d6c7936accea2d6b953d435e669260676e8c99/test-app/src/main/java/org/readium/r2/testapp/bookshelf/BookshelfFragment.kt#L68).
244230

231+
### Removing JVM dependencies
232+
233+
To reduce our depency to the JVM, we no longer use `Date` objects in the toolkit. Instead, we added a custom `Instant` type.
234+
235+
You can still translate from and to a `Date` object with `Instant.fromJavaDate()` and `instant.toJavaDate()`.
236+
245237
### Removal of Fuel and Kovenant
246238

247239
Both the Fuel and Kovenant libraries have been completely removed from the toolkit. With that, several deprecated functions have also been removed.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77

88
pom.groupId=org.readium.kotlin-toolkit
9-
pom.version=3.0.0-beta.2
9+
pom.version=3.0.0
1010

1111
android.minSdk=21
1212
android.compileSdk=34

test-app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android {
1919

2020
applicationId = "org.readium.r2reader"
2121

22-
versionName = "3.0.0-beta.2"
22+
versionName = "3.0.0"
2323
versionCode = 300000
2424

2525
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

0 commit comments

Comments
 (0)