-
Notifications
You must be signed in to change notification settings - Fork 120
SourceSet excludes impacts JAR packaging #39
Copy link
Copy link
Closed
Description
If I add the following to my build.gradle script:
license {
header rootProject.file('../LICENSE_HEADER.txt')
strictCheck true
mapping {
java='SLASHSTAR_STYLE'
groovy='SLASHSTAR_STYLE'
}
sourceSets {
main {
resources {
exclude '**/*.properties'
}
}
}
}the plugin correctly skips checking the header on any files in the src/main/resources source folder. However, it appears to also have the side effect of excluding those artifacts from the packaged JAR. My guess is that it is updating the global sourceSets for the build script. This should probably be changed to have a separate excludes configuration property like the corresponding Maven plugin:
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.9.0</version>
<configuration>
<header>${licensePath}</header>
<excludes>
<exclude>**/*.properties</exclude>
</excludes>
<mapping>
<java>SLASHSTAR_STYLE</java>
<groovy>SLASHSTAR_STYLE</groovy>
</mapping>
<strictCheck>true</strictCheck>
</configuration>
</plugin>Of course, if I could figure out why it fails the check on the license in a properties file, this would be a lesser issue (though still something I believe is worth correcting).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels