Closed
Description
If Spotless has a licenseHeader
specified, it replaces everything between the top of the file and the package
statement with the license. This works for regular classes, but it doesn't work for package-info.java
files.
As a workaround, you can do this:
java {
target project.fileTree(project.rootDir) {
include '**/*.java'
exclude '**/package-info.java'
exclude 'spotless.license.java'
}
... (the rest of the config)
}
Spotless' default settings should play nicely with package-info.java
, but at the moment it's not a big enough problem for me to actually fix. If this is an actual problem for you, reply to this issue and I'll actually fix it.
Metadata
Metadata
Assignees
Labels
No labels