Skip to content

Commit

Permalink
Upgrade to Kotlin 1.9.0 and bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu committed Jul 1, 2024
1 parent b88e104 commit febbbd9
Show file tree
Hide file tree
Showing 34 changed files with 313 additions and 252 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
- name: Build
run: ./gradlew clean build -x test -x ktlintMainSourceSetCheck
Expand All @@ -30,11 +30,11 @@ jobs:
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
- name: Lint
run: ./gradlew ktlintCheck
Expand All @@ -50,7 +50,7 @@ jobs:
scripts: ${{ 'src/main/assets/_scripts' }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: yarn --cwd "$scripts" install --frozen-lockfile
- name: Lint
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Fetch tags
run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.6

Expand All @@ -28,9 +28,9 @@ jobs:
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material mike
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'adopt'

- name: Get current Readium version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: develop
- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
java-version: 17

# Builds the release artifacts of the library
- name: Release build
Expand Down
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.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ A [Test App](test-app) demonstrates how to integrate the Readium Kotlin toolkit

| Readium | Android min SDK | Android compile SDK | Kotlin compiler | Gradle |
|---------|-----------------|---------------------|-----------------|--------|
| latest | 21 | 33 | 1.7.10 | 6.9.3 |
| latest | 21 | 33 | 1.9.0 | 8.6.0 |
| 2.3.0 | 21 | 33 | 1.7.10 | 6.9.3 |

## Setting Up Readium

Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ plugins {
id("io.github.gradle-nexus.publish-plugin") apply true
id("org.jetbrains.dokka") apply true
id("org.jetbrains.kotlin.android") apply false
id("com.google.devtools.ksp") apply false
id("org.jlleitschuh.gradle.ktlint") apply true
}

Expand Down
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

android.disableAutomaticComponentCreation=true
64 changes: 32 additions & 32 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
[versions]

androidx-activity = "1.6.1"
androidx-appcompat = "1.5.1"
androidx-browser = "1.4.0"
androidx-activity = "1.7.2"
androidx-appcompat = "1.6.1"
androidx-browser = "1.5.0"
androidx-cardview = "1.0.0"
androidx-compose-compiler = "1.3.2"
androidx-compose-animation = "1.3.0-beta03"
androidx-compose-foundation = "1.3.0-beta03"
androidx-compose-material = "1.3.0-beta03"
androidx-compose-material3 = "1.0.0-beta03"
androidx-compose-runtime = "1.3.0-beta03"
androidx-compose-compiler = "1.5.0"
androidx-compose-animation = "1.4.3"
androidx-compose-foundation = "1.4.3"
androidx-compose-material = "1.4.3"
androidx-compose-material3 = "1.1.1"
androidx-compose-runtime = "1.4.3"
androidx-compose-theme-adapter = "1.1.19"
androidx-compose-ui = "1.3.0-beta03"
androidx-compose-ui = "1.4.3"
androidx-constraintlayout = "2.1.4"
androidx-core = "1.9.0"
androidx-core = "1.10.1"
androidx-datastore = "1.0.0"
androidx-expresso-core = "3.4.0"
androidx-ext-junit = "1.1.3"
androidx-fragment-ktx = "1.5.4"
androidx-expresso-core = "3.5.1"
androidx-ext-junit = "1.1.5"
androidx-fragment-ktx = "1.6.0"
androidx-legacy = "1.0.0"
androidx-lifecycle = "2.5.1"
androidx-lifecycle = "2.6.1"
androidx-lifecycle-extensions = "2.2.0"
androidx-media = "1.6.0"
androidx-media2 = "1.2.1"
androidx-media3 = "1.0.0-rc01"
androidx-media3 = "1.1.0"
androidx-navigation = "2.5.2"
androidx-paging = "3.1.1"
androidx-recyclerview = "1.2.1"
androidx-room = "2.4.3"
androidx-recyclerview = "1.3.0"
androidx-room = "2.5.2"
androidx-viewpager2 = "1.0.0"
androidx-webkit = "1.5.0"
androidx-webkit = "1.7.0"

assertj = "3.23.1"
assertj = "3.24.2"

dokka = "1.7.20"
dokka = "1.8.20"

google-exoplayer = "2.18.1"
google-material = "1.7.0"
google-exoplayer = "2.19.0"
google-material = "1.9.0"

joda-time = "2.12.1"
jsoup = "1.15.3"
joda-time = "2.12.5"
jsoup = "1.16.1"
junit = "4.13.2"

kotlin = "1.7.20"
kotlinx-coroutines = "1.6.4"
kotlinx-coroutines-test = "1.6.4"
kotlinx-serialization-json = "1.4.1"
kotlin = "1.9.0"
kotlinx-coroutines = "1.7.2"
kotlinx-coroutines-test = "1.7.2"
kotlinx-serialization-json = "1.5.1"

pdfium = "1.8.2"
pdf-viewer = "2.8.2"
picasso = "2.71828"
picasso = "2.8"
pspdfkit = "8.4.1"

robolectric = "4.9"
robolectric = "4.10.3"

timber = "5.0.1"

Expand Down Expand Up @@ -119,7 +119,7 @@ junit = { group = "junit", name = "junit", version.ref = "junit" }
kotlin-gradle = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-junit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }
kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }

kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
Expand Down
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Mon Jul 01 10:00:22 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions readium/adapters/pdfium/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ plugins {
android {
resourcePrefix = "readium_"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=org.readium.r2.shared.InternalReadiumApi"
Expand Down
8 changes: 4 additions & 4 deletions readium/adapters/pdfium/pdfium-document/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ plugins {
android {
resourcePrefix = "readium_"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=org.readium.r2.shared.InternalReadiumApi"
Expand Down
8 changes: 4 additions & 4 deletions readium/adapters/pdfium/pdfium-navigator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ plugins {
android {
resourcePrefix = "readium_"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=org.readium.r2.shared.InternalReadiumApi"
Expand Down
8 changes: 4 additions & 4 deletions readium/adapters/pspdfkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ plugins {
android {
resourcePrefix = "readium_"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=org.readium.r2.shared.InternalReadiumApi"
Expand Down
8 changes: 4 additions & 4 deletions readium/adapters/pspdfkit/pspdfkit-document/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ plugins {
android {
resourcePrefix = "readium_"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=org.readium.r2.shared.InternalReadiumApi"
Expand Down
8 changes: 4 additions & 4 deletions readium/adapters/pspdfkit/pspdfkit-navigator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ plugins {
android {
resourcePrefix = "readium_"

compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=org.readium.r2.shared.InternalReadiumApi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ internal class PsPdfKitDocumentFragment(
}

private val allowedTextSelectionItems = listOf(
R.id.pspdf__text_selection_toolbar_item_share,
R.id.pspdf__text_selection_toolbar_item_copy,
R.id.pspdf__text_selection_toolbar_item_speak
com.pspdfkit.R.id.pspdf__text_selection_toolbar_item_share,
com.pspdfkit.R.id.pspdf__text_selection_toolbar_item_copy,
com.pspdfkit.R.id.pspdf__text_selection_toolbar_item_speak
)

override fun onPrepareTextSelectionPopupToolbar(toolbar: PdfTextSelectionPopupToolbar) {
Expand Down
Loading

0 comments on commit febbbd9

Please sign in to comment.