Merge branch '2.0.x'
This commit is contained in:
commit
4ea7d3a767
|
|
@ -37,7 +37,7 @@ import org.gradle.api.tasks.bundling.Jar;
|
||||||
*/
|
*/
|
||||||
public class BootJar extends Jar implements BootArchive {
|
public class BootJar extends Jar implements BootArchive {
|
||||||
|
|
||||||
private BootArchiveSupport support = new BootArchiveSupport(
|
private final BootArchiveSupport support = new BootArchiveSupport(
|
||||||
"org.springframework.boot.loader.JarLauncher", this::resolveZipCompression);
|
"org.springframework.boot.loader.JarLauncher", this::resolveZipCompression);
|
||||||
|
|
||||||
private FileCollection classpath;
|
private FileCollection classpath;
|
||||||
|
|
@ -48,10 +48,8 @@ public class BootJar extends Jar implements BootArchive {
|
||||||
* Creates a new {@code BootJar} task.
|
* Creates a new {@code BootJar} task.
|
||||||
*/
|
*/
|
||||||
public BootJar() {
|
public BootJar() {
|
||||||
CopySpec bootInf = getRootSpec().addChildBeforeSpec(getMainSpec())
|
into("BOOT-INF/classes", classpathFiles(File::isDirectory));
|
||||||
.into("BOOT-INF");
|
into("BOOT-INF/lib", classpathFiles(File::isFile));
|
||||||
bootInf.into("classes", classpathFiles(File::isDirectory));
|
|
||||||
bootInf.into("lib", classpathFiles(File::isFile));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Action<CopySpec> classpathFiles(Spec<File> filter) {
|
private Action<CopySpec> classpathFiles(Spec<File> filter) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue