Commit Graph

1025 Commits (7bb337aeb173c9c6c304d48648a35d51d39a51fd)

Author SHA1 Message Date
Andy Wilkinson 07de9e3920 Merge branch '2.4.x' 4 years ago
Andy Wilkinson e29d2e208e Merge branch '2.3.x' into 2.4.x 4 years ago
Andy Wilkinson b3af6d6403 Polish
See gh-25798
4 years ago
dreis2211 ba2a4781d2 Test our Gradle Plugin against Gradle 7.0.1
See gh-26420
4 years ago
Phillip Webb 87d8aedd3c Use spring-pdf backend for PDF generation
Update `asciidoctorPdf` tasks to use the `spring-pdf` backend so that
chomped elements and @fold:on/@fold:off comments are hidden.

Closes gh-26373
4 years ago
Andy Wilkinson dc5f115c04 Document support for Gradle 6.9
Closes gh-26409
4 years ago
Andy Wilkinson b3071dab91 Merge branch '2.4.x'
Closes gh-26412
4 years ago
Andy Wilkinson fe4d20c976 Merge branch '2.3.x' into 2.4.x
Closes gh-26411
4 years ago
Andy Wilkinson 6daf67a88c Upgrade to Gradle 6.9
Closes gh-26408
4 years ago
Andy Wilkinson 2976fd9165 Merge branch '2.4.x'
Closes gh-26397
4 years ago
Andy Wilkinson fe696ee22a Merge branch '2.3.x' into 2.4.x
Closes gh-26396
4 years ago
Andy Wilkinson ef9e3bafff Test our Gradle plugin against 6.9-rc-2
Closes gh-26395
4 years ago
Andy Wilkinson aeea15be0f Merge branch '2.4.x'
Closes gh-26365
4 years ago
Andy Wilkinson f7fae8f0f2 Merge branch '2.3.x' into 2.4.x
Closes gh-26364
4 years ago
Andy Wilkinson b3275c5647 Align productionRuntimeClasspath with runtimeClasspath
Fixes gh-25798
4 years ago
Andy Wilkinson b976483852 Merge branch '2.4.x'
Closes gh-26330
4 years ago
Andy Wilkinson c0fe23181c Merge branch '2.3.x' into 2.4.x
Closes gh-26329
4 years ago
Andy Wilkinson 94ca2d1e78 Test the Gradle plugin against Gradle 6.9-rc-1
Closes gh-26267
4 years ago
Andy Wilkinson fa81b41afc Merge branch '2.4.x'
Closes gh-26301
4 years ago
Andy Wilkinson 94519c33b1 Merge branch '2.3.x' into 2.4.x
Closes gh-26300
4 years ago
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
4 years ago
Andy Wilkinson 6953da2013 Merge branch '2.4.x'
Closes gh-26257
4 years ago
Andy Wilkinson a1138efc5f Merge branch '2.3.x' into 2.4.x
Closes gh-26256
4 years ago
Andy Wilkinson a470c1af3a Align documentation with main default branch name
Closes gh-26255
4 years ago
Andy Wilkinson b9348c6d28 Merge branch '2.4.x'
Closes gh-26169
4 years ago
Andy Wilkinson bc1a462143 Merge branch '2.3.x' into 2.4.x
Closes gh-26168
4 years ago
Andy Wilkinson 82198a99e0 Polish nohttp configuration
Closes gh-26166
4 years ago
Stephane Nicoll 548baf7914 Update copyright year of changed file
See gh-26145
4 years ago
izeye 996472b42d Polish
See gh-26145
4 years ago
Andy Wilkinson b0cce645dd Use a non-deprecated class to identify kotlin-gradle-plugin-api jar
See gh-26080
4 years ago
Andy Wilkinson 6f2b4aa685 Upgrade to Kotlin 1.5.0-RC
Closes gh-26080
Closes gh-25498
4 years ago
Andy Wilkinson c4750fd0ff Support Gradle 7 and raise minimum supported version to 6.8
Closes gh-26026
4 years ago
dreis2211 db79fe8b2c Test our Gradle Plugin against Gradle 7.0
See gh-25997
4 years ago
Scott Frederick e27d4848dd Merge branch '2.4.x'
Closes gh-25993
4 years ago
Scott Frederick 6a7f1f1c56 Merge branch '2.3.x' into 2.4.x
Closes gh-25992
4 years ago
Scott Frederick e19443093d Document runtime JVM configuration when building an image
Fixes gh-21478
4 years ago
Andy Wilkinson 8b5f914ba5 Revert "Merge branch '2.4.x'"
This reverts commit 97b26b4886, reversing
changes made to 6f9b1ed6a3.

See gh-25840
4 years ago
Andy Wilkinson e9ce20dbf4 Revert "Merge branch '2.3.x' into 2.4.x"
This reverts commit 586ce00e06, reversing
changes made to 563b8a8cec.

See gh-25839
4 years ago
Andy Wilkinson b35d1ec6e8 Revert "Use test harness for image building integration tests"
This reverts commit da9d8d6055.

See gh-25838
4 years ago
Phillip Webb 807ea1af0d Update copyright year of changed files 4 years ago
Andy Wilkinson 095ff18854 Test our Gradle plugin against Gradle 7.0-rc-2
Closes gh-25888
4 years ago
Scott Frederick 97b26b4886 Merge branch '2.4.x'
Closes gh-25840
4 years ago
Scott Frederick 586ce00e06 Merge branch '2.3.x' into 2.4.x
Closes gh-25839
4 years ago
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
4 years ago
Phillip Webb 8c31d29acf Merge branch '2.4.x' 4 years ago
Phillip Webb a28a3ae090 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
4 years ago
Phillip Webb c9451b59f2 Merge branch '2.4.x' 4 years ago
Phillip Webb a0f5169966 Polish 4 years ago
Phillip Webb 44b1751bb4 Merge branch '2.4.x'
Closes gh-25826
4 years ago
Phillip Webb 363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
4 years ago
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
4 years ago
dreis2211 a9a37f0dd5 Increase test coverage on Java 16
See gh-25809
4 years ago
Andy Wilkinson ca46fe7cd0 Test our Gradle plugin against Gradle 7.0-rc-1
Closes gh-25763
4 years ago
Andy Wilkinson fb670ee654 Drop support for Gradle 5.6.x
Closes gh-24225
4 years ago
Andy Wilkinson 83342c7aa7 Test the Gradle plugin against 7.0-milestone-3
Closes gh-25747
4 years ago
Andy Wilkinson ebdb046ca9 Leave jar and war tasks enabled but configured with a classifier
Closes gh-23797
4 years ago
Phillip Webb 6e5c510e0a Migrate to asciidoctor-spring-backends
Migrate to the snapshot version of asciidoctor-spring-backends.

See gh-25553
4 years ago
Stephane Nicoll 76d0a7f8ba Merge branch '2.4.x'
Closes gh-25506
4 years ago
dreis2211 89a44f3da4 Fix some assertions
See gh-25499
4 years ago
Andy Wilkinson 961a34a5ee Merge branch '2.4.x'
Closes gh-25497
4 years ago
Andy Wilkinson 1ce6e796fe Polish "Allow the project to be built with Java 16"
See gh-25171
4 years ago
dreis2211 1ccd8dae8a Allow the project to be built with Java 16
See gh-25171
4 years ago
Scott Frederick 434db48969 Merge branch '2.4.x'
Closes gh-25469
4 years ago
Scott Frederick afb60d6161 Add tests for Gradle examples used in plugin docs
Fixes gh-25468
4 years ago
Stephane Nicoll a80f1af811 Merge branch '2.4.x'
Closes gh-25463
4 years ago
Stephane Nicoll ed1c68f567 Update copyright year of changed file
See gh-25454
4 years ago
jnizet cbab2396e2 Fix property name in gradle plugin documentation
See gh-25454
4 years ago
Andy Wilkinson b36caec413 Merge branch '2.4.x'
Closes gh-25438
4 years ago
Andy Wilkinson d48551ff12 Merge branch '2.3.x' into 2.4.x
Closes gh-25437
4 years ago
Stefan Wolf 86ca32e694 Enable stricter validation for Gradle plugin
See gh-25409
4 years ago
Scott Frederick a80c4ad38d Support image building with Gradle and war packaging
This commit updates the Gradle image building task to support building
images from executable and non-executable war files.

