[#99] Ktlint 0.43.1
This commit is contained in:
parent
541ed915c1
commit
8e9f8037c7
|
@ -36,4 +36,5 @@ If you plan to fork the project to create a new app of your own, please make the
|
|||
1. Test coverage for Compose code will be low, due to [known limitations](https://github.com/jacoco/jacoco/issues/1208) in the interaction between Compose and Jacoco.
|
||||
1. Adding the `espresso-contrib` dependency will cause builds to fail, due to conflicting classes. This is a [known issue](https://github.com/zcash/zcash-android-wallet-sdk/issues/306) with the Zcash Android SDK.
|
||||
1. Android Studio will warn about the Gradle checksum. This is a [known issue](https://github.com/gradle/gradle/issues/9361) and can be safely ignored.
|
||||
1. During app first launch, the following exception starting with `AndroidKeysetManager: keyset not found, will generate a new one` is printed twice. This exception is not an error, and the code is not being invoked twice.
|
||||
1. During app first launch, the following exception starting with `AndroidKeysetManager: keyset not found, will generate a new one` is printed twice. This exception is not an error, and the code is not being invoked twice.
|
||||
1. The task `ktlintFormat` fails on Java 16 or greater. As a workaround, the task is run under Java 11. This requires that JDK 11 be installed, even if a newer JDK is also installed. While this is configured to use the Java toolchain API, [toolchain support for Java 11 does not work on Apple Silicon](https://github.com/gradle/gradle/issues/19140). [Azul Zulu](https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk) does offer JDK 11, which must be installed manually to run this task from the command line on Apple Silicon.
|
|
@ -5,7 +5,11 @@ plugins {
|
|||
val ktlint by configurations.creating
|
||||
|
||||
dependencies {
|
||||
ktlint("com.pinterest:ktlint:${project.property("KTLINT_VERSION")}")
|
||||
ktlint("com.pinterest:ktlint:${project.property("KTLINT_VERSION")}") {
|
||||
attributes {
|
||||
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named<Bundling>(Bundling.EXTERNAL))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
@ -20,6 +24,12 @@ tasks {
|
|||
}
|
||||
|
||||
register("ktlintFormat", org.gradle.api.tasks.JavaExec::class) {
|
||||
// Workaround for ktlint bug; force to run on an older JDK
|
||||
// https://github.com/pinterest/ktlint/issues/1274
|
||||
javaLauncher.set(javaToolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_11.majorVersion))
|
||||
})
|
||||
|
||||
description = "Apply code style formatting with ktlint"
|
||||
classpath = ktlint
|
||||
mainClass.set("com.pinterest.ktlint.Main")
|
||||
|
|
|
@ -48,7 +48,7 @@ ANDROID_NDK_VERSION=23.0.7599858
|
|||
ANDROID_GRADLE_PLUGIN_VERSION=7.0.3
|
||||
DETEKT_VERSION=1.18.1
|
||||
GRADLE_VERSIONS_PLUGIN_VERSION=0.39.0
|
||||
KTLINT_VERSION=0.42.1
|
||||
KTLINT_VERSION=0.43.1
|
||||
JGIT_VERSION=5.12.0.202106070339-r
|
||||
|
||||
ANDROIDX_ACTIVITY_VERSION=1.3.1
|
||||
|
|
Loading…
Reference in New Issue