Skip to content

Commit 8ee5f49

Browse files
committed
Update dependencies and release new version
This commit updates Compose Multiplatform to 1.4.1 AGP to 7.4.0 Kotlin to 18.10
1 parent 3c5b38f commit 8ee5f49

18 files changed

Lines changed: 137 additions & 96 deletions

File tree

android-sample/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
}
55

66
android {
7+
namespace = "com.zachklipp.richtext.sample"
78
compileSdk = AndroidConfiguration.compileSdk
89

910
defaultConfig {
@@ -15,7 +16,13 @@ android {
1516
compose = true
1617
}
1718

18-
kotlinOptions { jvmTarget = "11" }
19+
compileOptions {
20+
sourceCompatibility = JavaVersion.VERSION_11
21+
targetCompatibility = JavaVersion.VERSION_11
22+
}
23+
kotlinOptions {
24+
jvmTarget = "11"
25+
}
1926

2027
composeOptions {
2128
kotlinCompilerExtensionVersion = Compose.compilerVersion

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ plugins {
1010

1111
dependencies {
1212
// keep in sync with Dependencies.BuildPlugins.androidGradlePlugin
13-
implementation("com.android.tools.build:gradle:7.2.2")
13+
implementation("com.android.tools.build:gradle:7.4.0")
1414
// keep in sync with Dependencies.Kotlin.gradlePlugin
15-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
15+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
1616
implementation(kotlin("script-runtime"))
1717
}

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,53 @@
11
object BuildPlugins {
2-
val androidGradlePlugin = "com.android.tools.build:gradle:7.2.2"
2+
// keep in sync with buildSrc/build.gradle.kts
3+
val androidGradlePlugin = "com.android.tools.build:gradle:7.4.0"
34
}
45

56
object AndroidX {
67
val activity = "androidx.activity:activity:1.5.0-rc01"
78
val annotations = "androidx.annotation:annotation:1.1.0"
89
val appcompat = "androidx.appcompat:appcompat:1.3.0"
9-
val constraintLayout = "androidx.constraintlayout:constraintlayout:1.1.3"
10-
val fragment = "androidx.fragment:fragment:1.2.2"
1110
val material = "com.google.android.material:material:1.1.0"
12-
val recyclerview = "androidx.recyclerview:recyclerview:1.1.0"
13-
val savedstate = "androidx.savedstate:savedstate-ktx:1.2.0-rc01"
14-
val transition = "androidx.transition:transition:1.3.1"
15-
val viewbinding = "androidx.databinding:viewbinding:3.6.1"
1611
}
1712

1813
object Network {
1914
val okHttp = "com.squareup.okhttp3:okhttp:4.9.0"
2015
}
2116

2217
object Kotlin {
23-
val version = "1.7.10"
18+
// keep in sync with buildSrc/build.gradle.kts
19+
val version = "1.8.10"
2420
val binaryCompatibilityValidatorPlugin = "org.jetbrains.kotlinx:binary-compatibility-validator:0.9.0"
2521
val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
2622

2723
object Test {
2824
val common = "org.jetbrains.kotlin:kotlin-test-common"
2925
val annotations = "org.jetbrains.kotlin:kotlin-test-annotations-common"
3026
val jdk = "org.jetbrains.kotlin:kotlin-test-junit"
31-
val mockito = "com.nhaarman:mockito-kotlin-kt1.1:1.6.0"
3227
}
3328
}
3429

3530
val ktlint = "org.jlleitschuh.gradle:ktlint-gradle:10.0.0"
3631

3732
object Compose {
38-
val version = "1.2.1"
39-
val compilerVersion = "1.3.1"
40-
val desktopVersion = "1.2.0"
41-
val activity = "androidx.activity:activity-compose:1.6.0-rc01"
33+
val version = "1.4.3"
34+
val compilerVersion = "1.4.4"
35+
val desktopVersion = "1.4.1"
36+
val activity = "androidx.activity:activity-compose:1.7.2"
4237
val foundation = "androidx.compose.foundation:foundation:$version"
4338
val material = "androidx.compose.material:material:$version"
44-
val material3 = "androidx.compose.material3:material3:1.0.0-beta02"
39+
val material3 = "androidx.compose.material3:material3:1.0.1"
4540
val icons = "androidx.compose.material:material-icons-extended:$version"
4641
val test = "androidx.ui:ui-test:$version"
4742
val tooling = "androidx.compose.ui:ui-tooling:$version"
4843
val toolingData = "androidx.compose.ui:ui-tooling-data:$version"
4944
val desktopPreview = "org.jetbrains.compose.ui:ui-tooling-preview-desktop:$desktopVersion"
5045
val multiplatformUiUtil = "org.jetbrains.compose.ui:ui-util:$desktopVersion"
51-
val coil = "io.coil-kt:coil-compose:2.2.1"
46+
val coil = "io.coil-kt:coil-compose:2.4.0"
5247
}
5348

5449
object Commonmark {
55-
private val version = "0.20.0"
50+
private val version = "0.21.0"
5651
val core = "org.commonmark:commonmark:$version"
5752
val tables = "org.commonmark:commonmark-ext-gfm-tables:$version"
5853
val strikethrough = "org.commonmark:commonmark-ext-gfm-strikethrough:$version"

buildSrc/src/main/kotlin/richtext-android-library.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ android {
1717
targetSdk = AndroidConfiguration.targetSdk
1818
}
1919

20-
kotlinOptions { jvmTarget = "11" }
20+
compileOptions {
21+
sourceCompatibility = JavaVersion.VERSION_11
22+
targetCompatibility = JavaVersion.VERSION_11
23+
}
24+
kotlinOptions {
25+
jvmTarget = "11"
26+
}
2127

2228
buildFeatures {
2329
compose = true

buildSrc/src/main/kotlin/richtext-kmp-library.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,22 @@ kotlin {
1414
jvm()
1515
android {
1616
publishLibraryVariants("release", "debug")
17+
compilations.all {
18+
kotlinOptions.jvmTarget = "11"
19+
}
1720
}
1821
explicitApi()
1922
}
2023

2124
android {
2225
compileSdk = 33
2326
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
27+
28+
compileOptions {
29+
sourceCompatibility = JavaVersion.VERSION_11
30+
targetCompatibility = JavaVersion.VERSION_11
31+
}
32+
2433
defaultConfig {
2534
minSdk = 21
2635
targetSdk = compileSdk

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ kotlin.code.style=official
2222
systemProp.org.gradle.internal.publish.checksums.insecure=true
2323

2424
GROUP=com.halilibo.compose-richtext
25-
VERSION_NAME=0.16.0
25+
VERSION_NAME=0.17.0
2626

2727
POM_DESCRIPTION=A collection of Compose libraries for advanced text formatting and alternative display types.
2828

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

printing/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ plugins {
33
id("org.jetbrains.dokka")
44
}
55

6+
android {
7+
namespace = "com.zachklipp.richtext.ui.printing"
8+
}
9+
610
dependencies {
711
implementation(Compose.foundation)
812
implementation(Compose.tooling)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<manifest package="com.zachklipp.richtext.printing" />
1+
<manifest />

printing/src/main/java/com/zachklipp/richtext/ui/printing/ComposePdfRenderer.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import androidx.compose.ui.graphics.Color.Companion.White
2424
import androidx.compose.ui.platform.ComposeView
2525
import androidx.compose.ui.platform.LocalDensity
2626
import androidx.compose.ui.unit.Density
27-
import androidx.lifecycle.ViewTreeLifecycleOwner
28-
import androidx.lifecycle.ViewTreeViewModelStoreOwner
27+
import androidx.lifecycle.setViewTreeLifecycleOwner
28+
import androidx.lifecycle.setViewTreeViewModelStoreOwner
2929
import androidx.savedstate.setViewTreeSavedStateRegistryOwner
3030
import kotlinx.coroutines.coroutineScope
3131
import kotlinx.coroutines.delay
@@ -175,8 +175,8 @@ private fun createWindowComposeView(
175175
activity: ComponentActivity,
176176
content: @Composable () -> Unit
177177
): View = ComposeView(activity).apply {
178-
ViewTreeLifecycleOwner.set(this, activity)
179-
ViewTreeViewModelStoreOwner.set(this, activity)
178+
this.setViewTreeLifecycleOwner(activity)
179+
this.setViewTreeViewModelStoreOwner(activity)
180180
setViewTreeSavedStateRegistryOwner(activity)
181181
setContent(content)
182182
}

0 commit comments

Comments
 (0)