590 Commits

Author SHA1 Message Date
Phillip Webb
2f6651c3cb Don't use markdown syntax in javadoc or error messages
Closes gh-28408
2021-10-21 11:24:54 -07:00
Andy Wilkinson
273600bcdd Retain distinction between compile and runtime deps of optional deps
Previously, the optional configuration was added to the compile and
runtime classpaths of each source set and the the javadoc classpath
as well. This had a few disadvantages, the most notable of which is
that it meant that the configuration was ifrst resolved and then
the outcome of the resolution was added to the compile and runtime
classpaths. As a result, none of the attributes on the compile and
runtime classpaths were considered to influence variant selection.

This commit reworks the optional dependencies plugin so that the
compile and runtime classpaths of each source set are now configured
to extend from the optional configuration. This allows each
classpath configuration's attributes to influence the dependencies
that are selected from the optional configuration during resolution.
For example, when resolving the compile classpath, compile
dependencies (Usage.JAVA_API) will be selected and when resolving the
runtime classpath, runtime dependencies (Usage.JAVA_RUNTIME) will be
selected.

The above-described change means that runtime dependencies of an
optional dependencies will no longer leak into the compile classpath.
As a result of this, our Gradle plugin's test infrastructure has
been updated so that it no longer references runtime dependencies of
the Kotlin Gradle plugin at compile time.

Closes gh-27965
2021-09-13 10:47:14 +01:00
Andy Wilkinson
ffbd28b60a Polish "Polish access modifiers for test classes"
See gh-27736
2021-08-18 17:52:42 +01:00
izeye
8a425dedfd Polish access modifiers for test classes
See gh-27736
2021-08-18 17:38:40 +01:00
Andy Wilkinson
d4d1ca007e Mention productionRuntimeClasspath in the docs
Closes gh-27558
2021-08-10 10:44:57 +01:00
izeye
9f44cefc56 Use deprecated mainClassName in Gradle test
See gh-27537
2021-08-04 09:23:52 +02:00
Andy Wilkinson
5d9da7206e Limit use of deprecated mainClassName in Gradle plugin tests
Closes gh-27320
2021-07-26 15:21:44 +01:00
Phillip Webb
a76e5c043e Update copyright year of changed files 2021-06-23 21:01:45 -07:00
Madhura Bhave
b790c82732 Apply exclusions to existing war entries
Update `RepackageMojo` and supporting classes so that `exclusions`
on the repackage goal apply to both the contributed libraries and any
existing jar entries already contained in the original war.

Prior to this commit, exclusions would apply to contributed jars (for
example, those in `WEB-INF/lib-provided`) but not jars that were
packaged directly into `WEB-INF/lib` by the war plugin

Fixes gh-15808

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2021-06-23 15:08:31 -07:00
Andy Wilkinson
e18eb08222 Fix additional metadata locations with config cache
Previously, a project with a dependency on Spring Boot's configuration
processor would fail to build when the configuration cache is enabled
due to it accessing the Project during task execution.

Instead of accessing the project during task execution, this commit
updates the code to retrieve the resource locations from the matching
source set in advance. The locations are then stored in the action
that configures the compile task when needed.

Closes gh-26880
2021-06-21 14:31:04 +01:00
Andy Wilkinson
cd808d2f18 Only get Kotlin plugin's version once we know we need it
Fixes gh-26946
2021-06-17 17:27:03 +01:00
Andy Wilkinson
16bfa669e1 Polish authors separators 2021-06-14 13:35:30 +01:00
Andy Wilkinson
f6b7730dac Use Asciidoctor's revision line to provide document's version
Using the revision line means that the revision number is automatically
set. The revision number is then included by the HTML and PDF backends
in the standard location. In the HTML backend that's alongside the
list of authors. In the PDF backend that's on the title page.

Closes gh-26851
2021-06-14 13:24:01 +01:00
Andy Wilkinson
a1c5fcca58 Move common Asciidoctor configuration into our conventions
Closes gh-26620
2021-06-09 18:00:45 +01:00
Phillip Webb
4d62e47c5d Merge branch '2.3.x' into 2.4.x 2021-06-08 18:05:12 -07:00
Phillip Webb
49c30854af Rename PRODUCTION_RUNTIME_CLASSPATH_NAME
Rename the now public constant for consistency with the JavaPlugin.

See gh-26686
2021-05-27 13:14:16 -07:00
Phillip Webb
1e0ae9d5e3 Make PRODUCTION_RUNTIME_CLASSPATH_NAME public
Change `SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME` from package
private to public so that it can be accessed in user build scripts.

Fixes gh-26686
2021-05-27 12:07:35 -07:00
Scott Frederick
8ac297d6f3 Merge branch '2.3.x' into 2.4.x
Closes gh-25839
2021-05-12 14:57:40 -05:00
Scott Frederick
32d378a348 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
2021-05-12 14:51:45 -05:00
Andy Wilkinson
e29d2e208e Merge branch '2.3.x' into 2.4.x 2021-05-12 17:40:48 +01:00
Andy Wilkinson
b3af6d6403 Polish
See gh-25798
2021-05-12 17:40:33 +01:00
Andy Wilkinson
fe4d20c976 Merge branch '2.3.x' into 2.4.x
Closes gh-26411
2021-05-07 11:25:10 +01:00
Andy Wilkinson
6daf67a88c Upgrade to Gradle 6.9
Closes gh-26408
2021-05-07 11:21:24 +01:00
Andy Wilkinson
fe696ee22a Merge branch '2.3.x' into 2.4.x
Closes gh-26396
2021-05-06 20:11:59 +01:00
Andy Wilkinson
ef9e3bafff Test our Gradle plugin against 6.9-rc-2
Closes gh-26395
2021-05-06 20:10:54 +01:00
Andy Wilkinson
f7fae8f0f2 Merge branch '2.3.x' into 2.4.x
Closes gh-26364
2021-05-05 09:52:53 +01:00
Andy Wilkinson
b3275c5647 Align productionRuntimeClasspath with runtimeClasspath
Fixes gh-25798
2021-05-05 09:52:44 +01:00
Andy Wilkinson
c0fe23181c Merge branch '2.3.x' into 2.4.x
Closes gh-26329
2021-04-30 16:55:10 +01:00
Andy Wilkinson
94ca2d1e78 Test the Gradle plugin against Gradle 6.9-rc-1
Closes gh-26267
2021-04-30 16:52:52 +01:00
Andy Wilkinson
94519c33b1 Merge branch '2.3.x' into 2.4.x
Closes gh-26300
2021-04-29 11:36:15 +01:00
Andy Wilkinson
ef5fbb0669 Configure bootBuildImage's targetJavaVersion using a provider
Previously, the targetJavaVersion property of bootBuildImage was set
using the project's target compatibility directly. This meant that
property's value would reflect the configured target compatibility at
the time of the task's creation and any subsequent changes to the
target compatibility would be missed.

This commit updates the registration of the bootBuildImage task to set
the value of the targetJavaVersion property using a provider. This
indirection means that the project's target compatibility isn't read
until the value of the targetJavaVersion is read, allowing any changes
to the target compatibility to be picked up even if they're made after
the bootBuildImage task has been created.

Fixes gh-26297
2021-04-29 11:36:03 +01:00
Andy Wilkinson
a1138efc5f Merge branch '2.3.x' into 2.4.x
Closes gh-26256
2021-04-27 15:18:23 +01:00
Andy Wilkinson
a470c1af3a Align documentation with main default branch name
Closes gh-26255
2021-04-27 15:18:00 +01:00
Andy Wilkinson
bc1a462143 Merge branch '2.3.x' into 2.4.x
Closes gh-26168
2021-04-20 11:19:10 +01:00
Andy Wilkinson
82198a99e0 Polish nohttp configuration
Closes gh-26166
2021-04-20 11:15:13 +01:00
Scott Frederick
6a7f1f1c56 Merge branch '2.3.x' into 2.4.x
Closes gh-25992
2021-04-09 14:11:47 -05:00
Scott Frederick
e19443093d Document runtime JVM configuration when building an image
Fixes gh-21478
2021-04-09 14:06:24 -05:00
Andy Wilkinson
e9ce20dbf4 Revert "Merge branch '2.3.x' into 2.4.x"
This reverts commit 586ce00e06aad0532b9bb4753baa343b0f9acff7, reversing
changes made to 563b8a8cecb29911828701aa211a9b43663f72c6.

See gh-25839
2021-04-07 10:19:20 +01:00
Andy Wilkinson
b35d1ec6e8 Revert "Use test harness for image building integration tests"
This reverts commit da9d8d6055dd458419e4268a7924f7abd33ee919.

See gh-25838
2021-04-07 09:30:51 +01:00
Scott Frederick
586ce00e06 Merge branch '2.3.x' into 2.4.x
Closes gh-25839
2021-03-30 17:39:10 -05:00
Scott Frederick
da9d8d6055 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
2021-03-30 16:48:28 -05:00
Phillip Webb
a28a3ae090 Merge branch '2.3.x' into 2.4.x 2021-03-30 09:25:46 -07:00
Phillip Webb
9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
2021-03-30 09:20:30 -07:00
Phillip Webb
a0f5169966 Polish 2021-03-29 15:51:13 -07:00
Phillip Webb
363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
2021-03-29 15:46:50 -07:00
Phillip Webb
26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
2021-03-29 15:44:58 -07:00
dreis2211
89a44f3da4 Fix some assertions
See gh-25499
2021-03-05 09:56:55 +01:00
Andy Wilkinson
1ce6e796fe Polish "Allow the project to be built with Java 16"
See gh-25171
2021-03-04 18:54:58 +00:00
dreis2211
1ccd8dae8a Allow the project to be built with Java 16
See gh-25171
2021-03-04 18:54:56 +00:00
Scott Frederick
afb60d6161 Add tests for Gradle examples used in plugin docs
Fixes gh-25468
2021-03-01 15:22:15 -06:00