Commit Graph

371 Commits (2ea946f468f78006cdab9612515ffe1588fb6b09)

Author SHA1 Message Date
Brian Clozel 8376bc3697 Fix build after checkstyle imports updates
See gh-14911
6 years ago
Andy Wilkinson 9b8ead825c Polish 6 years ago
Andy Wilkinson 3f1b3db25a Merge branch '2.0.x' 6 years ago
Andy Wilkinson 1f34da9025 Document application plugin's need for mainClassName to be set
Closes gh-14250
6 years ago
Phillip Webb 01b8667dd7 Update copyright year for changed files 6 years ago
Andy Wilkinson a3d2f3f594 Polish "Add Kotlin DSL examples to Gradle Plugin's documentation"
Closes gh-14585
6 years ago
jnizet 5ed6c0d1ab Add Kotlin DSL examples to Gradle Plugin's documentation
See gh-14585
6 years ago
Andy Wilkinson 8c6910cf58 Polish "Refactor Gradle plugin tests to use runner's plugin classpath"
This commit removes the need for the Kotlin plugin tests to continue
to set the plugin classpath in each test build script. This is
achieved by adding the jars files containing the Kotlin plugin and
its dependencies to the runner's plugin classpath in the same way as
was already done for the dependency management plugin.

Closes gh-14680
6 years ago
jnizet c51449585e Refactor Gradle plugin tests to use runner's plugin classpath
Previously, each test build script used a property to configure its
classpath. This commit simplifies the tests by setting the classpath
once on the GradleRunner, thereby removing the need for it to be set in
each test script. It also allows, and, in fact, requires, the use of
the plugins block to apply the Boot plugin under test.

Unfortunately, this doesn't work for the tests for the reaction to the
Kotlin plugin. See the comments in the GradleBuild class and in each
KotlingPluginActionIntegrationTests build script.

See gh-14680
6 years ago
Andy Wilkinson 76849c12e5 Merge branch '2.0.x' 6 years ago
Andy Wilkinson cf24d18139 Explicity set permissions on files in lib of Boot distribution
Previously, only the permissions for the scripts in bin/ were set. The
permissions for the files in lib/ were not explicity set, leaving them
with the same permissions as the source files in Gradle's cache. This
has proven to be a little brittle when building in certain
environments, leading to test failures. It also assumes that the
file permissions in Gradle's cache will be appropriate for entries in
a distribution archive. That may not always be a reasonable assumption
to make.

To avoid the above-described problems, this commit updates the copy
spec that's used to add files to lib/ in the archive so that each
file uses 0644 for its permissions.

Closes gh-14158
6 years ago
Johnny Lim 335775892b Polish
See gh-14667
6 years ago
Andy Wilkinson 285f6bfd5f Merge branch '2.0.x' 6 years ago
jnizet eee07a840f Move away from deprecated Gradle configurations
Closes gh-14593
6 years ago
Andy Wilkinson c1b864c826 Polish 6 years ago
durigon 7aaeefbc0e Use Matcher from pre-compiled Pattern rather than String for replaceAll
Closes gh-14483
6 years ago
Andy Wilkinson a2cf2cd87f Raise the minimum supported version of Gradle to 4.4
Closes gh-14418
6 years ago
Andy Wilkinson ae4e1d0372 Test the Gradle plugin against Gradle 4.10
Closes gh-14417
6 years ago
Andy Wilkinson 630e2d0b41 Correct the permissions of scripts in archives of boot distribution
Closes gh-14158
6 years ago
Andy Wilkinson e4b9316613 Merge branch '2.0.x' 6 years ago
Andy Wilkinson 78464f999f Test the Gradle plugin against Gradle 4.10
Closes gh-14417
6 years ago
Andy Wilkinson 6041bc5bb0 Correct the permissions of scripts in archives of boot distribution
Closes gh-14158
6 years ago
Andy Wilkinson ad4179cc43 Merge branch '2.0.x' 6 years ago
Andy Wilkinson 6c865f9b43 Polish
See gh-1176
6 years ago
Andy Wilkinson 79a964e563 Merge branch '2.0.x' 6 years ago
Andy Wilkinson 53372d5fd7 Document the use of --args to pass arguments to bootRun
Closes gh-1176
6 years ago
Phillip Webb 9d1b3a2b49 Merge branch '2.0.x' 6 years ago
Phillip Webb 9af6b3422f Polish 6 years ago
Andy Wilkinson e3e3a44045 Merge branch '2.0.x' 6 years ago
Andy Wilkinson 1973e342c9 Do not use lambda for task action as it breaks up-to-date checks
Due to gradle/gradle#5510, using a lambda for a task action breaks
up-to-date checks in certain circumstances.

This commit updates JavaPluginAction to use an inner-class in place
of a lambda for the action that it adds to JavaCompile tasks. A test
has not been added as it does not appear to be possible to reproduce
it with a TestKit-based test.

Closes gh-14054
6 years ago
Phillip Webb a6c9c92f2e Merge branch '2.0.x' 6 years ago
Phillip Webb 63b609827e Fix checkstyle method order issues
Fix checkstyle issues with method ordering following the
spring-javaformat upgrade.

See gh-13932
6 years ago
Phillip Webb 7fc455654a Fix checkstyle ternary issues
Fix checkstyle issues with ternary expressions following the
spring-javaformat upgrade.

See gh-13932
6 years ago
Phillip Webb ec1100a896 Upgrade to spring-javaformat 0.0.6
Closes gh-13932
6 years ago
Phillip Webb cddd794a07 Polish 6 years ago
Andy Wilkinson 147a08eb4c Merge branch '2.0.x' 6 years ago
Andy Wilkinson b9ad0d9992 Test the Gradle plugin against Gradle 4.8.1 instead of 4.8
Closes gh-13809
6 years ago
Andy Wilkinson 8deea933b9 Test the Gradle plugin against Gradle 4.9
Closes gh-13808
6 years ago
Andy Wilkinson a097f923c1 Provide sensible defaults for launch script properties when using Gradle
Closes gh-4458
7 years ago
Andy Wilkinson 6f2171c282 Improve error message when BootJar or BootWar has no known main class
Closes gh-12712
7 years ago
Andy Wilkinson 70c0d6a005 Test the Gradle plugin against Gradle 4.8
Closes gh-13359
7 years ago
Andy Wilkinson 00449bef6a Use app…DefaultJvmArgs as convention for start script's defaultJvmOpts
Closes gh-12631
7 years ago
Andy Wilkinson d54072e0a8 More accurately document buildInfo's effect on up-to-date checking
Closes gh-13152
7 years ago
Phillip Webb 09fa1e7e11 Polish 7 years ago
Eddú Meléndez 065eebfb4b Fix javadoc
Closes gh-13274
7 years ago
Phillip Webb 21d80d87a3 Merge branch '1.5.x' into 2.0.x 7 years ago
Vedran Pavic a08fa27c39 Add .gitignore for Gradle Plugin module
Closes gh-13137
7 years ago
Andy Wilkinson 7913d9b599 Add methods to BootJar for adding content to BOOT-INF
Closes gh-13000
7 years ago
Stephane Nicoll 9dccf5b895 Polish
See gh-13078
7 years ago
Andy Wilkinson 2bcf29913d Skip building the Gradle plugin on Java 9 as well as 10
Upgrading the JDK 9-based build to use JDK 9.0.4 has revealed that
Gradle 4.0.x doesn't work with it as it fails to parse the 9.0.4
version number.

This commit disables building the Gradle plugin on Java 9 (as we
had already done for Java 10) until we decide what to do
(see gh-12333).
7 years ago
Phillip Webb 41efea51a7 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
7 years ago
Andy Wilkinson f5fabbc1b9 Remove the use of internal API from Gradle Plugin's BootJar
Closes gh-13037
7 years ago
Andy Wilkinson a5f3f36b58 Test the Gradle plugin against Gradle 4.7
Closes gh-12952
7 years ago
Andy Wilkinson 72ec2c8644 Polish “Only analyze configurations that we've registered to check”
Closes gh-12784
7 years ago
danhyun 1e447ebfbf Only analyze configurations that we've registered to check
See gh-12784
7 years ago
Andy Wilkinson 806978b8f1 Test unresolved dependency analysis in the Gradle plugin
See gh-12784
7 years ago
Andy Wilkinson f335ec00bf Polish 7 years ago
igor-suhorukov 69bc19e0ca Use lambdas for map entry iteration where possible
See gh-12626
7 years ago
Andy Wilkinson 1f35abacd6 Polish “Configure Kotlin compiler to use -java-parameters by default”
Closes gh-12641
7 years ago
Rui Figueira 5e2726f896 Configure Kotlin compiler to use -java-parameters by default
See gh-12641
7 years ago
Johnny Lim 751c444166 Polish
See gh-12326
7 years ago
Andy Wilkinson 3370c23ab9 Skip the Gradle plugin when building with the full profile and JDK 10
See gh-12028
7 years ago
Andy Wilkinson 2b1252e282 Skip the Gradle Plugin when building with JDK 10
Previously, the JDK 10 build would fail as we build the plugin using
Gradle 4.0.x (the lowest version of Gradle that we support) and
Gradle 4.0.x doesn't work with Java 10.

Upgrading to Gradle 4.1, which appears to work with Java 10, was
considered but rejected for now as it introduces the risk that we
inadvertently use an API that's new in 4.1 and break our 4.0 support.

This commit goes for the extreme option and disables building the
Gradle Plugin when building with JDK.

See gh-12028
7 years ago
Andy Wilkinson 4a3e0a231c Test the Gradle plugin against Gradle 4.6
Closes gh-12314
7 years ago
Andy Wilkinson e4a1fed3b8 Test the Gradle plugin against Gradle 4.6 7 years ago
Andy Wilkinson 188d120c9c Test the Gradle plugin against Gradle 4.5.1
Closes gh-12315
7 years ago
Andy Wilkinson 8d1e69bca4 Polish Gradle plugin's javadoc 7 years ago
Andy Wilkinson 703de64842 Reinstate imports 7 years ago
Phillip Webb 7bc535e4fa Polish 7 years ago
Andy Wilkinson 9640881f38 Fix BuildInfo up-to-date check when group, name, or version changes
Previously, if the project's group, name, or version changed the
BuildInfo task would still be considered up-to-date as the values of
the project's properties were not reflected in the fields of the
BuildInfo instance.

This commit updates BuildInfo to copy the value of the project's
property to the corresponding BuildInfo field when the property is
read using its getter method on BuildInfo.

Closes gh-12266
7 years ago
Phillip Webb 3e4da3cc37 Polish 7 years ago
Andy Wilkinson fdb9a1ea8f Consider time in BuildInfo up-to-date checks and allow it to be set
Closes gh-12111
Closes gh-12266
7 years ago
Andy Wilkinson 30f79f2fb1 Use application name as convention for distribution's base name
Closes gh-12232
7 years ago
Phillip Webb 29c3be3590 Polish 7 years ago
Stephane Nicoll 2641559231 Polish contribution
Closes gh-12202
7 years ago
dreis2211 e2fb093ccf Polish
See gh-12202
7 years ago
Andy Wilkinson a09c64e18c Polish 7 years ago
Andy Wilkinson 70c613819d Fix incomplete calls to assertThat 7 years ago
Andy Wilkinson 76a450dfba Format with Eclipse Oxygen SR2 7 years ago
Andy Wilkinson b4f4dd3fdd Correct location of JDT config files in Gradle plugin 7 years ago
dreis2211 81459efffa Use HTTPS URLs where applicable 7 years ago
Phillip Webb 7d5e41f7dc Polish 7 years ago
Johnny Lim 3cead7693d Polish
Closes gh-11871
7 years ago
Andy Wilkinson 8f116f7e6f Align ordering of BootJar and BootWar archive entries
Previously, the ordering of the entries in an archive produced by
BootJar was different to the ordering of the entries in an archive
produced by BootWar. The latter placed application classes before
any nested jars, whereas the former was the other way around.

