Revert Layout changes
This reverts commits: -974ec92ad6. -537e0c12c2. -500a3df6e9.
This commit is contained in:
@@ -21,13 +21,12 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import groovy.lang.Closure;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.JavaPlugin;
|
||||
|
||||
import org.springframework.boot.gradle.buildinfo.BuildInfo;
|
||||
import org.springframework.boot.loader.tools.Layout;
|
||||
import org.springframework.boot.loader.tools.LayoutType;
|
||||
import org.springframework.boot.loader.tools.Layouts;
|
||||
|
||||
/**
|
||||
* Gradle DSL Extension for 'Spring Boot'. Most of the time Spring Boot can guess the
|
||||
@@ -89,7 +88,7 @@ public class SpringBootPluginExtension {
|
||||
* the MANIFEST.MF 'Main-Class' to be PropertiesLauncher. Gradle will coerce literal
|
||||
* String values to the correct type.
|
||||
*/
|
||||
String layout;
|
||||
LayoutType layout;
|
||||
|
||||
/**
|
||||
* Libraries that must be unpacked from fat jars in order to run. Use Strings in the
|
||||
@@ -146,7 +145,7 @@ public class SpringBootPluginExtension {
|
||||
* @return the Layout to use or null if not explicitly set
|
||||
*/
|
||||
public Layout convertLayout() {
|
||||
return (this.layout == null ? null : LayoutType.layout(this.layout));
|
||||
return (this.layout == null ? null : this.layout.layout);
|
||||
}
|
||||
|
||||
public String getMainClass() {
|
||||
@@ -189,11 +188,11 @@ public class SpringBootPluginExtension {
|
||||
this.backupSource = backupSource;
|
||||
}
|
||||
|
||||
public String getLayout() {
|
||||
public LayoutType getLayout() {
|
||||
return this.layout;
|
||||
}
|
||||
|
||||
public void setLayout(String layout) {
|
||||
public void setLayout(LayoutType layout) {
|
||||
this.layout = layout;
|
||||
}
|
||||
|
||||
@@ -277,4 +276,29 @@ public class SpringBootPluginExtension {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Layout Types.
|
||||
*/
|
||||
enum LayoutType {
|
||||
|
||||
JAR(new Layouts.Jar()),
|
||||
|
||||
WAR(new Layouts.War()),
|
||||
|
||||
ZIP(new Layouts.Expanded()),
|
||||
|
||||
DIR(new Layouts.Expanded()),
|
||||
|
||||
MODULE(new Layouts.Module()),
|
||||
|
||||
NONE(new Layouts.None());
|
||||
|
||||
Layout layout;
|
||||
|
||||
LayoutType(Layout layout) {
|
||||
this.layout = layout;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user