diff options
| author | Charles Lombardo <clombardo169@gmail.com> | 2023-06-16 00:06:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-16 00:06:55 -0400 |
| commit | 9dd52019a9be8ceff18c40806b783ec45c2973e7 (patch) | |
| tree | f2891c9dfb0990dfc1f6b9f8115b4888a9756634 /src/android/app/build.gradle.kts | |
| parent | 9a04793ae865b7dba009d3133950636eb7ede845 (diff) | |
| parent | d0be850f25625ecc59022d127c91f83b11c5662e (diff) | |
Merge pull request #10767 from t895/lint
android: Linting
Diffstat (limited to 'src/android/app/build.gradle.kts')
| -rw-r--r-- | src/android/app/build.gradle.kts | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index a637db78a..7ae538cf9 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -2,7 +2,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later import android.annotation.SuppressLint +import kotlin.collections.setOf import org.jetbrains.kotlin.konan.properties.Properties +import org.jlleitschuh.gradle.ktlint.reporter.ReporterType plugins { id("com.android.application") @@ -10,6 +12,7 @@ plugins { id("kotlin-parcelize") kotlin("plugin.serialization") version "1.8.21" id("androidx.navigation.safeargs.kotlin") + id("org.jlleitschuh.gradle.ktlint") version "11.4.0" } /** @@ -44,16 +47,6 @@ android { jniLibs.useLegacyPackaging = true } - lint { - // This is important as it will run lint but not abort on error - // Lint has some overly obnoxious "errors" that should really be warnings - abortOnError = false - - //Uncomment disable lines for test builds... - //disable 'MissingTranslation'bin - //disable 'ExtraTranslation' - } - defaultConfig { // TODO If this is ever modified, change application_id in strings.xml applicationId = "org.yuzu.yuzu_emu" @@ -167,6 +160,23 @@ android { } } +tasks.getByPath("preBuild").dependsOn("ktlintCheck") + +ktlint { + version.set("0.47.0") + android.set(true) + ignoreFailures.set(false) + disabledRules.set( + setOf( + "no-wildcard-imports", + "package-name" + ) + ) + reporters { + reporter(ReporterType.CHECKSTYLE) + } +} + dependencies { implementation("androidx.core:core-ktx:1.10.1") implementation("androidx.appcompat:appcompat:1.6.1") |
