mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 10:58:23 +00:00
Android Studio's "Long overload to Duration conversion" inspection (ConvertLongToDurationInspection) only runs inside the IDE, so its findings never fail ./gradlew lint. Port it as a custom lint check in a new lint-rules module: calls to the kotlinx.coroutines timing functions (delay, withTimeout, debounce, ...) are flagged when the time argument is a Long/Int rather than a kotlin.time.Duration. Overloads cannot be told apart at the JVM level (Duration is a value class backed by long), so the check classifies the argument's Kotlin type via the bundled K2 analysis API. With warningsAsErrors already enabled, the pre-commit/pre-push hooks and CI now fail on any new legacy-Long call site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ho6LW6eEBkVnnpFvr5tvpi
21 lines
426 B
Kotlin
21 lines
426 B
Kotlin
pluginManagement {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
maven("https://jitpack.io")
|
|
}
|
|
}
|
|
|
|
dependencyResolutionManagement {
|
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven("https://jitpack.io")
|
|
}
|
|
}
|
|
rootProject.name = "Nostr Signer"
|
|
include(":app")
|
|
include(":lint-rules")
|