592 Commits

Author SHA1 Message Date
Andy Wilkinson
c078a48064 Update BootRun to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:15 +01:00
Andy Wilkinson
d1f543fc1d Update BuildInfo to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:12 +01:00
Andy Wilkinson
83cfd3b2e6 Update BootWar to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:07 +01:00
Andy Wilkinson
081ef2d905 Update BootJar to support Gradle's configuration cache
See gh-22922
2020-10-23 12:34:04 +01:00
Andy Wilkinson
c828521912 Allow tests to provide properties that modify the build.gradle script
See gh-22922
2020-10-23 12:34:01 +01:00
Andy Wilkinson
d136324b99 Add support for testing the Gradle plugin with --configuration-cache
See gh-22922
2020-10-23 12:33:51 +01:00
Andy Wilkinson
0aa0cba3f7 Fix content filters when excludeProjectDependencies() is used
Fixes gh-23763
2020-10-20 13:09:59 +01:00
olivier.antoine
ded2a8006a Expose BootBuildImage's cleanCache property as a command-line option
See gh-23753
2020-10-20 10:28:00 +02:00
Andy Wilkinson
0f069ee9c6 Merge branch '2.3.x'
Closes gh-23756
2020-10-19 19:28:32 +01:00
Andy Wilkinson
633027b1cd Upgrade to Gradle 6.7
Closes gh-23754
2020-10-19 17:52:01 +01:00
Andy Wilkinson
6898a97102 Merge branch '2.3.x'
Closes gh-23732
2020-10-17 07:55:43 +01:00
Andy Wilkinson
11b5e86ffd Deprecate BootJar#getConfigurations
Fixes gh-23527
2020-10-17 07:54:38 +01:00
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
2020-10-15 16:04:02 +01:00
Johnny Lim
4a26e11268 Polish
See gh-23634

Closes gh-23634
2020-10-13 12:44:00 -07:00
Scott Frederick
0e7ab88491 Polish "Update default builder image"
See gh-23628
2020-10-12 17:07:33 -05:00
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
2020-10-12 17:06:42 -05:00
Scott Frederick
f2721abf31 Merge branch '2.3.x'
Closes gh-23626
2020-10-09 13:22:00 -05:00
Scott Frederick
de685bdca4 Document buildpack configuration of JVM options
Fixes gh-21582
2020-10-09 13:21:37 -05:00
Scott Frederick
a099cd9420 Merge branch '2.3.x'
Closes gh-23623
2020-10-08 17:03:24 -05:00
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
2020-10-08 17:02:17 -05:00
Andy Wilkinson
70ed7784a6 Use Property<String>s for main class configuration in the Gradle plugin
Closes gh-23608
2020-10-08 14:23:01 +01:00
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
2020-10-07 18:18:21 -05:00
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
2020-10-07 16:51:33 -05:00
Andy Wilkinson
b7d020d3c2 Merge branch '2.3.x' 2020-10-06 15:58:01 +01:00
Andy Wilkinson
543763462c Update tests to look for snippets in correct location
See gh-23598
2020-10-06 15:57:25 +01:00
Andy Wilkinson
f44889b992 Merge branch '2.3.x'
See gh-23599
2020-10-06 14:44:50 +01:00
Andy Wilkinson
7eb92cc71a More Gradle snippets to correct location
See gh-23598
2020-10-06 14:44:26 +01:00
Andy Wilkinson
94884f201c Merge branch '2.3.x'
Closes gh-23599
2020-10-06 14:36:09 +01:00
Andy Wilkinson
2d3291fb83 Merge branch '2.2.x' into 2.3.x
Closes gh-23598
2020-10-06 14:35:49 +01:00
Andy Wilkinson
7ac14203ab Expand Gradle plugin's docs on setting bootRun's system properties
Closes gh-23578
2020-10-06 14:35:30 +01:00
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
2020-09-30 14:50:48 +01:00
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
2020-09-29 17:51:55 +01:00
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
2020-09-28 11:19:26 +01:00
Andy Wilkinson
b662f1e06e Remove UnresolvedDependenciesAnalyzer from the Gradle plugin
Closes gh-23479
2020-09-24 15:16:29 +01:00
Andy Wilkinson
9ecc548672 Merge branch '2.3.x'
Closes gh-23427
2020-09-21 12:16:28 +01:00
Andy Wilkinson
8667e9ded8 Merge branch '2.2.x' into 2.3.x
Closes gh-23426
2020-09-21 12:16:14 +01:00
Andy Wilkinson
581190d7a0 Test the Gradle plugin against 6.7-rc-1
Closes gh-23425
2020-09-21 12:14:35 +01:00
Andy Wilkinson
0f2ddd6480 Merge branch '2.3.x'
Closes gh-23423
2020-09-21 10:47:34 +01:00
Andy Wilkinson
d06af28cd8 Merge branch '2.2.x' into 2.3.x
Closes gh-23422
2020-09-21 10:47:06 +01:00
Andy Wilkinson
360e29af48 Polish "Add note about Kotlin main class name"
See gh-23418
2020-09-21 10:40:29 +01:00
Sebastiaan Fernandez
0bde5fda9b Add note about Kotlin main class name
See gh-23418
2020-09-21 10:36:16 +01:00
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
2020-09-18 13:51:20 -05:00
Andy Wilkinson
d2fae6e19e Merge branch '2.3.x'
Closes gh-23407
2020-09-18 09:09:53 +01:00
Andy Wilkinson
3861ef13fb Merge branch '2.2.x' into 2.3.x
Closes gh-23406
2020-09-18 09:09:41 +01:00
Andy Wilkinson
5ec673ff2a Add anchors to section headers in Gradle plugin docs
Fixes gh-23402
2020-09-18 09:06:54 +01:00
Scott Frederick
86fa8144f5 Polish "Support authentication to private Docker registry"
See gh-22972
2020-09-16 16:04:21 -05:00
姜为
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
2020-09-16 16:03:40 -05:00
Stephane Nicoll
f03ed3b2a7 Publish single page doc to /htmlsingle consistently
Closes gh-21585
2020-09-11 16:05:57 +02:00
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
2020-09-10 14:43:41 +01:00
Stephane Nicoll
defa7c47cd Merge branch '2.3.x'
Closes gh-23201
2020-09-07 12:42:48 +02:00