Skip to content

Commit

Permalink
Add new linter config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-BaptisteC committed Jan 3, 2024
1 parent 6faa7d2 commit f6bd68e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# editorconfig.org

root = true

[*.{kt,kts}]
ktlint_standard_package-name = disabled
9 changes: 7 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ plugins {
id("org.jetbrains.kotlin.android")
}

configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
version.set("0.50.0")
android.set(true)
}

android {
namespace = "org.eu.exodus_privacy.exodusprivacy"
compileSdk = 34
Expand All @@ -24,7 +29,7 @@ android {

ksp {
arg(
RoomSchemaArgProvider(File(projectDir, "schemas")),
RoomSchemaArgProvider(File(projectDir, "schemas"))
)
}

Expand Down Expand Up @@ -171,7 +176,7 @@ dependencies {
class RoomSchemaArgProvider(
@get:InputDirectory
@get:PathSensitive(PathSensitivity.RELATIVE)
val schemaDir: File,
val schemaDir: File
) : CommandLineArgumentProvider {
override fun asArguments() = listOf("room.schemaLocation=${schemaDir.path}")
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ class AppDetailFragment : Fragment(R.layout.fragment_app_detail) {
inflateMenu(R.menu.app_detail_menu)
if (app.exodusVersionCode == 0L) {
menu.findItem(R.id.openExodusPage)?.isVisible = false
} else menu.findItem(R.id.submitApp)?.isVisible = app.exodusVersionCode != app.versionCode
} else {
menu.findItem(R.id.submitApp)?.isVisible =
app.exodusVersionCode != app.versionCode
}
setOnMenuItemClickListener {
when (it.itemId) {
R.id.openExodusPage -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.eu.exodus_privacy.exodusprivacy.objects.Constants
autoMigrations = [
AutoMigration(
from = Constants.previousDatabaseVersion,
to = Constants.currentDatabaseVersion,
to = Constants.currentDatabaseVersion
)
]
)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
androidGradlePlugin = "8.1.4"
kotlinPlugin = "1.9.22"
gradleKtlint = "11.1.0"
gradleKtlint = "12.0.3"
activity-ktx = "1.8.1"
androidx-core = "1.5.0"
appcompat = "1.6.1"
Expand Down

0 comments on commit f6bd68e

Please sign in to comment.