Fixes gh-23825
4 years ago
Andy Wilkinson 9836b060d4 Test the Gradle plugin against 7.0-milestone-2
Closes gh-25404
4 years ago
Scott Frederick 76e42ff96f Correct grouping of custom buildpacks
This commit corrects the order.toml file that is generated and added
to the builder when building an image using custom buildpacks with the
Maven or Gradle plugin in order to support buildpacks that depend on
detection as a group.

Fixes gh-25378
4 years ago
Scott Frederick 89555a8745 Add bindings option for image building
This commit adds configuration to the Maven and Gradle plugins to
allow a list of volume mount bindings to be provided to the image
building goal and task. This enables service bindings to be mounted
in the builder image that are recognized by buildpacks to support
custom certificates, build tool configuration, APM integration, and
other buildpack features.

Fixes gh-23518
4 years ago
Andy Wilkinson a14bf7a3b8 Deprecate support for Gradle's maven plugin
Closes gh-25267
4 years ago
Scott Frederick f54f784f80 Add buildpack option for image building
This commit adds configuration to the Maven and Gradle plugins to
allow a list of buildpacks to be provided to the image building
goal and task.

Fixes gh-21722
4 years ago
Andy Wilkinson 5618646fc7 Merge branch '2.4.x'
Closes gh-25308
4 years ago
Andy Wilkinson b86351d0cf Merge branch '2.3.x' into 2.4.x
Closes gh-25307
4 years ago
Andy Wilkinson a2adb877ee Polish "Encourage use of maven-publish plugin in Gradle docs"
See gh-25299
4 years ago
Robert Smith c0a5245a3e Encourage use of maven-publish plugin in Gradle docs
See gh-25299
4 years ago
Andy Wilkinson 514aede91e Merge branch '2.4.x'
Closes gh-25168
4 years ago
Andy Wilkinson 45e6c12cb6 Consider transitives when identifying project dependencies
Previously, when building a layered jar, the Gradle plugin only
considered a configuration's direct dependencies when identifying
project dependencies. This resulted in transitive project dependencies
being missed when deciding which dependencies belong in the
application layer.

This commit updates ResolvedDependencies to consider all projects
from the root project when collecting the IDs of local projects. This
ensures that any project dependency, no matter where it appears in the
dependency graph, is successfully identified.

Fixes gh-25163
4 years ago
Andy Wilkinson d30251092b Test the Gradle Plugin against 7.0-milestone-1
Closes gh-25103
4 years ago
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
4 years ago
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
4 years ago
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
4 years ago
Phillip Webb d9f3e89395 Merge branch '2.4.x' 4 years ago
Phillip Webb 630d216430 Update copyright year of changed files 4 years ago
Phillip Webb 939b5dfc26 Add junit-platform-launcher dependency
Update `build.gradle` files to ensure that `junit-platform-launcher` is
a `testRuntimeOnly` dependency. This ensures that tests can be run from
Eclipse.

Closes gh-25074
4 years ago
Madhura Bhave c73e3cc2dc Update documentation for layered wars
Closes gh-22821
Closes gh-22195
4 years ago
Madhura Bhave 1245e5eec9 Add support for creating layered war files with Gradle
See gh-22195
4 years ago
Phillip Webb c76a0f7a81 Merge branch '2.4.x'
Closes gh-25043
4 years ago
Phillip Webb ca9b612e27 Merge branch '2.3.x' into 2.4.x
Closes gh-25042
4 years ago
jongmin92 23ecb86089 Document missing code to run Gradle bootRun task
See gh-25012
4 years ago
Phillip Webb c9a2c4e326 Merge branch '2.4.x' 4 years ago
Phillip Webb d06407ec0a Update copyright year of changed files 4 years ago
Phillip Webb b1f27b7604 Merge branch '2.4.x'
Closes gh-24995
4 years ago
Phillip Webb 522f68cb40 Merge branch '2.3.x' into 2.4.x
Closes gh-24994
4 years ago
Phillip Webb 464b302655 Set withTestKitDir per Gradle version
Attempt to fix cache locking issues by setting a unique `withTestKitDir`
directory for each tested Gradle version.

Closes gh-24993
4 years ago
Andy Wilkinson f3fd55dac6 Merge branch '2.4.x'
Closes gh-24976
4 years ago
Andy Wilkinson 9c8645dec2 Merge branch '2.3.x' into 2.4.x
Closes gh-24975
4 years ago
Andy Wilkinson 46d908f632 Upgrade to Gradle 6.8.1
Closes gh-24737
4 years ago
Stephane Nicoll 2c2c160579 Remove deprecated code
See gh-24806
4 years ago
Phillip Webb 6c2ff56fba Fix tests to also work in IDE 4 years ago
Phillip Webb a6a7c06e55 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 9da0bd8523 Update copyright year of changed files 4 years ago
Andy Wilkinson c3dfb9bd29 Merge branch '2.3.x' into 2.4.x
Closes gh-24768
4 years ago
Andy Wilkinson 997505005b Handle files larger than Integer.MAX_VALUE bytes in bootJar and bootWar
Fixes gh-24618
4 years ago
Andy Wilkinson 5ae9fbedcd Merge branch '2.3.x' into 2.4.x
Closes gh-24738
4 years ago
Andy Wilkinson 7625a979db Configure bootRun to use project's Java toolchain by default
Previously, unlike the application plugin's run task, our bootRun task
ignored the project's Java toolchain. This meant that the application
was run on a JVM with the same Java version as the one being used by
Gradle itself. This could result in a failure if the application
required a more modern JVM.

This commit updates the plugin to configure the bootRun task's
JavaLauncher convention to be one derived from the project's Java
toolchain. Toolchain support was introduced in Gradle 6.7 so this is
only done when using Gradle 6.7 and later.

Fixes gh-24517
4 years ago
Andy Wilkinson 3c3aa9e486 Merge branch '2.3.x' into 2.4.x
Closes gh-24735
4 years ago
Andy Wilkinson 064de4e073 Check configured JavaLauncher when determining version of the JVM
Previously, bootRun assumed that the Java version of the JVM that would
run the application would be the same as the Java version of the JVM
that is running the build. This assumption does not hold true when
Gradle's toolchain support is used to configure tasks that fork a new
JVM to use a version other than that being used by Gradle itself.

This commit updates the BootRun task to query the JavaLauncher property
when determining the version of Java on which the application will be
run. Toolchain support and the JavaLauncher property are new in Gradle
6.7. To support earlier versions of Gradle, NoSuchMethodError is caught
we continue as if no JavaLauncher has been configured and use the local
JVM's Java version.

Fixes gh-24512
4 years ago
Andy Wilkinson 9e389c8376 Merge branch '2.3.x' into 2.4.x
Closes gh-24710
4 years ago
Andy Wilkinson 5ad4d627fd Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9 and adds
some additional tests.

Fixes gh-24192
4 years ago
Scott Frederick dfcabe1665 Merge branch '2.3.x' into 2.4.x
Fixes gh-24521 in 2.4.2
4 years ago
Scott Frederick 0e5df2296e Fail with Gradle bootBuildImage and war packaging
Prior to this commit, running the bootBuildImage Gradle task on a
project configured for war packaging would result in a jar file being
built and used in the image instead of the war file. With this commit
an error will be thrown from the plugin in this case.

Fixes gh-24521
4 years ago
Andy Wilkinson 5fdb2ae2fd Protect PluginApplicationActions against absent plugin classes
Closes gh-24526
4 years ago
Phillip Webb 72d36e0c07 Update copyright year of changed files 4 years ago
Phillip Webb 30c27274e2 Merge branch '2.3.x'
Closes gh-24339
4 years ago
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
4 years ago
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
4 years ago
Scott Frederick da2276e7d4 Use stable builder and run images in integration tests
Fixes gh-24183
4 years ago
Scott Frederick 59e0f7317e Avoid image pulls in integration tests
This commit sets the pull policy to `IF_NOT_PRESENT` where possible
in integration tests for the Maven and Gradle plugins to reduce
the number of times the default Paketo builder and run images are
pulled from Docker Hub.

Fixes gh-24113
4 years ago
Stephane Nicoll b6fc0913cf Merge branch '2.3.x'
Closes gh-24104
4 years ago
Stephane Nicoll 515b18e142 Merge branch '2.3.x'
Closes gh-24108
4 years ago
Andy Wilkinson 409e3ccecf Ignore resolution of copied configuration
When a Configuration is copied, any before and after resolve actions
that are registered with its ResolvableDependencies are also copied
over. This means that, when a copied configuration is resolved the
resolution actions may be called on a ResolvableDependencies instances
that isn't the one to which they were added.

Previously, the above-described Gradle behaviour would result in
BootJar accessed the ResolvedConfiguration of a Configuration that may
not have yet been resolved. At best this would trigger Configuration
resolution and at worst it would fail. A failure could occur if the
configuration had been copied so that it could be made resolvable.
The afterResolve action would then try to access the
ResolvedConfiguration of the original Configuration. This would trigger
a resolution attempt that fails due to the original configuration being
marked as unresolvable.

This commit updates the afterResolve action in BootJar to check that
the ResolvableDependencies with which it is called matches the
ResolvableDependencies with which it was original registered. Only
when the two match, and therefore the configuration has actually been
resolved, does processing proceed.

Fixes gh-24072
4 years ago
Andy Wilkinson c85cc33ca9 Fix main class resolution failure when loaded from config cache
See gh-22922
4 years ago
Andy Wilkinson 7cbcd42eba Adapt test to cope with increased Instant precision on Java 11
See gh-22922
4 years ago
Andy Wilkinson 4a4fec6310 Avoid calling getProject() during BootBuildImage's execution
See gh-22922
4 years ago
Andy Wilkinson c409d50c14 Document support for Gradle's configuration cache
See gh-22922
4 years ago
Andy Wilkinson 806464edd1 Update BootBuildImage to support Gradle's configuration cache
See gh-22922
4 years ago
Andy Wilkinson b1c4af4081 Update bootJar and bootWar to use new main class resolution mechanism
See gh-22922
4 years ago
Andy Wilkinson c078a48064 Update BootRun to support Gradle's configuration cache
See gh-22922
4 years ago
Andy Wilkinson d1f543fc1d Update BuildInfo to support Gradle's configuration cache
See gh-22922
4 years ago
Andy Wilkinson 83cfd3b2e6 Update BootWar to support Gradle's configuration cache
See gh-22922
4 years ago
Andy Wilkinson 081ef2d905 Update BootJar to support Gradle's configuration cache
See gh-22922
4 years ago
Andy Wilkinson c828521912 Allow tests to provide properties that modify the build.gradle script
See gh-22922
4 years ago
Andy Wilkinson d136324b99 Add support for testing the Gradle plugin with --configuration-cache
See gh-22922
4 years ago
Andy Wilkinson 0aa0cba3f7 Fix content filters when excludeProjectDependencies() is used
Fixes gh-23763
4 years ago
olivier.antoine ded2a8006a Expose BootBuildImage's cleanCache property as a command-line option
See gh-23753
4 years ago
Andy Wilkinson 0f069ee9c6 Merge branch '2.3.x'
Closes gh-23756
4 years ago
Andy Wilkinson 633027b1cd Upgrade to Gradle 6.7
Closes gh-23754
4 years ago
Andy Wilkinson 6898a97102 Merge branch '2.3.x'
Closes gh-23732
4 years ago
Andy Wilkinson 11b5e86ffd Deprecate BootJar#getConfigurations
Fixes gh-23527
4 years ago
Andy Wilkinson 84f96033c5 Put project deps in app layer and make customization easier
Previously, when building a layered jar with Gradle, project
dependencies were treated the same as any other dependency, being
included in the dependencies or snapshot dependencies layer based
on their version.

This commit updates the default layering when using Gradle to include
project dependencies in the application layer by default. The DSL has
also been updated to allow their layer to be customized using new
includeProjectDependencies() and excludeProjectDependencies() methods
rather than relying on including and excluding them via a
group:artifact:version pattern.

Closes gh-23431
4 years ago
Johnny Lim 4a26e11268 Polish
See gh-23634

Closes gh-23634
4 years ago
Scott Frederick 0e7ab88491 Polish "Update default builder image"
See gh-23628
4 years ago
Emily Casey 461dc23c0c Update default builder image
This commit updates the default builder image used by the Maven
and Gradle plugins image-building goal and task to use the latest
Paketo builder image. The builder image is pulled from Docker Hub
instead of Google Container Registry by default.

See gh-23628
4 years ago
Scott Frederick f2721abf31 Merge branch '2.3.x'
Closes gh-23626
4 years ago
Scott Frederick de685bdca4 Document buildpack configuration of JVM options
Fixes gh-21582
4 years ago
Scott Frederick a099cd9420 Merge branch '2.3.x'
Closes gh-23623
4 years ago
Scott Frederick 49b0707f1a Clarify image builder configuration documentation
This commit qualifies examples of configuring the CNB builder to clarify
that the examples apply to use of the default Paketo builder, and adds links
to the official Paketo docs for more details.

Fixes gh-19967
4 years ago
Andy Wilkinson 70ed7784a6 Use Property<String>s for main class configuration in the Gradle plugin
Closes gh-23608
4 years ago
Scott Frederick 91acd957b2 Disable docker registry integration tests
A docker registry running in testcontainers behaves
differently in CI vs running locally. Disabling the tests for
now while working on getting them running reliably in CI.

See gh-21001
4 years ago
Scott Frederick 09b627d232 Add support for publishing docker images to a registry
This commit adds options to the Maven and Gradle plugins to publish
to a Docker registry the image generated by the image-building goal
and task.

The Docker registry auth configuration added in an earlier commit
was modified to accept separate auth configs for the builder/run
image and the generated image, since it is likely these images will
be stored in separate registries or repositories with distinct
auth required for each.

Fixes gh-21001
4 years ago
Andy Wilkinson b7d020d3c2 Merge branch '2.3.x' 4 years ago
Andy Wilkinson 543763462c Update tests to look for snippets in correct location
See gh-23598
4 years ago
Andy Wilkinson f44889b992 Merge branch '2.3.x'
See gh-23599
4 years ago
Andy Wilkinson 7eb92cc71a More Gradle snippets to correct location
See gh-23598
4 years ago
Andy Wilkinson 94884f201c Merge branch '2.3.x'
Closes gh-23599
4 years ago
Andy Wilkinson 2d3291fb83 Merge branch '2.2.x' into 2.3.x
Closes gh-23598
4 years ago
Andy Wilkinson 7ac14203ab Expand Gradle plugin's docs on setting bootRun's system properties
Closes gh-23578
4 years ago
Andy Wilkinson e58a92b3d0 Introduce a dedicated @GradleCompatibility annotation
Rather than using the extension directly, introduced a dedicated
annotation will enable customization of the compatibility tests that
are run via attributes on the annotation. For example, it will allow
certain test classes to run their tests with Gradle's configuration
cache enabled while others disable it.

Closes gh-23532
4 years ago
Andy Wilkinson f5df6e463a Reduce configuration resolution when building a layered jar
Previously, BootJar would resolves all of a project's configurations
when building a layered jar. This was unnecessarily broad as it was
likely to include configurations that had contributed nothing to the
jar's classpath.

This commit replaces the configuration resolution with an afterResolve
action that populates the ResolvedDependencies in response to a
configuration being resolved. This allows the resolved dependencies to
be populated from all of the configurations that were resolved as part
of determining the jars classpath and no more.

Closes gh-23528
4 years ago
Lukas Cardot e95bcfac34 Configure the bootBuildInfo task lazily
Prior to this commit, the bootBuildInfo was configured eagerly.
Configuring it lazily prevent this task from being configured when not
explicitly needed. Also, the 'classes' and 'bootJar' tasks are now
lazily configured, as the bootBuildInfo task was causing them to be
configured eagerly.

See gh-23435
4 years ago
Andy Wilkinson b662f1e06e Remove UnresolvedDependenciesAnalyzer from the Gradle plugin
Closes gh-23479
4 years ago
Andy Wilkinson 9ecc548672 Merge branch '2.3.x'
Closes gh-23427
4 years ago
Andy Wilkinson 8667e9ded8 Merge branch '2.2.x' into 2.3.x
Closes gh-23426
4 years ago
Andy Wilkinson 581190d7a0 Test the Gradle plugin against 6.7-rc-1
Closes gh-23425
4 years ago
Andy Wilkinson 0f2ddd6480 Merge branch '2.3.x'
Closes gh-23423
4 years ago
Andy Wilkinson d06af28cd8 Merge branch '2.2.x' into 2.3.x
Closes gh-23422
4 years ago
Andy Wilkinson 360e29af48 Polish "Add note about Kotlin main class name"
See gh-23418
4 years ago
Sebastiaan Fernandez 0bde5fda9b Add note about Kotlin main class name
See gh-23418
4 years ago
Scott Frederick 54288678d1 Configure Docker host in build plugins
This commit adds the ability to configure the Maven and Gradle
plugins to use a remote Docker daemon using build file
configuration, as an alternative to setting environment variables
to specify remote host connection details.

Fixes gh-23400
4 years ago
Andy Wilkinson d2fae6e19e Merge branch '2.3.x'
Closes gh-23407
4 years ago
Andy Wilkinson 3861ef13fb Merge branch '2.2.x' into 2.3.x
Closes gh-23406
4 years ago
Andy Wilkinson 5ec673ff2a Add anchors to section headers in Gradle plugin docs
Fixes gh-23402
4 years ago
Scott Frederick 86fa8144f5 Polish "Support authentication to private Docker registry"
See gh-22972
4 years ago
姜为 e8f555e13d Support authentication to private docker registry
This commit adds the ability to configure Docker image registry
authentication credentials in the Maven and Gradle plugins. The
authentication credentials are passed to the Docker daemon with
all daemon API calls, and the daemon forwards the credentials to the
image registry when necessary. This makes it possible to use
builder and run images stored in a private Docker registry.

See gh-22972
4 years ago
Stephane Nicoll f03ed3b2a7 Publish single page doc to /htmlsingle consistently
Closes gh-21585
4 years ago
Andy Wilkinson 143d19754b Exclude starter jars when running and packaging with Gradle
This commit updates the Gradle Plugin to filter dependencies based on
the Spring-Boot-Jar-Type entry in their manifest. Jars with a
Spring-Boot-Jar-Type of dependencies-starter are excluded. Unlike the
Maven plugin, jars with a type of annotation-processor are not
excluded. It is not necessary with Gradle as use of the
annotationProcessor configuration for such dependencies already ensures
that they are not included.

See gh-22036
4 years ago
Stephane Nicoll defa7c47cd Merge branch '2.3.x'
Closes gh-23201
4 years ago
Stephane Nicoll 648789ef84 Document that buildpacks use non-root users
Closes gh-21122
4 years ago
EruDev ffc577b499 Simplify code
See gh-23111
4 years ago
Stephane Nicoll cc5f2537b1 Merge branch '2.3.x'
Closes gh-23148
4 years ago
Stephane Nicoll ee914624e6 Document buildpacks are configured with target Java version
Closes gh-21796
4 years ago
Andy Wilkinson 9dc5b88949 Polish "Mark bootArchives configuration as unresolvable"
See gh-22943
4 years ago
Martin Chalupa 796307a78c Mark bootArchives configuration as unresolvable
See gh-22943
4 years ago
Andy Wilkinson b57b2f0b44 Test the Gradle Plugin against 6.5 and 6.6
Closes gh-23075
4 years ago
Stephane Nicoll f8265e3e44 Merge branch '2.3.x'
Closes gh-22980
4 years ago
Jean-Baptiste Nizet 27528fdd07 Fix custom image name example and documentation
There is no `artifactId` property in a gradle Project, and the default
value uses the project name.

See gh-22918
4 years ago
Stephane Nicoll b1e631e8a6 Remove trailing whitespaces 4 years ago
Scott Frederick 7c7079f91a Merge branch '2.3.x' 4 years ago
Scott Frederick 4c6a722f18 Fix test for Java version in image building docs
See gh-22916
4 years ago
Scott Frederick 092bbd198e Merge branch '2.3.x'
Closes gh-22923
4 years ago
Scott Frederick 005ed8b8db Use Java version wildcard in image building docs
Fixes gh-22916
4 years ago
Scott Frederick 6b15822cb1 Polish "Add pullPolicy option for image building"
See gh-22736
4 years ago
anshlykov c7449b57ce Add pullPolicy option for image building
This commit adds a pullPolicy option to the configuration of the Maven
plugin spring-boot:build-image goal and the Gradle plugin bootBuildImage
task. The new option gives users control over pulling the builder image
and run image from a remote image registry to the local Docker daemon.

See gh-22736
4 years ago
Andy Wilkinson fff9193860 Merge branch '2.3.x'
Closes gh-22917
4 years ago
Andy Wilkinson f43a0b4891 Fix configuration of environment in Kotlin bootBuildImage examples
Fixes gh-22913
4 years ago
Andy Wilkinson 9a2d2effa5 Merge branch '2.3.x'
Closes gh-22907
4 years ago
Andy Wilkinson 1381929525 Upgrade to Gradle 6.6
Closes gh-22905
4 years ago
Andy Wilkinson 079b5d3f50 Polish Gradle plugin after layering being enabled by default
Closes gh-20983
4 years ago
Madhura Bhave 41f5ba9077 Switch layering on by default
Closes gh-20983
4 years ago
Andy Wilkinson d2926e0222 Merge branch '2.3.x'
Closes gh-22678
4 years ago
Andy Wilkinson 00cd8945d5 Document how to use Gradle's native bom support
Closes gh-21570
4 years ago
Andy Wilkinson 19ad163486 Merge branch '2.3.x'
Closes gh-22411
4 years ago
Andy Wilkinson accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
4 years ago
Andy Wilkinson 21f733b89b Merge branch '2.1.x' into 2.2.x
Closes gh-22409
4 years ago
Andy Wilkinson 179d2c79d6 Avoid trivialising what the reader's learning about
Closes gh-22408
4 years ago
Scott Frederick e6318f83b2 Merge branch '2.3.x'
Closes gh-22349
4 years ago
Scott Frederick 210282260e Fail on bootBuildImage with launch script
This commit adds a check to the support code for the Gradle plugin
bootBuildImage task to ensure that the jar file that will be passed
to a builder is readable and has a valid directory. This prevents a
situation where the jar file cannot be read because it is prepended
with a launch script, and the builder does not receive any files to
process.

Notes have also been added to the Gradle plugin documentation to warn
against using a bootJar launchScript configuration and bootBuildImage
together, as well as caveats about launchScript that match the Maven
plugin documentation.

Fixes gh-22223
4 years ago
Andy Wilkinson 2d91a096db Merge branch '2.3.x'
Closes gh-22293
4 years ago
Andy Wilkinson 794ded5286 Test the Gradle plugin against Gradle 6.5.1
Closes gh-22292
4 years ago
Andy Wilkinson ecbc8ea2df Merge branch '2.3.x'
Closes gh-22202
4 years ago
Andy Wilkinson 79770b9615 Use source sets to determine configurations deprecated for resolution
Fixes gh-22200
4 years ago
Scott Frederick 73b737c7d8 Merge branch '2.3.x'
Closes gh-22017
4 years ago
Scott Frederick 28643e4d2d Validate image references before passing to CNB builder
Prior to this commit, an image name or run image name derived from
the project name or provided by the user would be passed to the CNB
builder without validation by the Maven plugin build-image goal or
Gradle plugin bootBuildImage task. This could lead to error messages
from the plugins that are difficult to understand and diagnose.

This commit makes parsing of the image names more strict, based on
the grammar implemented by the Docker go library. This provides
validation of the image names before passing them to the builder,
with a more descriptive error message when parsing and validation
fails.

Fixes gh-21495
4 years ago
Andy Wilkinson 056d5f3120 Enable deprecation compilation warnings
See gh-21271
4 years ago
Andy Wilkinson 07fb4b065d Merge branch '2.3.x'
Closes gh-21940
4 years ago
Andy Wilkinson 0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
4 years ago
Scott Frederick 838cfc529f Merge branch '2.3.x'
Closes gh-21933
4 years ago
Scott Frederick 6119d69679 Add runImage option for image building
This commit adds a runImage property to the Maven plugin build-image
goal and the Gradle bootBuildImage task. The property allows the user
to override the run image reference provided in the builder metadata
with an alternate run image. The runImage property can be specified
in the build file or on the command line.

