maptool
maptool copied to clipboard
[Refactoring]: Stop writing build artifacts to the source directory
Describe the problem
Recently, in order to run MapTool from gradle, the :spotlessCheck
task is run first. This interferes with the edit-compile-run cycle as we now have to keep perfectly formatted code as we go or else MT won't run.
The improvement you'd like to see
The :configSentryRelease
task would be removed in favour of adding a configuration to processResources
. The :run
task would no longer directly or indirectly depend on :spotlessCheck
.
Expected Benefits
Developers will have a nicer time as they can make quick changes and test them out without having to run :spotlessApply
first.
This will make the build hygienic as build artifacts won't be written into the src/
directory. Instead, the :processResources
task can just "do the right thing" and pull the necessary files directly from /build-resources/
into /build/resources/main/
.
Additional Context
The current situation with spotless was introduced in 50cf08dfa to fix the implied task dependency. The suggestion here will avoid the situation that created that original implied dependency.
With this change, devs will have to do a one-time deletion of the stray src/main/resources/sentry.properties
file that is hanging around in their source tree.