Commit Graph

310 Commits

Author SHA1 Message Date
Andy Wilkinson
7f5ca24ff9 Make Maven Central available to Gradle plugin's build 2017-04-04 16:47:05 +01:00
Andy Wilkinson
01166381a0 Provide separate documentation (API and reference) for Gradle plugin 2017-04-04 15:33:27 +01:00
Andy Wilkinson
d43b1ae3a5 Polish the Gradle plugin's javadoc 2017-04-04 15:33:27 +01:00
Andy Wilkinson
85267def3e Integration test the reaction to the Application plugin being applied 2017-04-04 15:33:27 +01:00
Andy Wilkinson
915c17b955 Integration test the reaction to the Maven plugin being applied 2017-04-04 15:33:27 +01:00
Andy Wilkinson
e552975a7a Integration test the reaction to the War plugin being applied 2017-04-04 15:33:27 +01:00
Andy Wilkinson
c1f2f8079b Integration test the reaction to the Java plugin being applied 2017-04-04 15:33:27 +01:00
Andy Wilkinson
b9b402e3db Rework BuildInfo to separate task and build info properties
Previously, the properties that applied to the BuildInfo task itself
and those that would be written into the build-info.properties file
were all configured on BuildInfo directly. This lack of separation
could be confusing.

This commit rework BuildInfo to separate the task's own properties
from those that are written into the build-info.properties file.

The task has also been updated so that changes to a project's
properties made after the task has been configured are reflected in
the build info properties.
2017-04-04 15:33:27 +01:00
Andy Wilkinson
201ea133e1 Guide users to apply dependency management plugin when resolution fails 2017-04-04 15:33:27 +01:00
Andy Wilkinson
8d55801c4d Restructure the code to enforce separation of plugin logic and tasks 2017-04-04 15:33:27 +01:00
Andy Wilkinson
1dc5c484f0 Use application plugin properties by convention when it is applied
bootRun's main and jvmArgs properties use mainClassName and
applicationDefaultJvmArgs respectively by convention.

bootJar and bootWar's mainClass property uses mainClassName by
convention.
2017-04-04 15:33:27 +01:00
Andy Wilkinson
188c9e0f42 Remove assumptions from BootInfo and move them to the DSL extension 2017-04-04 15:33:27 +01:00
Andy Wilkinson
5708eaf41b Simplify the DSL extension to provide a solid foundation 2017-04-04 15:33:27 +01:00
Andy Wilkinson
8048791ab2 Remove AgentPluginFeatures as they are undocumented
The current implementation is undocumented so it's not clear exactly
what it's intended to do. It also appears to overreach as, for
example, it affects every JavaExec task in a project.

We may need to reinstate something that's somewhat equivalent, but I'd
like to do that armed with more information about the intent of the
functionality and some specific problems that need to be solved.
2017-04-04 15:33:27 +01:00
Andy Wilkinson
f440b7b7e3 Move decision about an entry's compression out into BootJar and BootWar 2017-04-04 15:33:27 +01:00
Andy Wilkinson
5bf8f778e2 Don't write the default loader classes when a custom launcher is used 2017-04-04 15:33:27 +01:00
Andy Wilkinson
2b44ad9809 Rework BootRunTask to be more idiomatic and make fewer assumptions 2017-04-04 15:33:27 +01:00
Andy Wilkinson
6e7e42459b Exclude Devtools by default and provide an option to include it 2017-04-04 15:33:27 +01:00
Andy Wilkinson
d015714cba Add support for reproducible archives to BootJar and BootWar
Closes gh-8391
2017-04-04 15:33:27 +01:00
Andy Wilkinson
bc543ef08a Use a convention mapping for resolving main class from the classpath 2017-04-04 15:33:27 +01:00
Andy Wilkinson
d9af21ab7c Create software components for Spring Boot jar and war artifacts
Closes gh-1666
2017-04-04 15:33:27 +01:00
Andy Wilkinson
31febfa383 Create distribution for Boot jar or war when application plugin applied
Closes gh-2622
2017-04-04 15:33:27 +01:00
Andy Wilkinson
b4e2044b9e Simplify bootRun main class configuration by reusing MainClassSupplier 2017-04-04 15:33:27 +01:00
Andy Wilkinson
f16efb2277 Publish artifacts and, when Maven plugin used, customize upload task
See gh-1666
2017-04-04 15:33:27 +01:00
Andy Wilkinson
b1f9123311 React to dependency management plugin rather than always applying it
Previously, the Spring Boot plugin would automatically apply the
dependency management plugin and import the spring-boot-dependencies
bom. This made it very difficult to use Spring Boot's plugin without
also using its dependency management. It also made it difficult to
see where the dependency management was coming from.

This commit updates the Spring Boot plugin so that it no longer
automatically applies the dependency management plugin. Instead, the
plugin now reacts to the dependency management plugin being applied
by importing the spring-boot-dependencies bom. Users that do not
wish to use Spring Boot's dependency management capabilities can now
do so by not applying the dependency management plugin.

Closes gh-3164
2017-04-04 15:33:27 +01:00
Andy Wilkinson
2ce8556976 Introduce bootJar and bootWar tasks for creating fat jars and wars
Previously, the BootRepackage task would take the output of a Jar
or War task and repackage it in a similar manner to Spring Boot's
Maven plugin. This caused several problems in Gradle including
broken up-to-date checks and a lack of configurability. See the issues
referenced below for full details.

This commit replaces BootRepackage with BootJar and BootWar
for building executable jars and wars respectively. BootJar extends
Gradle's standard Jar task and BootWar extends Gradle's standard War
task. This means that terms of configuration, the creation of
executable jars and wars is now as flexible as the creation of
standards jars and wars.

Closes gh-8167
Closes gh-8099
Closes gh-6846
Closes gh-5861
Closes gh-5393
Closes gh-5259
Closes gh-3931
2017-04-04 15:33:27 +01:00
Andy Wilkinson
20fe95b276 React to the Java plugin being applied rather than always applying it 2017-04-04 15:33:27 +01:00
Andy Wilkinson
9b15e6b5a3 Use Gradle, executed by Maven, to build the Gradle plugin 2017-04-04 15:33:27 +01:00
Andy Wilkinson
b35c162593 Raise the minimum supported version of Gradle to 3.4
Closes gh-7922
2017-03-11 09:03:06 +00:00
Phillip Webb
d8f827d224 Cleanup and format code 2017-03-06 17:08:09 -08:00
Phillip Webb
425dbc3e52 Update copyright header for edited files 2017-03-06 15:04:07 -08:00
Phillip Webb
a4bcd20b64 Merge branch '1.5.x' 2017-02-27 20:43:18 -08:00
Phillip Webb
5867cd6175 Polish 2017-02-27 20:41:18 -08:00
Andy Wilkinson
ff9788c625 Merge branch '1.5.x' 2017-02-16 09:46:26 +00:00
Andy Wilkinson
f67dd957b1 Ignore excludeDevtools on extension when it has been set on bootRepackage
Previously, bootRepackage's excludeDevtools property would be
overridden by the springBoot extension's excludeDevtools property.
This prevented devtools from being included by configuring it on the
repackaging task.

This commit corrects the logic so that the setting on the repackaging
task takes priority. It also adds some tests to verify the behaviour.

Closes gh-8308
2017-02-16 09:45:51 +00:00
Andy Wilkinson
c14a550632 Merge branch '1.5.x' 2017-02-08 22:05:06 +00:00
Andy Wilkinson
b931f564e6 Work around Gradle 3.3's overzealous deprecation warning
In Gradle 3.3, when an API that will be removed in 4.0 is called, a
deprecation warning is output as part of the build. Users have noticed
his warning and, quite reasonably, complained about it. Unfortunately,
avoiding the warning requires the use of an API that was introduced in
Gradle 3.x which we can't use directly as we want to remain compatible
with Gradle 2.x.

This commit introduces the use of reflection to call
ProjectDependency.getTargetConfiguration() via reflection when it's
available (Gradle 3) and ProjectDependency.getProjectConfiguration()
when it's not (Gradle 2).

Closes gh-8154
2017-02-08 22:03:55 +00:00
Spring Buildmaster
5c12500366 Next Development Version 2017-01-30 20:10:13 +00:00
Spring Buildmaster
a2696bf873 Next Development Version 2017-01-30 11:40:24 +00:00
Eddú Meléndez
3d52c86a21 Annotate interfaces with @FunctionaInterface
Closes gh-6857
2017-01-27 16:41:01 +00:00
Phillip Webb
3d619da553 Polish 2017-01-25 16:56:22 -08:00
Andy Wilkinson
bdf903896f Remove support for module layout
Closes gh-8107
2017-01-25 16:49:37 +00:00
Andy Wilkinson
3ce6d8e5b5 Merge branch '1.5.x' 2017-01-25 16:41:13 +00:00
Andy Wilkinson
cd5124005b Deprecate support for module layout
Closes gh-8008
2017-01-25 16:40:42 +00:00
Andy Wilkinson
1d4cee9460 Drop support for the old spring-boot Gradle plugin ID
Closes gh-7859
2017-01-13 06:47:02 -05:00
Andy Wilkinson
6fd27566af Merge branch '1.5.x' 2017-01-03 13:15:09 +00:00
Andy Wilkinson
6ced8abb86 Update the copyright header to 2017 2017-01-03 13:14:55 +00:00
Andy Wilkinson
6b1a80ac2a Merge branch '1.5.x' 2017-01-03 13:12:40 +00:00
Andy Wilkinson
dac249fb0d Replace use of Gradle API that's bean deprecated in 3.x
Closes gh-7734
2017-01-03 13:05:48 +00:00
Phillip Webb
53f1df86a2 Merge branch '1.5.x' 2016-12-30 12:17:28 -08:00