Skip to content

Commit 47b477b

Browse files
committed
Use gradle version catalogs
1 parent 38ac63d commit 47b477b

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

markdowntext/build.gradle

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'com.android.library'
33
id 'kotlin-android'
44
id 'maven-publish'
5-
id("org.jetbrains.kotlin.plugin.compose") version "$pKotlinVersion"
5+
alias(libs.plugins.kotlin.compose)
66
}
77

88
android {
@@ -29,8 +29,8 @@ android {
2929
}
3030
compileOptions {
3131
coreLibraryDesugaringEnabled = true
32-
sourceCompatibility pJvmVersion
33-
targetCompatibility pJvmVersion
32+
sourceCompatibility JavaVersion.toVersion(libs.versions.jvm.get())
33+
targetCompatibility JavaVersion.toVersion(libs.versions.jvm.get())
3434
}
3535
composeOptions {
3636
kotlinCompilerExtensionVersion '1.5.12'
@@ -44,8 +44,8 @@ android {
4444
}
4545

4646
dependencies {
47-
implementation 'androidx.core:core-ktx:1.13.1'
48-
implementation "androidx.appcompat:appcompat:$appCompatVersion"
47+
implementation libs.androidx.core.ktx
48+
implementation libs.androidx.appcompat
4949

5050
final def markwon_version = '4.6.2'
5151

@@ -59,31 +59,31 @@ dependencies {
5959
// TODO: Change it after migrating markwon project
6060
implementation "com.github.jeziellago:Markwon:58aa5aba6a"
6161

62-
api("io.coil-kt.coil3:coil:$coilVersion")
63-
api("io.coil-kt.coil3:coil-network-okhttp:$coilVersion")
62+
api libs.coil
63+
api libs.coil.network.okhttp
6464
api("io.coil-kt.coil3:coil-gif:3.3.0")
6565

6666
// Jetpack Compose
67-
implementation "androidx.compose.ui:ui:$compose_version"
68-
implementation "androidx.compose.material3:material3:1.2.1"
67+
implementation libs.androidx.compose.ui
68+
implementation libs.androidx.compose.material3
6969

7070
// Testing dependencies
71-
testImplementation 'junit:junit:4.13.2'
71+
testImplementation libs.junit
7272
testImplementation 'org.mockito:mockito-core:5.1.1'
7373
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.1.0'
74-
testImplementation 'org.robolectric:robolectric:4.10.3'
74+
testImplementation libs.robolectric
7575
testImplementation 'androidx.test:core:1.5.0'
7676
testImplementation 'androidx.test.ext:junit:1.1.5'
77-
testImplementation 'io.mockk:mockk:1.13.5'
78-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1'
79-
77+
testImplementation libs.mockk
78+
testImplementation libs.kotlinx.coroutines.test
79+
8080
// Android Instrumentation Tests
8181
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
8282
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
83-
androidTestImplementation 'androidx.test:runner:1.5.2'
83+
androidTestImplementation libs.androidx.test.runner
8484
androidTestImplementation 'androidx.test:rules:1.5.0'
85-
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
86-
androidTestImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
85+
androidTestImplementation libs.androidx.compose.ui
86+
androidTestImplementation libs.androidx.compose.ui
8787
androidTestImplementation 'io.mockk:mockk-android:1.13.5'
8888
}
8989

0 commit comments

Comments
 (0)