From 1b8ae87b08ea1c6621c4e9a75d948d6525e3e7b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 05:27:44 +0000 Subject: [PATCH] Update dependency com.pinterest.ktlint:ktlint-cli to v1.6.0 (#2335) * Update dependency com.pinterest.ktlint:ktlint-cli to v1.6.0 * Fix spotless --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com> --- app/src/main/kotlin/com/hippo/ehviewer/util/FileUtils.kt | 6 +++--- gradle/libs.versions.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/hippo/ehviewer/util/FileUtils.kt b/app/src/main/kotlin/com/hippo/ehviewer/util/FileUtils.kt index 7076f116a..f3c5638e5 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/util/FileUtils.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/util/FileUtils.kt @@ -33,12 +33,12 @@ object FileUtils { fun ensureDirectory(file: File?) = file?.let { if (it.exists()) it.isDirectory else it.mkdirs() } == true /** - * Convert byte to human readable string.

- * http://stackoverflow.com/questions/3758606/ + * Convert byte to human readable string. * * @param bytes the bytes to convert * @return the human readable string */ + // http://stackoverflow.com/questions/3758606/ fun humanReadableByteCount(bytes: Long): String { if (bytes < 1024) return "$bytes B" val exp = (ln(bytes.toDouble()) / ln(1024f)).toInt() @@ -74,13 +74,13 @@ object FileUtils { else -> true } - // From https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/os/FileUtils.java;l=1142;drc=7b647e4ea0e92f33c19b315eaed364ee067ba0aa /** * Mutate the given filename to make it valid for a FAT filesystem, * replacing any invalid characters with "_". * * @param name the original filename */ + // From https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/os/FileUtils.java;l=1142;drc=7b647e4ea0e92f33c19b315eaed364ee067ba0aa fun sanitizeFilename(name: String): String { if (name.isEmpty() || "." == name || ".." == name) { return "(invalid)" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6cd916c8c..9b428ded8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -92,7 +92,7 @@ jsoup = "org.jsoup:jsoup:1.20.1" kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" } -ktlint = "com.pinterest.ktlint:ktlint-cli:1.5.0" +ktlint = "com.pinterest.ktlint:ktlint-cli:1.6.0" okhttp-bom = { module = "com.squareup.okhttp3:okhttp-bom", version.ref = "okhttp" } okhttp-android = { module = "com.squareup.okhttp3:okhttp-android" }