Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
d43b1ae3
Commit
d43b1ae3
authored
Apr 03, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish the Gradle plugin's javadoc
parent
b6a4056e
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
73 additions
and
3 deletions
+73
-3
SpringBootExtension.java
.../springframework/boot/gradle/dsl/SpringBootExtension.java
+1
-0
PluginApplicationAction.java
...framework/boot/gradle/plugin/PluginApplicationAction.java
+6
-0
SpringBootPlugin.java
.../springframework/boot/gradle/plugin/SpringBootPlugin.java
+10
-0
UnresolvedDependenciesAnalyzer.java
...rk/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java
+1
-1
BootArchive.java
...ringframework/boot/gradle/tasks/bundling/BootArchive.java
+1
-0
BootJar.java
...g/springframework/boot/gradle/tasks/bundling/BootJar.java
+4
-0
BootWar.java
...g/springframework/boot/gradle/tasks/bundling/BootWar.java
+13
-2
LaunchScriptConfiguration.java
...boot/gradle/tasks/bundling/LaunchScriptConfiguration.java
+35
-0
ZipCompression.java
...gframework/boot/gradle/tasks/bundling/ZipCompression.java
+1
-0
BootRun.java
...va/org/springframework/boot/gradle/tasks/run/BootRun.java
+1
-0
No files found.
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/dsl/SpringBootExtension.java
View file @
d43b1ae3
...
...
@@ -33,6 +33,7 @@ import org.springframework.boot.gradle.tasks.buildinfo.BuildInfoProperties;
* Entry point to Spring Boot's Gradle DSL.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public
class
SpringBootExtension
{
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/PluginApplicationAction.java
View file @
d43b1ae3
...
...
@@ -28,6 +28,12 @@ import org.gradle.api.Project;
*/
interface
PluginApplicationAction
extends
Action
<
Project
>
{
/**
* The class of the {@code Plugin} that, when applied, will trigger the execution of
* this action.
*
* @return the plugin class
*/
Class
<?
extends
Plugin
<?
extends
Project
>>
getPluginClass
();
}
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java
View file @
d43b1ae3
...
...
@@ -39,26 +39,36 @@ public class SpringBootPlugin implements Plugin<Project> {
/**
* The name of the {@link Configuration} that contains Spring Boot archives.
*
* @since 2.0.0
*/
public
static
final
String
BOOT_ARCHIVES_CONFIURATION_NAME
=
"bootArchives"
;
/**
* The name of the {@link SoftwareComponent} for a Spring Boot Java application.
*
* @since 2.0.0
*/
public
static
final
String
BOOT_JAVA_SOFTWARE_COMPONENT_NAME
=
"bootJava"
;
/**
* The name of the {@link SoftwareComponent} for a Spring Boot Web application.
*
* @since 2.0.0
*/
public
static
final
String
BOOT_WEB_SOFTWARE_COMPONENT_NAME
=
"bootWeb"
;
/**
* The name of the default {@link BootJar} task.
*
* @since 2.0.0
*/
public
static
final
String
BOOT_JAR_TASK_NAME
=
"bootJar"
;
/**
* The name of the default {@link BootWar} task.
*
* @since 2.0.0
*/
public
static
final
String
BOOT_WAR_TASK_NAME
=
"bootWar"
;
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java
View file @
d43b1ae3
...
...
@@ -40,7 +40,7 @@ class UnresolvedDependenciesAnalyzer {
private
Set
<
ModuleVersionSelector
>
dependenciesWithNoVersion
=
new
HashSet
<>();
public
void
analyze
(
Set
<
UnresolvedDependency
>
unresolvedDependencies
)
{
void
analyze
(
Set
<
UnresolvedDependency
>
unresolvedDependencies
)
{
this
.
dependenciesWithNoVersion
=
unresolvedDependencies
.
stream
()
.
map
(
unresolvedDependency
->
unresolvedDependency
.
getSelector
())
.
filter
(
this
::
hasNoVersion
).
collect
(
Collectors
.
toSet
());
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchive.java
View file @
d43b1ae3
...
...
@@ -30,6 +30,7 @@ import org.gradle.api.tasks.Optional;
* A Spring Boot "fat" archive task.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public
interface
BootArchive
extends
Task
{
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java
View file @
d43b1ae3
...
...
@@ -33,6 +33,7 @@ import org.gradle.api.tasks.bundling.Jar;
* A custom {@link Jar} task that produces a Spring Boot executable jar.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public
class
BootJar
extends
Jar
implements
BootArchive
{
...
...
@@ -43,6 +44,9 @@ public class BootJar extends Jar implements BootArchive {
private
String
mainClass
;
/**
* Creates a new {@code BootJar} task.
*/
public
BootJar
()
{
CopySpec
bootInf
=
getRootSpec
().
addChildBeforeSpec
(
getMainSpec
())
.
into
(
"BOOT-INF"
);
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java
View file @
d43b1ae3
...
...
@@ -34,6 +34,7 @@ import org.gradle.api.tasks.bundling.War;
* A custom {@link War} task that produces a Spring Boot executable war.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public
class
BootWar
extends
War
implements
BootArchive
{
...
...
@@ -44,6 +45,9 @@ public class BootWar extends War implements BootArchive {
private
FileCollection
providedClasspath
;
/**
* Creates a new {@code BootWar} task.
*/
public
BootWar
()
{
getWebInf
().
into
(
"lib-provided"
,
copySpec
->
copySpec
...
...
@@ -92,14 +96,21 @@ public class BootWar extends War implements BootArchive {
action
.
execute
(
getLaunchScript
());
}
/**
* Returns the provided classpath, the contents of which will be included in the
* {@code WEB-INF/lib-provided} directory of the war.
*
* @return the provided classpath
*/
@Optional
public
FileCollection
getProvidedClasspath
()
{
return
this
.
providedClasspath
;
}
/**
* Adds files to the provided classpath to include in the war. The given
* {@code classpath} are evaluated as per {@link Project#files(Object...)}.
* 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
* {@link Project#files(Object...)}.
*
* @param classpath the additions to the classpath
*/
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/LaunchScriptConfiguration.java
View file @
d43b1ae3
...
...
@@ -28,6 +28,7 @@ import org.springframework.boot.loader.tools.FileUtils;
* Encapsulates the configuration of the launch script for an executable jar or war.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public
class
LaunchScriptConfiguration
implements
Serializable
{
...
...
@@ -37,26 +38,60 @@ public class LaunchScriptConfiguration implements Serializable {
private
File
script
;
/**
* Returns whether the launch script is included. Defaults to {@code false}.
*
* @return {@code true} is the script is included, otherwise {@code false}.
*/
public
boolean
isIncluded
()
{
return
this
.
included
;
}
/**
* Sets whether the launch script is included. Defaults to {@code false}.
*
* @param included {@code true} is the script is included, otherwise {@code false}.
*/
public
void
setIncluded
(
boolean
included
)
{
this
.
included
=
included
;
}
/**
* Returns the properties that are applied to the launch script when it's being
* including in the executable archive.
*
* @return the properties
*/
public
Map
<
String
,
String
>
getProperties
()
{
return
this
.
properties
;
}
/**
* Sets the properties that are applied to the launch script when it's being including
* in the executable archive.
*
* @param properties the properties
*/
public
void
properties
(
Map
<
String
,
String
>
properties
)
{
this
.
properties
.
putAll
(
properties
);
}
/**
* Returns the script {@link File} that will be included in the executable archive.
* When {@code null}, the default launch script will be used.
*
* @return the script file
*/
public
File
getScript
()
{
return
this
.
script
;
}
/**
* Sets the script {@link File} that will be included in the executable archive. When
* {@code null}, the default launch script will be used.
*
* @param script the script file
*/
public
void
setScript
(
File
script
)
{
this
.
script
=
script
;
}
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/ZipCompression.java
View file @
d43b1ae3
...
...
@@ -22,6 +22,7 @@ import java.util.zip.ZipEntry;
* An enumeration of supported compression options for an entry in a ZIP archive.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public
enum
ZipCompression
{
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java
View file @
d43b1ae3
...
...
@@ -25,6 +25,7 @@ import org.gradle.api.tasks.SourceSetOutput;
* Custom {@link JavaExec} task for running a Spring Boot application.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public
class
BootRun
extends
JavaExec
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment