-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Biome Step breaks Gradle Dependency Resolution Management #2187
Labels
Comments
blutorange
pushed a commit
to blutorange/spotless
that referenced
this issue
Sep 12, 2024
…2187 Use the Gradle user home directory by default for the download directory for the biome executable. Previously, the plugin tried to use Maven's home directory, which is not always accessible by a Gradle plugin. According to the [Gradle docs](https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api.invocation/-gradle/get-gradle-user-home-dir.html), the user home directory > is used to cache downloaded resources, compiled build scripts and so on. From that description, it seems to me to be the proper location for the biome executable.
2 tasks
nedtwigg
added a commit
that referenced
this issue
Sep 27, 2024
Released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Situation: Our build is using Gradles
dependencyResolutionManagement
feature to centralize repository configuration in a multi-project setup. This involves setting up the list of repositories in settings.gradle. Please note that declaring any repository in a subproject will make that subproject ignore the centralized configuration completely, which is why we setrepositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
.Bug: When adding
biome()
to the spotless configuration, it will internally addmavenLocal()
to the project temporarily to determine a suitable download directory. This sadly causes the Gradle validation to trip and crash the build with the following stack trace:The exception is:
Here is a minimal build.gradle / settings.gradle to reproduce this problem:
build.gradle
settings.gradle
We are currently working around this problem by avoiding
biome()
and manually constructing the step, configuring thedownloadDir
(we have to catch the exception when it tries to replace the non-existent step), and then adding the step.What this would need in Spotless is either a different approach to selecting a download directory altogether, or at least the ability to customize the BiomeStepConfig before the step is actually created, without throwing exceptions.
The text was updated successfully, but these errors were encountered: