450 Commits

Author SHA1 Message Date
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
Stefan Wolf
86ca32e694 Enable stricter validation for Gradle plugin
See gh-25409
2021-02-25 17:28:51 +00:00
Andy Wilkinson
a2adb877ee Polish "Encourage use of maven-publish plugin in Gradle docs"
See gh-25299
2021-02-16 11:22:47 +00:00
Robert Smith
c0a5245a3e Encourage use of maven-publish plugin in Gradle docs
See gh-25299
2021-02-16 11:19:27 +00:00
Andy Wilkinson
67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
2021-02-02 13:03:21 +00:00
Phillip Webb
630d216430 Update copyright year of changed files 2021-02-01 22:10:24 -08:00
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
2021-02-01 15:31:28 -08:00
jongmin92
23ecb86089 Document missing code to run Gradle bootRun task
See gh-25012
2021-01-28 18:56:21 -08:00
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
2021-01-25 21:35:25 -08:00
Andy Wilkinson
46d908f632 Upgrade to Gradle 6.8.1
Closes gh-24737
2021-01-22 14:20:57 +00:00
Phillip Webb
9da0bd8523 Update copyright year of changed files 2021-01-12 12:02:57 -08:00
Andy Wilkinson
997505005b Handle files larger than Integer.MAX_VALUE bytes in bootJar and bootWar
Fixes gh-24618
2021-01-12 13:11:46 +00:00
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
2021-01-11 11:21:53 +00:00
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
2021-01-11 10:36:16 +00:00
Andy Wilkinson
5ad4d627fd Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9aa7d0f39362d78d946a146dac5fdee and adds
some additional tests.

Fixes gh-24192
2021-01-08 15:32:19 +00:00
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
2020-12-16 13:23:43 -06:00
Phillip Webb
5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
2020-12-04 18:21:57 -08:00
Phillip Webb
837fc83527 Fix checkstyle header violations
See gh-24337
2020-12-04 18:05:53 -08:00
Scott Frederick
da2276e7d4 Use stable builder and run images in integration tests
Fixes gh-24183
2020-11-17 13:54:10 -06:00
Andy Wilkinson
633027b1cd Upgrade to Gradle 6.7
Closes gh-23754
2020-10-19 17:52:01 +01:00
Andy Wilkinson
11b5e86ffd Deprecate BootJar#getConfigurations
Fixes gh-23527
2020-10-17 07:54:38 +01:00
Scott Frederick
de685bdca4 Document buildpack configuration of JVM options
Fixes gh-21582
2020-10-09 13:21:37 -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
543763462c Update tests to look for snippets in correct location
See gh-23598
2020-10-06 15:57:25 +01:00
Andy Wilkinson
7eb92cc71a More Gradle snippets to correct location
See gh-23598
2020-10-06 14:44:26 +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
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
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
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
Stephane Nicoll
648789ef84 Document that buildpacks use non-root users
Closes gh-21122
2020-09-07 12:41:51 +02:00
Stephane Nicoll
ee914624e6 Document buildpacks are configured with target Java version
Closes gh-21796
2020-08-31 16:15:30 +02:00
Andy Wilkinson
b57b2f0b44 Test the Gradle Plugin against 6.5 and 6.6
Closes gh-23075
2020-08-25 12:01:25 +01:00
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
2020-08-17 13:59:42 +02:00
Stephane Nicoll
b1e631e8a6 Remove trailing whitespaces 2020-08-17 13:59:08 +02:00
Scott Frederick
4c6a722f18 Fix test for Java version in image building docs
See gh-22916
2020-08-12 17:43:37 -05:00
Scott Frederick
005ed8b8db Use Java version wildcard in image building docs
Fixes gh-22916
2020-08-12 17:04:17 -05:00
Andy Wilkinson
f43a0b4891 Fix configuration of environment in Kotlin bootBuildImage examples
Fixes gh-22913
2020-08-12 17:06:16 +01:00
Andy Wilkinson
1381929525 Upgrade to Gradle 6.6
Closes gh-22905
2020-08-12 12:24:08 +01:00
Andy Wilkinson
00cd8945d5 Document how to use Gradle's native bom support
Closes gh-21570
2020-07-30 20:53:44 +01:00
Andy Wilkinson
accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
2020-07-20 13:58:19 +01:00
Andy Wilkinson
21f733b89b Merge branch '2.1.x' into 2.2.x
Closes gh-22409
2020-07-20 13:49:53 +01:00
Andy Wilkinson
179d2c79d6 Avoid trivialising what the reader's learning about
Closes gh-22408
2020-07-20 13:45:41 +01:00
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
2020-07-15 14:58:11 -05:00
Andy Wilkinson
794ded5286 Test the Gradle plugin against Gradle 6.5.1
Closes gh-22292
2020-07-09 16:01:52 +01:00
Andy Wilkinson
79770b9615 Use source sets to determine configurations deprecated for resolution
Fixes gh-22200
2020-07-02 15:14:00 +01:00