I am using spring boot 2.1.2.RELEASE
and gradle 4.10
where I would like to create 2 jars, one is with simulator classes and the other without simulator classes. In boot 1.X I used to use the BootRepackage
to achieve the same which is deprecated in boot 2.0. Any suggestions on how to achieve this?
bootJar {
if(project.findProperty("simulator") == "true") {
baseName = "${rootProject.name}-simulator"
} else {
baseName = "${rootProject.name}"
exclude(['com/sample/app/simulator/**'])
}
version = appVersion
manifest {
attributes(
"Implementation-Title": baseName,
"Implementation-Version": version
)
}
}