How to allow running plugin in a Linux Container build with source mounted from Windows #2591
Unanswered
slominskir
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After upgrading to the latest version from a very old version I'm now running into a build problem. I've got the plugin working in a Gradle project in the simple general case, but when I attempt to use the plugin inside a Docker build on Windows with a Linux Container it fails. The Docker build includes the current working directory (source files) as build context.
I was already working around line endings, which I corrected via .gitattributes (I'm using git), to ensure the files are always LF (even on Windows). However, the plugin now appears to get confused with paths during the
spotlessJava
task and mixes both UNIX and Windows paths. The Docker build that executes the Gradle build using the spotless plugin generates the following error, which indicates the paths detected by the plugin are a mix of both Container Linux and Host Windows:Using spotless plugin in a container build was working before with plugin version 6.25.0 and Gradle 7 (and Java 17). Upgrading to plugin version 7.2.1 and Gradle 9 (and Java 21) and I'm now seeing this issue.
I am using barebones config / defaults. The build.gradle includes:
Ideas? Do I need to override some default path setting maybe?
Beta Was this translation helpful? Give feedback.
All reactions