Refactoring

This commit is contained in:
2021-08-26 06:17:12 +02:00
parent 15cb292af2
commit 6b90784ab9
2 changed files with 104 additions and 99 deletions
+103 -99
View File
@@ -2,137 +2,141 @@ import de.fayard.refreshVersions.core.versionFor
plugins { plugins {
id("com.android.application") id("com.android.application")
kotlin("android") kotlin("android")
kotlin("kapt") kotlin("kapt")
id("dagger.hilt.android.plugin") id("dagger.hilt.android.plugin")
id("kotlin-android") id("kotlin-android")
id("com.google.devtools.ksp") version "1.5.21-1.0.0-beta07" id("com.google.devtools.ksp") version "1.5.21-1.0.0-beta07"
} }
kapt { kapt {
correctErrorTypes = true correctErrorTypes = true
javacOptions { javacOptions {
option("-Adagger.fastInit=ENABLED") option("-Adagger.fastInit=ENABLED")
option("-Adagger.hilt.android.internal.disableAndroidSuperclassValidation=true") option("-Adagger.hilt.android.internal.disableAndroidSuperclassValidation=true")
} }
} }
tasks.withType<Test> { tasks.withType<Test> {
useJUnitPlatform() useJUnitPlatform()
} }
android { android {
compileSdk = Apps.compileSdk compileSdk = Apps.compileSdk
buildToolsVersion = Apps.buildToolsVersion buildToolsVersion = Apps.buildToolsVersion
defaultConfig { defaultConfig {
applicationId = Apps.applicationId applicationId = Apps.applicationId
minSdk = Apps.minSdk minSdk = Apps.minSdk
targetSdk = Apps.targetSdk targetSdk = Apps.targetSdk
versionCode = Apps.versionCode versionCode = Apps.versionCode
versionName = Apps.versionName versionName = Apps.versionName
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { vectorDrawables {
useSupportLibrary = true useSupportLibrary = true
}
} }
}
buildTypes { buildTypes {
getByName("release") { getByName("release") {
isMinifyEnabled = true isMinifyEnabled = true
isShrinkResources = true isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") proguardFiles(
} getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
} }
compileOptions { }
sourceCompatibility = JavaVersion.VERSION_11 compileOptions {
targetCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.VERSION_11
} targetCompatibility = JavaVersion.VERSION_11
buildFeatures { }
compose = true buildFeatures {
} compose = true
composeOptions { }
kotlinCompilerExtensionVersion = versionFor(AndroidX.compose.ui) composeOptions {
} kotlinCompilerExtensionVersion = versionFor(AndroidX.compose.ui)
lint { }
isAbortOnError = false lint {
} isAbortOnError = false
packagingOptions { }
resources { packagingOptions {
excludes += "META-INF/AL2.0" resources {
excludes += "META-INF/licenses/ASM" excludes += "META-INF/AL2.0"
excludes += "META-INF/LICENSE.md" excludes += "META-INF/licenses/ASM"
excludes += "META-INF/LICENSE-notice.md" excludes += "META-INF/LICENSE.md"
excludes += "META-INF/LGPL2.1" excludes += "META-INF/LICENSE-notice.md"
excludes += "win32-x86/attach_hotspot_windows.dll" excludes += "META-INF/LGPL2.1"
excludes += "win32-x86-64/attach_hotspot_windows.dll" excludes += "win32-x86/attach_hotspot_windows.dll"
} excludes += "win32-x86-64/attach_hotspot_windows.dll"
} }
}
} }
dependencies { dependencies {
implementation(project(":util")) implementation(project(":util"))
implementation(Libs.activity_compose) implementation(Libs.activity_compose)
implementation(Libs.navigation_compose) implementation(Libs.navigation_compose)
implementation(Libs.core_ktx) implementation(Libs.core_ktx)
implementation(Libs.preference_ktx) implementation(Libs.preference_ktx)
implementation(Libs.appcompat) implementation(Libs.appcompat)
implementation(Libs.startup_runtime) implementation(Libs.startup_runtime)
implementation(Libs.google_material) implementation(Libs.google_material)
implementation(Libs.compose_compiler) implementation(Libs.compose_compiler)
implementation(Libs.compose_ui_tooling) implementation(Libs.compose_ui_tooling)
implementation(Libs.compose_ui_tooling_preview) implementation(Libs.compose_ui_tooling_preview)
implementation(Libs.compose_ui) implementation(Libs.compose_ui)
implementation(Libs.compose_ui_viewbinding) implementation(Libs.compose_ui_viewbinding)
implementation(Libs.compose_material) implementation(Libs.compose_material)
implementation(Libs.compose_runtime_livedata) implementation(Libs.compose_runtime_livedata)
implementation(Libs.compose_material_icons_extended) implementation(Libs.compose_material_icons_extended)
androidTestImplementation(Libs.compose_ui_test_junit4) androidTestImplementation(Libs.compose_ui_test_junit4)
implementation(Libs.accompanist_insets) implementation(Libs.accompanist_insets)
implementation(Libs.accompanist_pager) implementation(Libs.accompanist_pager)
implementation(Libs.accompanist_glide) implementation(Libs.accompanist_glide)
implementation(Libs.accompanist_pager_indicators) implementation(Libs.accompanist_pager_indicators)
implementation(Libs.accompanist_placeholder) implementation(Libs.accompanist_placeholder)
implementation(Libs.accompanist_navigation_animation) implementation(Libs.accompanist_navigation_animation)
implementation(kotlin("reflect")) implementation(kotlin("reflect"))
implementation(platform(Libs.kotlin_coroutine_bom)) implementation(platform(Libs.kotlin_coroutine_bom))
testImplementation(Libs.kotlin_coroutine_test) testImplementation(Libs.kotlin_coroutine_test)
implementation(Libs.hilt_android) implementation(Libs.hilt_android)
kapt(Libs.hilt_android_compiler) implementation(Libs.hilt_navigation_compose)
kapt(Libs.hilt_android_compiler)
implementation(Libs.lifecycle_runtime_ktx) implementation(Libs.lifecycle_runtime_ktx)
testImplementation(Libs.junit_jupiter_api) testImplementation(Libs.junit_jupiter_api)
testImplementation(Libs.junit_jupiter_engine) testImplementation(Libs.junit_jupiter_engine)
implementation(Libs.koin_android) implementation(Libs.koin_android)
implementation(Libs.koin_androidx_compose) implementation(Libs.koin_androidx_compose)
implementation(Libs.koin_androidx_workmanager) implementation(Libs.koin_androidx_workmanager)
testImplementation(Libs.koin_test_junit5) testImplementation(Libs.koin_test_junit5)
implementation(Libs.ksp_api) implementation(Libs.ksp_api)
implementation(Libs.orbit_mvi_core) implementation(Libs.orbit_mvi_core)
implementation(Libs.orbit_mvi_viewmodel) implementation(Libs.orbit_mvi_viewmodel)
testImplementation(Libs.orbit_mvi_test) testImplementation(Libs.orbit_mvi_test)
ksp(Libs.room_compiler) ksp(Libs.room_compiler)
implementation(Libs.room_runtime) implementation(Libs.room_runtime)
testImplementation(Libs.room_testing) testImplementation(Libs.room_testing)
testImplementation(Libs.mockk_core) testImplementation(Libs.mockk_core)
androidTestImplementation(Libs.mockk_android) androidTestImplementation(Libs.mockk_android)
debugImplementation(Libs.leakcanary_android) debugImplementation(Libs.leakcanary_android)
implementation(Libs.timber) implementation(Libs.timber)
} }
+1
View File
@@ -57,6 +57,7 @@ object Libs {
const val hilt_gradle_plugin = "com.google.dagger:hilt-android-gradle-plugin:_" const val hilt_gradle_plugin = "com.google.dagger:hilt-android-gradle-plugin:_"
const val hilt_android = "com.google.dagger:hilt-android:_" const val hilt_android = "com.google.dagger:hilt-android:_"
const val hilt_android_compiler = "com.google.dagger:hilt-android-compiler:_" const val hilt_android_compiler = "com.google.dagger:hilt-android-compiler:_"
const val hilt_navigation_compose = "androidx.hilt:hilt-navigation-compose:1.0.0-alpha03"
const val junit4 = "junit:junit:_" const val junit4 = "junit:junit:_"
const val junit_jupiter_api = "org.junit.jupiter:junit-jupiter-api:_" const val junit_jupiter_api = "org.junit.jupiter:junit-jupiter-api:_"