Fixes gh-21534
4 years ago
Madhura Bhave 4161f0b983 Merge branch '2.3.x'
Closes gh-21799
5 years ago
Madhura Bhave d30c0e8aec Merge branch '2.2.x' into 2.3.x
Closes gh-21798
5 years ago
Madhura Bhave 36faa1d42a Document using system properties in gradle plugin docs
Closes gh-21317
5 years ago
Andy Wilkinson 020a47ba3e Document support for Gradle 5
Closes gh-15358
5 years ago
Phillip Webb 0a05b4c9fd Update copyright year of changed files 5 years ago
Andy Wilkinson c4faeac4d7 Merge branch '2.3.x'
Closes gh-21703
5 years ago
Andy Wilkinson 24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
5 years ago
Andy Wilkinson 399d0f7b95 Merge branch '2.3.x'
Closes gh-21651
5 years ago
Andy Wilkinson f0bc8ee73c Fix version placeholder replacement in Gradle plugin docs
Closes gh-21640
5 years ago
Phillip Webb 502e2a4c64 Polish 5 years ago
Andy Wilkinson 3d143e59e7 Fix inclusion of version-specific content in Gradle plugin's docs
Fixes gh-21610
5 years ago
Andy Wilkinson b1777b9dee Use stable file repository for testing snapshot layers
Closes gh-21629
5 years ago
Andy Wilkinson ba23368440 Configure attributes on productionRuntimeClasspath
Previously, the productionRuntimeClasspath configuration was created
without any attributes. This caused problems with multi-project
dependency resolution as there was insufficient information for Gradle
to determine which variant of a dependency should be used by the
productionRuntimeClasspath configuration.

This commit updates the configuration to have three attributes, each
configured with the same values as those of Gradle's own
runtimeClasspathConfiguration.

Fixes gh-21549
5 years ago
Scott Frederick a5c42ce4c4 Polish `Add gradle build image command line example`
See gh-21490
5 years ago
Dave Syer 88a32d2fb9 Add gradle build image command line example
See gh-21490
5 years ago
Andy Wilkinson 14ba7442d9 Ensure that spring-boot-parent is imported into generated pom
Fixes gh-21518
5 years ago
Brian Clozel 42d07a7acd Fix published Maven POMs
Prior to this commit, the published Maven POMs would not pass the Maven
Central mandatory checks.

This commit adds the missing project name and description metadata for
most artifacts. The Spring Boot Gradle plugin artifact was also missing
this information and this is now added in the plugin metadata itself.
This is also updating the project page URL which is now hosted directly
on spring.io.

Fixes gh-21457
5 years ago
Phillip Webb 038ae93406 Update copyright year of changed files 5 years ago
Andy Wilkinson a03426af57 Configure the Asciidoctor revnumber in a central location
See gh-20934
5 years ago
Madhura Bhave 376098d080 Set asciidoctor revnumber to null
Closes gh-20934
5 years ago
Scott Frederick 28749e7fbb Update CNB buildpack Java version env variable
Prior to this commit, the build tool plugins set the environment
variable BP_JAVA_VERSION when invoking the CNB builder to set the
version of the JDK/JRE that the builder should use in the created
image.

With CNB API 0.3, the convention changed the name of this environment
variable to BP_JVM_VERSION. This commit updates the build tool
plugins to match the newer convention.

See gh-21273
5 years ago
Scott Frederick 35bc82a693 Use CNB creator all-in-one lifecycle
This commit modifies the buildpack platform invocation logic used by
the build plugins to invoke the single creator lifecycle introduced in
the CNB API 0.3, instead of invoking discrete lifecycle phases
separately. It also removes support for CNB API 0.2.

Fixes gh-21273
5 years ago
Andy Wilkinson 70c4baeef6 Merge branch '2.2.x'
Closes gh-21341
5 years ago
Andy Wilkinson 386d678d99 Use Gradle's CreateStartScripts task with 6.4 and later
Fixes gh-20759
5 years ago
Andy Wilkinson 693fa918e2 Tolerate deprecation warnings generated by Gradle 6.4
The warnings will be addressed by gh-20759. CreateBootStartScripts
must be excluded from the classes that are validated by the
ValidatePlugins task. It is invalid, but only for Gradle 6.4. gh-20759
will cause it to only be used with Gradle 6.3 and earlier.

See gh-21329
5 years ago
Stephane Nicoll 02aacf4f04 Upgrade to Gradle 6.4
Closes gh-21329
5 years ago
Andy Wilkinson 1bc41ec336 Stop developmentOnly from removing too much from executable jars and wars
Fixes gh-21288
5 years ago
Scott Frederick f3d717e97a Use paketo-buildpacks/builder as default builder
This commit changes the default builder image from
`cloudfoundry/cnb:bionic-platform-api-0.2` to
`gcr.io/paketo-buildpacks/builder:base-platform-api-0.3`. It also
uses a `paketo-buildpacks/builder` image instead of a
`cloudfoundry/cnb` image to test compatibility with lifecycle v2
and uses paketo naming instead of cloudfoundry when mocking builder
interactions.

Some adjustments to lifecycle phases were also made to align more
closely with the pack CLI.

Fixes gh-21066
5 years ago
Andy Wilkinson 2d769e7679 Polish "Stop limiting layer customization to external modules"
See gh-21207
5 years ago
Paddy Drury 98644df64d Stop limiting layer customization to external modules
See gh-21207
5 years ago
Phillip Webb ad1248e4ec Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder"

Closes gh-21218
5 years ago
Andy Wilkinson fb33610027 Automatically create developmentOnly configuration
Previously, the developmentOnly configuration, typically used for
Devtools, had to be declared manually. The BootJar and BootWar tasks
then had a property, excludeDevtools, that could be used to control
whether or not Devtools would be excluded from the executable archive.

This commit updates the reaction to the Java plugin being applied to
automatically create the developmentOnly configuration. The classpaths
of bootJar and bootWar are then configured not to include the contents
of the developmentOnly configuration. As a result of this, the
excludeDevtools property is no longer needed and has been deprecated.
Its default has also been changed from true to false to make it easy
to opt in to Devtools, when configured as a development-only
dependency, being included in executable jars and wars by adding
developmentOnly to the classpath of the archive task.

Closes gh-16599
5 years ago
Stephane Nicoll 961be0fea3 Merge branch '2.2.x'
Closes gh-21118
5 years ago
dreis2211 e3a9bacf3b Fix typo
See gh-21002
5 years ago
dreis2211 5eb5bf0a2d Polish
See gh-21009
5 years ago
Stephane Nicoll 85e9f713b0 Update copyright year of changed files
See gh-21007
5 years ago
Johnny Lim 29717423a3 Remove this keyword on member method invocations
See gh-21007
5 years ago
Andy Wilkinson 076a384c9c Merge branch '2.2.x'
Closes gh-21112
5 years ago
Andy Wilkinson 29dc236bb2 Broaden deprecation warning check in Gradle Plugin's tests
Closes gh-21111
5 years ago
Scott Frederick 8f5ef951de Use current timestamp for index files with Gradle
This commit removes changes the timestamp used when writing the
classpath and layers index files in the Gradle plugin to be the
current timestamp unless `preserveFileTimestamps=true`. It also
polishes some duplication in the handling of entry attributes
when creating the fat archive and adds a test to verify that
the Gradle plugin uses the same fixed timestamp constant as
Gradle uses internally.

See gh-21005
5 years ago
Scott Frederick 555132e096 Fix archive attributes in Gradle plugin
This commit ensures that file permissions are set on entries that the
Gradle plugin adds to an archive. It also reverts the constant date
and time used for added entries to a previous value to ensure a time
zone offset is not applied.

