diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 217e5c51f..fdf8d994a 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 609a10005..3d37038a0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' - id 'org.jlleitschuh.gradle.ktlint' version "11.3.1" + id 'org.jlleitschuh.gradle.ktlint' version "11.5.0" id 'com.google.gms.google-services' } @@ -20,7 +20,7 @@ android { vectorDrawables { useSupportLibrary true } - resConfigs("ar", "cs", "de", "eo", "es", "fa", "fr", "hu", "night", "nl", "pt-rBR", "ru", "sv-rSE", "ta", "tr", "uk", "zh", "sh-rHK", "zh-rTW", "ja") + resourceConfigurations += ['ar', 'cs', 'de', 'eo', 'es', 'fa', 'fr', 'hu', 'night', 'nl', 'pt-rBR', 'ru', 'sv-rSE', 'ta', 'tr', 'uk', 'zh', 'sh-rHK', 'zh-rTW', 'ja'] } buildTypes { @@ -37,7 +37,7 @@ android { } } - flavorDimensions "channel" + flavorDimensions = ["channel"] productFlavors { play { @@ -73,7 +73,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion "1.4.7" + kotlinCompilerExtensionVersion "1.5.1" } packagingOptions { @@ -96,7 +96,7 @@ dependencies { implementation "androidx.fragment:fragment-ktx:$fragment_version" // Navigation - implementation("androidx.navigation:navigation-compose:$nav_version") + implementation "androidx.navigation:navigation-compose:$nav_version" // Observe Live data as State implementation "androidx.compose.runtime:runtime-livedata:$compose_ui_version" @@ -108,7 +108,7 @@ dependencies { implementation "androidx.lifecycle:lifecycle-runtime-compose:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" - implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" implementation "net.engawapg.lib:zoomable:1.4.3" @@ -153,7 +153,7 @@ dependencies { implementation "io.github.url-detector:url-detector:0.1.23" // For QR generation - implementation 'com.google.zxing:core:3.5.1' + implementation 'com.google.zxing:core:3.5.2' implementation 'com.journeyapps:zxing-android-embedded:4.3.0' // Markdown diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/LocationUtil.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/LocationUtil.kt index cfda4b271..7645a12f4 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/LocationUtil.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/LocationUtil.kt @@ -6,7 +6,6 @@ import android.location.Geocoder import android.location.Location import android.location.LocationListener import android.location.LocationManager -import android.os.Bundle import android.os.HandlerThread import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf @@ -53,9 +52,6 @@ class LocationUtil(context: Context) { locationStateFlow.value = location } - override fun onStatusChanged(provider: String?, status: Int, extras: Bundle?) { - } - override fun onProviderEnabled(provider: String) { providerState.value = true } diff --git a/build.gradle b/build.gradle index a405f0fb0..b401c47bd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,15 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + buildscript { ext { - fragment_version = "1.6.0" + fragment_version = "1.6.1" lifecycle_version = '2.6.1' compose_ui_version = '1.4.3' nav_version = "2.6.0" room_version = "2.4.3" accompanist_version = '0.30.1' coil_version = '2.4.0' - vico_version = '1.7.1' + vico_version = '1.7.3' exoplayer_version = '1.1.0' } dependencies { @@ -15,13 +17,13 @@ buildscript { } }// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.0.2' apply false - id 'com.android.library' version '8.0.2' apply false - id 'org.jetbrains.kotlin.android' version '1.8.21' apply false - id 'org.jetbrains.kotlin.jvm' version '1.8.21' apply false + id 'com.android.application' version '8.1.0' apply false + id 'com.android.library' version '8.1.0' apply false + id 'org.jetbrains.kotlin.android' version '1.9.0' apply false + id 'org.jetbrains.kotlin.jvm' version '1.9.0' apply false } -task installGitHook(type: Copy) { +tasks.register('installGitHook', Copy) { from new File(rootProject.rootDir, 'git-hooks/pre-commit') from new File(rootProject.rootDir, 'git-hooks/pre-push') into { new File(rootProject.rootDir, '.git/hooks') } @@ -30,7 +32,7 @@ task installGitHook(type: Copy) { tasks.getByPath(':app:preBuild').dependsOn installGitHook subprojects { - tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { + tasks.withType(KotlinCompile).configureEach { kotlinOptions { if (project.findProperty("composeCompilerReports") == "true") { freeCompilerArgs += [