mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 02:36:24 -04:00
Migrating the ErrorActivity in jetpack.
* Added the jetpack compose libraries in project.
This commit is contained in:
parent
79f24b0b61
commit
55bcccce8c
@ -17,6 +17,7 @@ buildscript {
|
||||
}
|
||||
plugins {
|
||||
buildSrcVersions
|
||||
id("org.jetbrains.kotlin.plugin.compose") version Versions.ORG_JETBRAINS_KOTLIN_PLUGIN_COMPOSE apply false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@ -28,5 +29,5 @@ allprojects {
|
||||
}
|
||||
|
||||
tasks.create<Delete>("clean") {
|
||||
delete(rootProject.buildDir)
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
}
|
||||
|
@ -366,4 +366,43 @@ object Libs {
|
||||
*/
|
||||
const val fetch: String = "com.github.tonyofrancis.Fetch:fetch2:" + Versions.fetch
|
||||
const val fetchOkhttp: String = "com.github.tonyofrancis.Fetch:fetch2okhttp:" + Versions.fetch
|
||||
|
||||
/**
|
||||
* https://developer.android.com/reference/kotlin/androidx/compose/material3
|
||||
*/
|
||||
const val ANDROIDX_COMPOSE_MATERIAL3: String =
|
||||
"androidx.compose.material3:material3-android:" + Versions.ANDROIDX_COMPOSE_MATERIAL3_VERSION
|
||||
|
||||
/**
|
||||
* https://developer.android.com/reference/kotlin/androidx/activity/compose
|
||||
*/
|
||||
const val ANDROIDX_ACTIVITY_COMPOSE: String =
|
||||
"androidx.activity:activity-compose:" + Versions.ANDROIDX_ACTIVITY_COMPOSE_VERSION
|
||||
|
||||
/**
|
||||
* https://developer.android.com/develop/ui/compose/documentation
|
||||
*/
|
||||
const val ANDROIDX_COMPOSE_UI: String =
|
||||
"androidx.compose.ui:ui:" + Versions.ANDROIDX_COMPOSE_UI_VERSION
|
||||
|
||||
const val ANDROIDX_COMPOSE_BOM: String =
|
||||
"androidx.compose:compose-bom:" + Versions.ANDROIDX_COMPOSE_BOM_VERSION
|
||||
|
||||
const val ANDROIDX_COMPOSE_TOOLING_PREVIEW: String =
|
||||
"androidx.compose.ui:ui-tooling-preview"
|
||||
|
||||
const val ANDROIDX_COMPOSE_RUNTIME_LIVEDATA: String =
|
||||
"androidx.compose.runtime:runtime-livedata"
|
||||
|
||||
const val ANDROIDX_COMPOSE_RUNTIME_RXJAVA2: String =
|
||||
"androidx.compose.runtime:runtime-rxjava2"
|
||||
|
||||
/**
|
||||
* testing libraries for compose
|
||||
*/
|
||||
const val ANDROIDX_COMPOSE_UI_TEST_JUNIT4: String =
|
||||
"androidx.compose.ui:ui-test-junit4"
|
||||
|
||||
const val ANDROIDX_COMPOSE_UI_TOOLING: String =
|
||||
"androidx.compose.ui:ui-tooling"
|
||||
}
|
||||
|
@ -115,6 +115,18 @@ object Versions {
|
||||
const val keeper = "0.16.1"
|
||||
|
||||
const val fetch: String = "3.4.1"
|
||||
|
||||
const val ORG_JETBRAINS_KOTLIN_PLUGIN_COMPOSE = "2.1.10"
|
||||
|
||||
const val KOTLIN_COMPILER_EXTENSION_VERSION = "1.5.15"
|
||||
|
||||
const val ANDROIDX_COMPOSE_MATERIAL3_VERSION = "1.3.1"
|
||||
|
||||
const val ANDROIDX_ACTIVITY_COMPOSE_VERSION = "1.10.0"
|
||||
|
||||
const val ANDROIDX_COMPOSE_UI_VERSION = "1.7.7"
|
||||
|
||||
const val ANDROIDX_COMPOSE_BOM_VERSION = "2025.01.01"
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,6 +35,7 @@ import org.jlleitschuh.gradle.ktlint.KtlintExtension
|
||||
class AllProjectConfigurer {
|
||||
|
||||
fun applyPlugins(target: Project) {
|
||||
target.plugins.apply("org.jetbrains.kotlin.plugin.compose")
|
||||
target.plugins.apply("kotlin-android")
|
||||
target.plugins.apply("kotlin-kapt")
|
||||
target.plugins.apply("com.google.devtools.ksp")
|
||||
@ -90,6 +91,11 @@ class AllProjectConfigurer {
|
||||
* enabling this attribute will generate the `BuildConfig` file.
|
||||
*/
|
||||
buildConfig = true
|
||||
compose = true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = Versions.KOTLIN_COMPILER_EXTENSION_VERSION
|
||||
}
|
||||
|
||||
testOptions {
|
||||
@ -235,6 +241,14 @@ class AllProjectConfigurer {
|
||||
implementation(Libs.fetch)
|
||||
implementation(Libs.fetchOkhttp)
|
||||
implementation(Libs.androidx_activity)
|
||||
|
||||
// compose
|
||||
implementation(Libs.ANDROIDX_COMPOSE_MATERIAL3)
|
||||
implementation(Libs.ANDROIDX_ACTIVITY_COMPOSE)
|
||||
implementation(Libs.ANDROIDX_COMPOSE_UI)
|
||||
implementation(Libs.ANDROIDX_COMPOSE_UI_TOOLING)
|
||||
implementation(Libs.ANDROIDX_COMPOSE_RUNTIME_LIVEDATA)
|
||||
implementation(Libs.ANDROIDX_COMPOSE_RUNTIME_RXJAVA2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,4 +63,8 @@ dependencies {
|
||||
implementation(Libs.kotlinx_coroutines_android)
|
||||
implementation(Libs.kotlinx_coroutines_rx3)
|
||||
implementation(Libs.zxing)
|
||||
implementation(platform(Libs.ANDROIDX_COMPOSE_BOM))
|
||||
// For Compose UI Testing
|
||||
androidTestImplementation(Libs.ANDROIDX_COMPOSE_UI_TEST_JUNIT4)
|
||||
debugImplementation(Libs.ANDROIDX_COMPOSE_UI_TOOLING)
|
||||
}
|
||||
|
@ -51,4 +51,5 @@
|
||||
<issue id="CheckResult">
|
||||
<ignore path="**/androidTest/**.kt" />
|
||||
</issue>
|
||||
<issue id="PrivateResource" severity="warning" />
|
||||
</lint>
|
||||
|
Loading…
x
Reference in New Issue
Block a user