This commit updates BootJar to use the same ordering as BootWar and
adds tests to verify that the ordering is the following:

1. Loader classes
2. Application classes (BOOT-INF/classes or WEB-INF/classes)
3. Nested jars (BOOT-INF/lib or WEB-INF/lib)
4. Provided nested jars in a war (WEB-INF/lib-provided)

The tests also verify that the position of a library is not affected
by it requiring unpacking.

See gh-11695
See gh-11696
7 years ago
Phillip Webb 7c5042d079 Don't run `apply-plugin` tests
Stop running apply-plugin tests as part of the build since during a
release the version number will change and the jar will not be
available.

Fixes gh-11857
7 years ago
Phillip Webb 6dddceacad Always include plugin classpath in sample gradle
Update a couple of the `spring-boot-gradle-plugin` sample gradle flies
so that they include the running classpath. The additional lines are
contained within a tag which is ultimately filtered from the final
documentation.

Fixes gh-11857
7 years ago
Andy Wilkinson 199088b0c9 Set kotlin.version when Kotlin's Gradle plugin is applied
Closes gh-11711
7 years ago
Phillip Webb b234501af3 Polish 7 years ago
Johnny Lim a46e047c5d Polish
Closes gh-11792
7 years ago
Andy Wilkinson 498f66fcdc Test the Gradle plugin against Gradle 4.5
Closes gh-11768
7 years ago
Phillip Webb f3379668ac Polish 7 years ago
Andy Wilkinson 54c0cf513b Polish 7 years ago
Andy Wilkinson ffc99b03dd Remove use of deprecated Gradle API from plugin's public API
This commit removes the use of the incubating PropertyState and
Provider API that was introduced in Gradle 4.0 and deprecated in
Gradle 4.3. A not-deprecated-but-still-incubating replacement was
introduced in Gradle 4.3. The short life of PropertyState and Provider
has made me wary of using an incubating Gradle API in our public API
as it may not be stable for long. Therefore, this commit does not move
to the replacement as it is incubating. Instead, it falls back to
using Gradle's convention mapping. This is internal API, but its use
is not part of our public API and I perceive the risk of using it to
be lower than using the deprecated and/or incubating API alternatives.

Closes gh-11640
7 years ago
Andy Wilkinson 5e17fc775c Test the Gradle plugin against Gradle 4.4.1
Closes gh-11654
7 years ago
Andy Wilkinson 2668e41dd5 Make it easier to just use Boot’s dependency management with Gradle
Closes gh-11059
7 years ago
Phillip Webb b078698f20 Update copyright year of changed files 7 years ago
Andy Wilkinson a7808388ad Make github-tag property available when generating Gradle plugin docs
Closes gh-11490
7 years ago
Andy Wilkinson 38ac595615 Polish 7 years ago
Stephane Nicoll 6277d0ceb7 Update copyright header 7 years ago
dreis2211 eb1ae2dd79 Fix typos
Closes gh-11460
7 years ago
Andy Wilkinson b545330d8e Fix reusable archive creation with Gradle 4.1 and later
Closes gh-11468
7 years ago
Andy Wilkinson ffca60d308 Revert "Rework BootRun so that it does not subclass JavaExec"
This reverts commit 6eee9de3c1.

Closes gh-10872
7 years ago
Andy Wilkinson 417c98304d Remove assumption about file separator that is incorrect on Windows
Closes gh-11087
7 years ago
Andy Wilkinson e43d0adc4f Polish 7 years ago
Andy Wilkinson 9bbccb093a Rename Gradle plugin tests to work around Windows filename restrictions
The Gradle plugin integration tests find their Gradle build scripts
using a naming convention of ${ClassName}-${methodName}.gradle. This
convention led to two gradle scripts with filenames that were long
enough to causes problems on Windows.

This commit renames two test methods to reduce the length of their
names and, therefore, the names of their corresponding Gradle script
files.

