Merge branch '2.0.x'

This commit is contained in:
Andy Wilkinson
2018-11-23 14:01:12 +00:00
5 changed files with 96 additions and 2 deletions

View File

@@ -93,11 +93,26 @@ public interface BootArchive extends Task {
/**
* Adds files to the classpath to include in the archive. The given {@code classpath}
* are evaluated as per {@link Project#files(Object...)}.
* is evaluated as per {@link Project#files(Object...)}.
* @param classpath the additions to the classpath
*/
void classpath(Object... classpath);
/**
* Sets the classpath to include in the archive. The given {@code classpath} is
* evaluated as per {@link Project#files(Object...)}.
* @param classpath the classpath
* @since 2.0.7
*/
void setClasspath(Object classpath);
/**
* Sets the classpath to include in the archive.
* @param classpath the classpath
* @since 2.0.7
*/
void setClasspath(FileCollection classpath);
/**
* Returns {@code true} if the Devtools jar should be excluded, otherwise
* {@code false}.

View File

@@ -129,6 +129,14 @@ public class BootJar extends Jar implements BootArchive {
classpath);
}
public void setClasspath(Object classpath) {
this.classpath = getProject().files(classpath);
}
public void setClasspath(FileCollection classpath) {
this.classpath = getProject().files(classpath);
}
@Override
public boolean isExcludeDevtools() {
return this.support.isExcludeDevtools();

View File

@@ -120,7 +120,7 @@ public class BootWar extends War implements BootArchive {
/**
* Adds files to the provided classpath to include in the {@code WEB-INF/lib-provided}
* directory of the war. The given {@code classpath} are evaluated as per
* directory of the war. The given {@code classpath} is evaluated as per
* {@link Project#files(Object...)}.
* @param classpath the additions to the classpath
*/
@@ -131,6 +131,27 @@ public class BootWar extends War implements BootArchive {
classpath);
}
/**
* Sets the provided classpath to include in the {@code WEB-INF/lib-provided}
* directory of the war.
* @param classpath the classpath
* @since 2.0.7
*/
public void setProvidedClasspath(FileCollection classpath) {
this.providedClasspath = getProject().files(classpath);
}
/**
* Sets the provided classpath to include in the {@code WEB-INF/lib-provided}
* directory of the war. The given {@code classpath} is evaluated as per
* {@link Project#files(Object...)}.
* @param classpath the classpath
* @since 2.0.7
*/
public void setProvidedClasspath(Object classpath) {
this.providedClasspath = getProject().files(classpath);
}
@Override
public boolean isExcludeDevtools() {
return this.support.isExcludeDevtools();