See gh-20927
5 years ago
Johnny Lim 5fad43ec40 Polish
See gh-20973
5 years ago
Phillip Webb d9fb4dd477 Don't use monospacing in documentation headings
Closes gh-20875
5 years ago
Scott Frederick e17d4be484 Polish plugin documentation headings 5 years ago
Scott Frederick a64e26fc44 Polish plugin documentation headings 5 years ago
Phillip Webb baa728c85e Cleanup paths to fix tests running on Windows 5 years ago
Phillip Webb b50e8eb3aa Fix package tangle in Gradle plugin
Relocate `VersionExtractor` to fix a package tangle.
5 years ago
Phillip Webb 6e7b473fef Polish asciidoc formatting and use sentence case 5 years ago
Phillip Webb df58b9baa2 Use YAML compatible classpath.idx format
Update the `classpath.idx` format to align with `layers.idx` and allow
third-parties can parse it as YAML

Closes gh-20861
5 years ago
Phillip Webb 65672a1150 Use a more compact layers.idx format
Update the `layers.idx` format so that it is more compact and can be
parsed by third-parties as YAML.

Closes gh-20860
5 years ago
Scott Frederick 35ff711dfe Document builder configuration for HTTP proxy
This commit adds examples for configuring the default builder to use
an HTTP/HTTPS proxy when building OCI images using the Maven or Gradle
plugin.

Fixes gh-19984
5 years ago
Scott Frederick c119dd2450 Rename plugin PDF reference doc files
This commit renames the PDF documentation files generated for the
build plugins when the distribution archive is created.

See gh-20829
5 years ago
Madhura Bhave f40444e212 Fix typo 5 years ago
Andy Wilkinson 34e602652c Polish new layered jar support 5 years ago
Stephane Nicoll 3e936dd735 Polish 5 years ago
Phillip Webb 12bc890e75 Update Maven and Gradle layer customization docs
Update the Maven and Gradle documentation following the refined
layer customization changes.

See gh-20526
5 years ago
Andy Wilkinson bfa04e6574 Support flat jar layering with Gradle
Update the Gralde plugin so that layered jars now use the regular "flat"
format. The layers.idx file now describes which layer each file should
be placed.

See gh-20813

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
5 years ago
Phillip Webb 3f806aa513 Create a new layer for loader classes
Create a dedicated layer that is used to hold the launcher support
classes. The layer sits between `dependencies` and
`snapshot-dependencies` so that the layer is sensible for both
SNAPSHOT and RELEASE versions of Spring Boot

Closes gh-20529
5 years ago
Phillip Webb 7bc7d86ad4 Refine layer customization for Maven and Gradle
Simplify layer customization logic for both Maven and Gradle and
refactor some internals of the Gradle plugin.

Both Maven and Gradle now use a simpler customization format that
consists of `application`, `dependencies` and `layer order` sections.
The `application`, `dependencies` configurations support one or more
`into` blocks that are used to select content for a specific layer.

Closes gh-20526
5 years ago
Scott Frederick a01c8452cb Support CNB builder platform API 0.3
This commit adds support for Cloud Native Buildpacks builder platform
API 0.3, which is the latest platform API available currently. Support
for platform API 0.1 has been removed, adopting the policy of the pack
CLI to support the current platform API version and one version prior.

Fixes gh-20757
5 years ago
Scott Frederick bb9e37e119 Use platform API builder image tags
CNB builder images are now being tagged in a manner that indicates
the version of the platform API implemented. This allows Spring Boot
to default to a builder tag that guarantees API compatibility while
allowing for updates to bundled buildpacks.

Fixes gh-20171
5 years ago
Phillip Webb 4dad56a491 Restructure and polish docker code
Restructure and polish docker code to fix a package tangle and
provide better separation of concerns.
5 years ago
Phillip Webb 9795262dc1 Polish 5 years ago
Andy Wilkinson 84e16d55ea Raise the minimum supported version of Gradle 6 to 6.3
Closes gh-20532
5 years ago
Scott Frederick ac949d7851 Document remote Docker configuration
This commit adds documentation for the configuration required to
use a remote Docker daemon with the `build-image` Maven goal or the
`bootBuildImage` Gradle task.

See gh-20538
5 years ago
Madhura Bhave ad164269e9 Update classpath index to use jar name instead of full path
See gh-20564
5 years ago
Stephane Nicoll 089c0471fa Test the Gradle Plugin against Gradle 6.3
Closes gh-20669
5 years ago
dreis2211 f95e9543dc Fix typos in packaging docs
See gh-20630
5 years ago
Phillip Webb 0717de723f Polish 5 years ago
Phillip Webb ce1ae11c26 Merge branch '2.2.x' 5 years ago
Phillip Webb 16b5ea3414 Update copyright year of changed files 5 years ago
Madhura Bhave 7444306d0b Polish docs 5 years ago
Madhura Bhave a06f4f21e3 Combine application and resources layers into a single layer
Closes gh-20562
5 years ago
Madhura Bhave 952e529787 Rename "classes" to "application" in custom layer configuration
Closes gh-20539
5 years ago
Scott Frederick 3f378e1276 Add command-line options for Gradle bootBuildImage parameters
This commit adds support for setting the image name and builder
parameters of the Gradle bootBuildImage task using command-line
options as an alternative to DSL configuration.

See gh-20520
5 years ago
Stephane Nicoll 579a6ac254 Adapt tests for support for Java 14
See gh-20576
5 years ago
Scott Frederick e607c6842f Polish Gradle layer configuration DSL
This commit modifies the DSL for custom layer configuration in the
Gradle plugin to avoid duplication of terms that could be confusing.

Fixes gh-20563
5 years ago
Stephane Nicoll 0f5ca030db Polish "Add Java 14 CI"
See gh-20413
5 years ago
Stephane Nicoll 2e2f839bc8 Upgrade to Gradle 6.3 RC2
Closes gh-20558
5 years ago
Madhura Bhave 84b2e8c308 Rename classes package to application
Closes gh-20526
5 years ago
Scott Frederick 3dea2201c4 Use Gradle's configuration avoidance API
Register Boot Gradle tasks instead of creating them so they can be
loaded lazily.

Closes gh-18881
5 years ago
Scott Frederick f2dadf5a87 Add support for customizing layers in Gradle
This commit adds configuration to the Spring Boot Gradle plugin that
allows the names and contents of layers to be customized in the build
configuration.

Fixes gh-20296
5 years ago
Johnny Lim 8526e66939 Polish
See gh-20498
5 years ago
dreis2211 daa3855fc8 Test the Gradle Plugin against Gradle 6.2.2
See gh-20385
5 years ago
Scott Frederick 509a1f1d41 Configure buildpack to use target Java version
With this commit, the Maven `spring-boot:build-image` goal and the
Gradle `bootBuildImage` task will configure the OpenJDK buildpack
to use the same JRE version as the project's target version,
provided the buildpack Java version is not explicitly set in the
build configuration.

Fixes gh-20172
5 years ago
dreis2211 442733600e Test the Gradle plugin against Gradle 6.2.1
See gh-20310
5 years ago
Madhura Bhave c5bce2b99d Fix gradle plugin validation error 5 years ago
Madhura Bhave 15cd590f7f Allow users to opt out of including the layer tools in a layered jar
For Maven, the layer configuration is now an additional configuration
option instead of a layout type.

Closes gh-19866
5 years ago
dreis2211 d55bc5f850 Test the Gradle Plugin against Gradle 6.2
See gh-20222
5 years ago
dreis2211 866c441d70 Upgrade to Gradle 6.2
See gh-20213
5 years ago
Andy Wilkinson e065ee7be2 Merge branch '2.1.x' into 2.2.x
Closes gh-20183
5 years ago
Andy Wilkinson b9c2d775a9 Merge branch '2.2.x'
Closes gh-20185
5 years ago
Andy Wilkinson d61b035640 Merge branch '2.1.x' into 2.2.x
Closes gh-20183
5 years ago
Andy Wilkinson c8907d46b4 Fix up-to-date checking of build info properties
Closes gh-20135
5 years ago
Andy Wilkinson 8577a39a96 Upgrade to Spring Asciidoctor Extensions 0.4.1.RELEASE
Closes gh-20158
5 years ago
Scott Frederick 191dce3f5e Set Spring Boot version in ephemeral builder
This commit adds a `createdBy` structure to the metadata of the ephemeral
builder container image that identifies Spring Boot as the creator of the
image, along with the Spring Boot version.

See gh-20126
5 years ago
dreis2211 cfc16c2589 Remove redundant jar task configuration
See gh-20113
5 years ago
Scott Frederick 12c640e133 Upgrade default image builder version
This commit upgrades the default CNB builder image from
cloudfoundry/cnb:0.0.43-bionic to cloudfoundry/cnb:0.0.53-bionic.
It also adds integration tests for the Maven and Gradle plugins
to verify both versions are supported.
5 years ago
Johnny Lim 6818279751 Fix typo
See gh-20049
5 years ago
Andy Wilkinson 5c2b28cb57 Merge branch '2.2.x'
Closes gh-20043
5 years ago
Andy Wilkinson b6a408ae77 Upgrade to Spring Asciidoctor Extensions 0.4.0.RELEASE
Closes gh-20041
5 years ago
Andy Wilkinson bca98c5126 Use a RegularFileProperty to configure BootBuildImage's input jar
Closes gh-20010
5 years ago
Johnny Lim e6d5f5a271 Polish
See gh-19995
5 years ago
Phillip Webb 1eee83a07e Update copyright year of changed files 5 years ago
Phillip Webb 234c5033d4 Polish whitespace 5 years ago
Scott Frederick 653cabe2ce Add documentation for gradle bootBuildImage task 5 years ago
Andy Wilkinson 7b0d1eaffc Test the Gradle Plugin against Gradle 6.1.1
Closes gh-19912
5 years ago
Andy Wilkinson 54b3f480b4 Use posix long names when creating tar archive for image building
Fixes gh-19964
5 years ago
Stephane Nicoll 9fbaf7611b Merge branch '2.2.x'
Closes gh-19966
5 years ago
Stephane Nicoll b420bdb3ac Merge branch '2.1.x' into 2.2.x
Closes gh-19965
5 years ago
dreis2211 db2bacc62a Fix Gradle plugin documentation links
See gh-19961
5 years ago
Stephane Nicoll 07a1783572 Polish "Introduce appendix section with version properties"
See gh-19898
5 years ago
dreis2211 65394582f6 Introduce appendix section with version properties
With the introduction of Gradle we lost the list of version properties
that were previously in the spring-boot-dependencies POM and were also
linked inside the documentation. This commit introduces an appendix
section in the docs and links the appropriate places to the new section
to restore discoverability.

See gh-19898
5 years ago
dreis2211 d75de39456 Upgrade to JUnit Jupiter 5.6.0
See gh-19907
5 years ago
dreis2211 d84ca1149c Test the Gradle Plugin against Gradle 6.1
See gh-19776
5 years ago
Andy Wilkinson 1d396abec5 Fix bootBuildImage integration tests on Java 13
We build with Java 8, 11, and 13 without specifying target
compatibility for the bytecode of the app that's placed in the image.
The built image uses Java 11 and when the app is built with Java 13
it fails to start as the Java 11 VM can't read that Java 13 bytecode.

This commit configures the app that's placed in the image to be built
with target compatibility of 1.8. This allows it to be compiled with
all version of Java with which we build and to also be compatible
with the JVM that's in the image.

See gh-19831
5 years ago
Andy Wilkinson 01a0a54f78 Include layertools in layered jars build with Gradle
Closes gh-19867
5 years ago
Andy Wilkinson 288f5ceaee Fix zip compression of libs in layered jars
Closes gh-19792
5 years ago
Andy Wilkinson 0bd0b2a6c0 Add support for building OCI images using the Gradle plugin
Closes gh-19831
5 years ago
Andy Wilkinson bc452bc094 Polish BootJarTests
See gh-19847
See gh-19792
5 years ago
Phillip Webb 57db621b70 Polish 5 years ago
Madhura Bhave 13f7db2d8c Write classpath index file from Gradle plugin
Closes gh-19847
5 years ago
Phillip Webb e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
5 years ago
Phillip Webb 0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
5 years ago
Madhura Bhave df5b0f1163 Add support for layered jars in gradle plugin
Closes gh-19792

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
5 years ago
Phillip Webb bfd2ca7fd9 Polish Gradle expression references
Expand all expression `$` references to the full `${...}` form.
5 years ago
Andy Wilkinson 89237634c7 Fix classpath used for Gradle Plugin integration tests in Eclipse
See gh-19841
5 years ago
Andy Wilkinson 9d5975bd09 Upgrade to Gradle 6.1
Closes gh-19772
5 years ago
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
5 years ago
Andy Wilkinson aefe52e4d0 Revert "Rework dep management to avoid consumers picking up strict constraints"
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.

See gh-19609
5 years ago
Phillip Webb 862462b791 Update copyright year of changed files 5 years ago
Phillip Webb f57281340c Merge branch '2.2.x' 5 years ago
Phillip Webb 3cfbfebbb1 Merge branch '2.1.x' into 2.2.x 5 years ago
Phillip Webb 9bd49562fe Update copyright year of changed files 5 years ago
Andy Wilkinson b34a311d02 Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.

This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.

See gh-19609
5 years ago
dreis2211 d454c9653c Disable tests on Java 13 that require an incompatible Gradle version
See gh-19680
5 years ago
Andy Wilkinson e415f759a2 Raise the minimum supported version of Gradle to 5.6
Closes gh-18777
5 years ago
Andy Wilkinson c66d2e8039 Relax the Gradle plugin's Kotlin version constraint
Enforcing the spring-boot-dependencies platform makes for too strong
an opinion about the version of Kotlin that should be on the build
script's classpath. It clashes with the version of Kotlin that's
embedded in Gradle and used with Gradle's Kotlin DSL.

This commit switches to a normal platform (rather than an enforced
platform) which allows it to express an opinion about the version of
Kotlin without making it a strict requirement.

Closes gh-19609
5 years ago
Andy Wilkinson 7fda317f0d Merge branch '2.1.x' into 2.2.x
Closes gh-19657
5 years ago
Andy Wilkinson 617ebaf3c0 Isolate Gradle Plugin build from other Gradle configuration
Closes gh-19656
5 years ago
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
5 years ago
Andy Wilkinson 47b47c28a0 Reduce visibility of the Gradle plugin's test methods
See gh-19287
5 years ago
Andy Wilkinson 76f03a8cad Fix reflective access to archiveBaseName property
Previously, reflective access to the archiveBaseName property
incorrectly treated the property as a String. It should have been
treated as a Property<String>. This caused an exception to be thrown
and the deprecated baseName property to be used as a fallback.

This commit corrects the reflective access to the archiveBaseName
property. It also updates the tests to fail if a build outputs a
deprecation warning. Tests that use Gradle's Maven plugin have been
updated to expect deprecation warnings when run with Gradle 6.0 where
the plugin is deprecated. Tests that configure an archive's base name
have been updated to use archiveBaseName when running with Gradle 6.0
and later.

Closes gh-18663
5 years ago
dreis2211 347434ba81 Test the Gradle Plugin against Gradle 6.0.1
See gh-19065
5 years ago
Johnny Lim 96a029e44f Polish a test name
See gh-18999
5 years ago
Andy Wilkinson 379ba0dc00 Support Gradle 6.0
Previously, our Gradle plugin was not tested against Gradle 6.0,
a number of deprecation warnings were output when using the plugin
with Gradle 6, and some functionality related to the application
plugin did not work as expected.

This commit tests the plugin against Gradle 6. It also avoids calling
deprecated APIs. The plugin is compatibile against Gradle 4.10 where
the deprecated APIs' replacements are not available so reflection is
used to call the replcaements. Lastly, the way in which the base name
of the boot distribution that is created when the application plugin
is applied has been modified to ensure that it is effective when using
Gradle 6.

Closes gh-18663
5 years ago
Stephane Nicoll b951e70d18 Merge branch '2.1.x'
Closes gh-18850
5 years ago
dreis2211 8955d5c1b5 Test the Gradle Plugin against Gradle 5.6.4
See gh-18845
5 years ago
Andy Wilkinson 03f5791860 Merge branch '2.1.x'
Closes gh-18650
5 years ago
dreis2211 d17f11dbe1 Test the Gradle Plugin against Gradle 5.6.3
See gh-18648
5 years ago
Johnny Lim 137538f415 Remove accidental JavaVersion.current() call in BootRun
It was added accidentally in d2b28ceb.