Closes gh-10868
7 years ago
Phillip Webb c55b5d7111 Polish 7 years ago
Andy Wilkinson 6f55b57855 Make discovery of additional config metdata more robust with Gradle
Previously, the configuration metadata annotation processor relied
upon an additional metadata file have been copied to an output
location. When building with Gradle, it's the processResources task
that performs this copy and there is no guarantee that it will have
run before the compileJava task unless an explicit dependency betwee
the two tasks has been configured. If a project is built using
Gradle's parallel build support, the likelihood of this required
ordering not occurring increases.

This commit updates the configuration metadata annotation processor to
consider a new annotation processor option when looking for the
additional config metadata file. The Gradle plugin has been updated
to provide this option as a compiler argument. The option is only
provided when the annotation processor is found on the compilation
classpath to avoid a warning from javac's annotation processing about
the use of an option that is not supported by any of the available
annotation processors.

Closes gh-9755
7 years ago
Andy Wilkinson 48cc7bde30 Test the Gradle plugin against Gradle 4.3
Closes gh-10769
7 years ago
Andy Wilkinson ca4d7f7322 Test the Gradle plugin against Gradle 4.3-rc-4
See gh-10769
7 years ago
Andy Wilkinson c3f3bba090 Test the Gradle plugin against Gradle 4.3-rc-3
See gh-10769
7 years ago
Andy Wilkinson a256602c7b Polish 7 years ago
Andy Wilkinson ccca943e33 Add mainClassName to springBoot DSL in Gradle plugin
This commit introduces a new mainClassName property on the springBoot
DSL provided by the Gradle plugin. It can be used to explicitly
configure the mainClassName of the default bootRun, bootJar, and
bootWar tasks in a single place. Previously, the only mechanism
provided to do so was the mainClassName property that's only available
when the application plugin has been applied.

Closes gh-10623
7 years ago
Andy Wilkinson 5502aaafd1 Use mainClassName consistently across BootRun, BootJar, and BootWar
Previously, BootRun used the main property to configure the name of
the main class to run while BootJar and BootWar used the mainClass
property. Both were different to the application plugin which provides
a mainClassName project property.

This commit updates BootRun, BootJar, and BootWar to change the name
of the property used to configure the name of the main class to be
mainClassName. This makes the three Boot-specific tasks consistent
with each other, and also aligns them with Gradle's own application
plugin.

Closes gh-10622
7 years ago
Johnny Lim 5aa32b3d0f Polish
Closes gh-10636
7 years ago
Johnny Lim a51765d0f4 Fix broken documentation links
Update links following recent project restructure.

Closes gh-10601
7 years ago
Andy Wilkinson 6323dc4e21 Reduce logging that is produced when building Gradle plugin
Travis is terminating builds as they are producing too much logging.
A major contributor to the volume of logging is the Gradle plugin's
build. This commit switches off debug logging for the build and
enables test event logging. This considerably reduces the volume of
logging that is produced while still providing some insight into the
build's tests.
7 years ago
Andy Wilkinson 41fc023a67 Remove unnecessary override of helper plugin's version 7 years ago
Phillip Webb 3476f7b8a4 Add debug logging switches to Gradle launch
Update launched Gradle options to include debug logging.

See gh-9316
7 years ago
Phillip Webb c6f930b49e Fix Gradle to use flattened POM file
Update the Gradle plugin to use version information from the
flattened POM.xml files.

See gh-9316
7 years ago
Phillip Webb b87f9c11f1 Fix POMs for the updated build/release process
Fix POMs following project relocations and apply CI friendly Maven
conventions.

See gh-9316
7 years ago
Phillip Webb 0ba4830b4f Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released.

The following projects are under `spring-boot-project`:

  - `spring-boot`
  - `spring-boot-autoconfigure`
  - `spring-boot-tools`
  - `spring-boot-starters`
  - `spring-boot-actuator`
  - `spring-boot-actuator-autoconfigure`
  - `spring-boot-test`
  - `spring-boot-test-autoconfigure`
  - `spring-boot-devtools`
  - `spring-boot-cli`
  - `spring-boot-docs`

See gh-9316
7 years ago