Skip to content

Commit

Permalink
Update detekt file
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelMesicek committed May 16, 2024
1 parent 2a698ac commit 09b62b6
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 25 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_no-blank-line-in-list = disabled
ktlint_standard_blank-line-before-declaration = disabled
ktlint_standard_annotation = disabled


10 changes: 6 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("MagicNumber")

plugins {
id("com.android.application")
kotlin("android")
Expand Down Expand Up @@ -46,12 +48,12 @@ android.apply {

compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions.apply {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}

composeOptions {
Expand Down Expand Up @@ -137,7 +139,7 @@ android.apply {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import kotlinx.serialization.modules.SerializersModule
class ApplicationModule {

@Provides
fun resources(@ApplicationContext context: Context): Resources = context.resources
fun resources(
@ApplicationContext context: Context,
): Resources = context.resources

@Provides
fun json(): Json = Json(from = Json.Default) {
Expand All @@ -31,6 +33,8 @@ class ApplicationModule {
}

@Provides
fun sharedPrefs(@ApplicationContext context: Context) =
fun sharedPrefs(
@ApplicationContext context: Context,
) =
PreferenceManager.getDefaultSharedPreferences(context)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package app.futured.androidprojecttemplate.navigation

import androidx.compose.animation.AnimatedContentScope
import androidx.compose.animation.AnimatedVisibilityScope
import androidx.compose.runtime.Composable
import androidx.compose.ui.window.DialogProperties
import androidx.navigation.NamedNavArgument
Expand Down Expand Up @@ -40,19 +39,19 @@ sealed class Destination(
route = "detail/{title}?subtitle={subtitle}?value={value}",
destinationScreen = { DetailScreen(navigation = it) },
arguments =
listOf(
navArgument("title") {
type = NavType.StringType
},
navArgument("subtitle") {
type = NavType.StringType
defaultValue = "Default subtitle"
},
navArgument("value") {
type = NavType.StringType
nullable = true
},
),
listOf(
navArgument("title") {
type = NavType.StringType
},
navArgument("subtitle") {
type = NavType.StringType
defaultValue = "Default subtitle"
},
navArgument("value") {
type = NavType.StringType
nullable = true
},
),
) {
fun buildRoute(title: String, subtitle: String?, value: String?): String = route
.withArgument("title", title)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("TopLevelPropertyNaming")

package app.futured.androidprojecttemplate.tools.compose

import android.content.res.Configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@file:OptIn(ExperimentalMaterial3Api::class)
@file:Suppress("PackageNaming")

package app.futured.androidprojecttemplate.ui.screens._templateScreen

Expand Down Expand Up @@ -99,8 +100,7 @@ object TEMPLATE {
@Composable
fun TEMPLATEContentPreview() = Showcase {
TEMPLATE.Content(
actions =
object : TEMPLATE.Actions {
actions = object : TEMPLATE.Actions {
override fun onNavigateBack() = Unit
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ object Home {
fun HomeContentPreview() {
Showcase {
Home.Content(
actions =
object : Home.Actions {
actions = object : Home.Actions {
override fun onNavigateToDetail() = Unit
override fun onIncrementCounter() = Unit
},
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Versions {
const val androidGradlePlugin = "8.4.0"

// plugins
const val detekt = "1.22.0"
const val detekt = "1.23.6"
const val ktlintGradle = "12.1.1"
const val ktlint = "1.2.1"

Expand Down

0 comments on commit 09b62b6

Please sign in to comment.