See gh-18619
5 years ago
Andy Wilkinson 9a89039172 Provide a marker artifact for Boot's Gradle plugin
Closes gh-18514
5 years ago
Andy Wilkinson 9e514ab7f9 Provide plugin release repository for Asciidoctor Extensions
See b5069a4f8a
5 years ago
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
5 years ago
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
5 years ago
Andy Wilkinson ed29eea365 Align Spring Asciidoctor Extension dependency with new module names 5 years ago
Stephane Nicoll 852b369ce1 Revert to fixed version 5 years ago
Andy Wilkinson a6f1619971 Use Asciidoctor extension to verify documented configuration properties
Closes gh-18451
5 years ago
Phillip Webb a13666d696 Polish "Simplify code"
See gh-18342
5 years ago
Yuyan 4d0da4b700 Simplify code
See gh-18342
5 years ago
Brian Clozel eeaa9bc6c1 Fix ref docs code snippet theme
This commit also fixes a link in the reference documentation.

See gh-18293
5 years ago
Phillip Webb 838e7eb605 Extract spring-doc-resources URL property
Update the build to use a shared spring-doc-resources URL
rather than repeating it multiple times.

See gh-18293
5 years ago
Andy Wilkinson d5fc324537 Upgrade to Asciidoctor Maven Plugin 1.6.0
Closes gh-17234
5 years ago
Andy Wilkinson d2b28ceba5 Don't add -Xverify:none to JVM args when running on Java 13
Closes gh-17008
5 years ago
Johnny Lim 5b41c3b608 Polish
See gh-18192
5 years ago
Andy Wilkinson 0c0e2dd54b Merge branch '2.1.x'
Closes gh-18186
5 years ago
Andy Wilkinson 7b1e10ed00 Use one sentence per line in Actuator and Gradle plugin doc source
Closes gh-18185
5 years ago
Andy Wilkinson fc1889ee72 Merge branch '2.1.x'
Closes gh-18167
5 years ago
dreis2211 ae30515e5e Test the Gradle Plugin against Gradle 5.6.2
See gh-18164
5 years ago
Andy Wilkinson 7f8b3a7b86 Test the Gradle Plugin against Gradle 5.6.1
Closes gh-17995
5 years ago
dreis2211 26a22fa523 Test the Gradle Plugin against Gradle 5.6.1
See gh-17984

Closes gh-17984
5 years ago
Stephane Nicoll b57db504df Fix broken build due to Kotlin upgrade 5 years ago
Andy Wilkinson a785a5b58a Test the Gradle Plugin against Gradle 5.6
Closes gh-17883
5 years ago
dreis2211 56940fca97 Test the Gradle Plugin against Gradle 5.6
See gh-17876
5 years ago
SaberXu c6c3a91f8d Simplify if statements
See gh-17785
5 years ago
Stephane Nicoll 5926547767 Merge branch '2.1.x'
Closes gh-17745
5 years ago
Stephane Nicoll 0c560795fd Harmonize settings.gradle documentation in Gradle getting started guide
See gh-17736
5 years ago
Dave Syer e7b0450a7f Add missing repositories to snapshot configuration
See gh-17736
5 years ago
Phillip Webb 8bc780762a Merge branch '2.1.x' 5 years ago
Phillip Webb fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb 913e831f4e Merge '1.5.x' into 2.0.x 5 years ago
Stephane Nicoll f3a138da16 Skip Gradle Plugin test when building with JDK 13
See gh-16970
5 years ago
Phillip Webb 30b5ba87ae Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb 01933f9b06 Merge previously split strings
Merge some string lines that were previously split because of the
90 chars wide formatting.
5 years ago
Stephane Nicoll 79b29396d0 Merge branch '2.1.x'
Closes gh-17506
5 years ago
dreis2211 e9203a280c Test the Gradle Plugin against Gradle 5.5.1
See gh-17496
5 years ago
Andy Wilkinson 2816635418 Polish 5 years ago
Andy Wilkinson aa01bd3890 Polish "Polish GradleCompatibilityExtension's javadoc"
See gh-17411
5 years ago
dreis2211 dc4cc214fe Polish GradleCompatibilityExtension's javadoc
See gh-17411
5 years ago
Andy Wilkinson 9d5fa98334 Merge branch '2.1.x'
Closes gh-17429
5 years ago
Andy Wilkinson 7553b60e68 Test the Gradle Plugin against Gradle 5.5
Closes gh-17428
5 years ago
Phillip Webb a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
5 years ago
Andy Wilkinson 1fa48882bb Merge branch '2.1.x'
See gh-17362
5 years ago
Andy Wilkinson f4e7b80651 Merge branch '2.0.x' into 2.1.x
See gh-17361
5 years ago
Andy Wilkinson 761856ac70 Merge branch '1.5.x' into 2.0.x 5 years ago
Phillip Webb 605599138e Merge branch '2.1.x' 5 years ago
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 5 years ago
Madhura Bhave 7e22901bb2 Fail build on unresolved documentation links
Closes gh-12005
5 years ago
Andy Wilkinson 66f1344f7c Merge branch '2.1.x'
Closes gh-17335
Closes gh-17292
5 years ago
Andy Wilkinson 91786bc712 Merge branch '2.0.x' into 2.1.x
Closes gh-17334
5 years ago
Andy Wilkinson 256a0d636d Merge branch '1.5.x' into 2.0.x 5 years ago
Stephane Nicoll e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
5 years ago
Phillip Webb 1e0cf960f0 Reinstate single page HTML and PDF docs
Closes gh-16854
5 years ago
Phillip Webb 2c2b962204 Merge branch '2.1.x'
Closes gh-17232
5 years ago
Phillip Webb d82ccf1405 Ensure META-INF/MANIFEST.MF remains as first entry
Update Gradle archive tasks to ensure that `META-INF/` and
`META-INF/MANIFEST.MF` remain as the first entries of the archive.

Prior to this commit, rewritten archives would violate the implicit
specification of `JarInputStream` that these entries should be first.

Fixes gh-16698
5 years ago
Johnny Lim 368c0eebe4 Fix typo
See gh-17132
6 years ago
Phillip Webb b3d5cd538d Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions.

Closes gh-17093
6 years ago
Andy Wilkinson b18fffaf14 Move tests to JUnit 5 wherever possible 6 years ago
Andy Wilkinson aef92b9295 Merge branch '2.1.x'
Closes gh-17079
6 years ago
Andy Wilkinson 24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
6 years ago
Andy Wilkinson c6c139d980 Merge branch '1.5.x' into 2.0.x 6 years ago
Phillip Webb ad5e905bd7 Update copyright header of changed files 6 years ago
Andy Wilkinson ecf7c817a6 Build and test the Gradle plugin with Java 11 and 12
Closes gh-12333
6 years ago
dreis2211 e59d734098 Fix Gradle plugin code formatting
See gh-16984
6 years ago
Andy Wilkinson c80218064f Use sorted properties to make build info output repeatable
Closes gh-14494
6 years ago
Andy Wilkinson 54b123028c Default to optimized launch of the JVM when using Gradle's bootRun
Closes gh-16222
6 years ago
Andy Wilkinson 7713a7f33a Fix inclusion of Gradle DSL snippets in plugin reference docs
Closes gh-16968
6 years ago
Andy Wilkinson babb94c791 Migrate spring-boot-gradle-plugin's tests to JUnit 5
Closes gh-16959
6 years ago
Andy Wilkinson f35b91a172 Raise minimum supported version of Gradle to 4.10 and encourage use of 5.x
Closes gh-16681
6 years ago
Andy Wilkinson 538030b57e Merge branch '2.1.x'
Closes gh-16693
6 years ago
Andy Wilkinson 881fbeff43 Test the Gradle Plugin against Gradle 5.4.1
Closes gh-16576
6 years ago
Andy Wilkinson 7d2a99943f Merge branch '2.1.x' 6 years ago
Andy Wilkinson dfbc787737 Test the Gradle plugin against Gradle 5.4
Closes gh-16576
6 years ago
Andy Wilkinson 9d1f584560 Adapt Gradle plugin tests to change in Kotlin's packaging
Closes gh-16554
6 years ago
Phillip Webb 52e635b823 Merge branch '2.1.x' 6 years ago