diff options
Diffstat (limited to 'src/android/app/build.gradle.kts')
| -rw-r--r-- | src/android/app/build.gradle.kts | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index a637db78a..bab4f4d0f 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts | |||
| @@ -2,7 +2,9 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-3.0-or-later | 2 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 3 | 3 | ||
| 4 | import android.annotation.SuppressLint | 4 | import android.annotation.SuppressLint |
| 5 | import kotlin.collections.setOf | ||
| 5 | import org.jetbrains.kotlin.konan.properties.Properties | 6 | import org.jetbrains.kotlin.konan.properties.Properties |
| 7 | import org.jlleitschuh.gradle.ktlint.reporter.ReporterType | ||
| 6 | 8 | ||
| 7 | plugins { | 9 | plugins { |
| 8 | id("com.android.application") | 10 | id("com.android.application") |
| @@ -10,6 +12,7 @@ plugins { | |||
| 10 | id("kotlin-parcelize") | 12 | id("kotlin-parcelize") |
| 11 | kotlin("plugin.serialization") version "1.8.21" | 13 | kotlin("plugin.serialization") version "1.8.21" |
| 12 | id("androidx.navigation.safeargs.kotlin") | 14 | id("androidx.navigation.safeargs.kotlin") |
| 15 | id("org.jlleitschuh.gradle.ktlint") version "11.4.0" | ||
| 13 | } | 16 | } |
| 14 | 17 | ||
| 15 | /** | 18 | /** |
| @@ -44,16 +47,6 @@ android { | |||
| 44 | jniLibs.useLegacyPackaging = true | 47 | jniLibs.useLegacyPackaging = true |
| 45 | } | 48 | } |
| 46 | 49 | ||
| 47 | lint { | ||
| 48 | // This is important as it will run lint but not abort on error | ||
| 49 | // Lint has some overly obnoxious "errors" that should really be warnings | ||
| 50 | abortOnError = false | ||
| 51 | |||
| 52 | //Uncomment disable lines for test builds... | ||
| 53 | //disable 'MissingTranslation'bin | ||
| 54 | //disable 'ExtraTranslation' | ||
| 55 | } | ||
| 56 | |||
| 57 | defaultConfig { | 50 | defaultConfig { |
| 58 | // TODO If this is ever modified, change application_id in strings.xml | 51 | // TODO If this is ever modified, change application_id in strings.xml |
| 59 | applicationId = "org.yuzu.yuzu_emu" | 52 | applicationId = "org.yuzu.yuzu_emu" |
| @@ -167,6 +160,24 @@ android { | |||
| 167 | } | 160 | } |
| 168 | } | 161 | } |
| 169 | 162 | ||
| 163 | tasks.getByPath("preBuild").dependsOn("ktlintCheck") | ||
| 164 | |||
| 165 | ktlint { | ||
| 166 | version.set("0.47.1") | ||
| 167 | android.set(true) | ||
| 168 | ignoreFailures.set(false) | ||
| 169 | disabledRules.set( | ||
| 170 | setOf( | ||
| 171 | "no-wildcard-imports", | ||
| 172 | "package-name", | ||
| 173 | "import-ordering" | ||
| 174 | ) | ||
| 175 | ) | ||
| 176 | reporters { | ||
| 177 | reporter(ReporterType.CHECKSTYLE) | ||
| 178 | } | ||
| 179 | } | ||
| 180 | |||
| 170 | dependencies { | 181 | dependencies { |
| 171 | implementation("androidx.core:core-ktx:1.10.1") | 182 | implementation("androidx.core:core-ktx:1.10.1") |
| 172 | implementation("androidx.appcompat:appcompat:1.6.1") | 183 | implementation("androidx.appcompat:appcompat:1.6.1") |