diffplug / diffplug/spotless

Configuration 'spotless-*' was resolved during configuration time

Offen
#1,380 13 Kommentare 17 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug-unconfirmed
Vorherrschende Sprache
Java
Sterne
5.6k
Forks
559
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
43

Beschreibung

Starting to get this warning every time I run spotlessApply command on my new Android app project.

```
Configuration 'spotless-1972454365' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
```

I'm using Gradle 7.4 and here's my root `build.gradle.kts`.

```
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "7.3.0" apply false
id("com.android.library") version "7.3.0" apply false
id("org.jetbrains.kotlin.android") version "1.7.10" apply false
id("com.diffplug.spotless") version "6.11.0"
}

subprojects {
apply(plugin = "com.diffplug.spotless")

spotless {
kotlin {
target("**/*.kt")
targetExclude("$buildDir/**/*.kt", "bin/**/*.kt")
ktlint("0.45.2").userData(mapOf("android" to "true"))
trimTrailingWhitespace()
endWithNewline()
}
}
}
```

How do I make that warning go away?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Konfiguration der build.gradle.kts im Stammverzeichnis und reproduziere die Warnung, indem du spotlessApply in einem Android-Projekt mit Gradle 7.4 und Spotless 6.11.0 ausführst. Führe es wie vorgeschlagen mit --info aus und vergleiche die Auflösung zur Konfigurationszeit mit Gradle issue 2298; erledigt ist es, wenn die Warnung während spotlessApply nicht mehr erscheint.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, kotlin
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.