Commit Graph

342 Commits (30262e3bc1a58de1f79c6a91715e44b44dc47ac1)

Author SHA1 Message Date
Andy Wilkinson a07833fb51 Make BootRunIntegrationTests compatible with Java 9
Closes gh-10019
7 years ago
Andy Wilkinson 7bd285dd93 Polish 7 years ago
Andy Wilkinson fb510043a2 Look in the right place for plugin's classes during integration tests
See gh-9516
7 years ago
Andy Wilkinson 36120d729a Ignore mainClassName property when its value is null
Closes gh-9892
7 years ago
Andy Wilkinson c2459fce47 Raise the minimum version of Gradle to 4.0
Closes gh-9516
7 years ago
Emanuel Campolo 04fdec6f8b Replace explicit generics with diamond operator
Where possible, explicit generic declarations to use the Java 8 diamond
operator.

See gh-9781
7 years ago
Phillip Webb c635bf5026 Fix broken Gradle plugin imports
Fix imports that were accidentally broken in commit 3a01f4a6d.
7 years ago
Phillip Webb 3a01f4a6da Polish lambda formatting 7 years ago
Andy Wilkinson a2f791287f Disable the use of Gradle's daemon when running compatility tests 7 years ago
Andy Wilkinson 1b1c9d06f4 Update Gradle compatibility versions to cover 4.0.1 and 4.1-rc-1
Closes gh-9598
7 years ago
Eddú Meléndez 9910eab47c Update Gradle versions to check compatibility with 3.5.1, 4.0, 4.1 M1
See gh-9598
7 years ago
Andy Wilkinson 216c5c2179 Set executable permission on Gradle-built archives that include launch script
Closes gh-9632
7 years ago
Andy Wilkinson c59214792b Verify that bootJar and bootWar handle duplicates gracefully
Closes gh-9573
8 years ago
Andy Wilkinson f0b7e7cf56 Ensure that fat jars and wars do not corrupt UTF-8 entry names
Previously, both Repackager and the Grade plugin used the JRE's
standard ZipOutputStream when creating a fat jar or war file. This
resulted in entry names that needed UTF-8 encoding to become
corrupted.

This commit updates both to use Commons Compress'
ZipArchiveOutputStream and to configure the stream's encoding and
each entry's Unix mode. This ensures that names are encoded using
UTF-8 and can be read back in correctly by common zip tools.

Closes gh-9405
8 years ago
Andy Wilkinson 4a605f6270 Drop custom software component in favor of just publishing an artifact
Previously, Spring Boot's Gradle plugin provided custom software
components (bootJava and bootWeb) for publishing the artifacts created
by the standard bootJar and bootWar tasks respectively. Providing a
custom software component requires the usage of some of Gradle's
internal APIs and this has now proven to be more trouble than it is
worth.

This commit removes the custom software component and documents how
to publish the artifact created by a BootJar or BootWar task directly
instead.

Closes gh-9153
8 years ago
Andy Wilkinson a685d9ec92 Run Gradle integration tests against multiple versions of Gradle
Closes gh-9365
8 years ago
Andy Wilkinson 5f3462f358 Use ObjectFactory rather than Usages to create Usage on Gradle 4.0
Usages has been removed in Gradle 4.0 and replaced with the use of
a new ObjectFactory API that can be used to create a Usage. This
commit uses reflection to access the ObjectFactory from the Project
and use it to create a Usage when an attempt to use Usages fails.

Closes gh-9364
8 years ago
Andy Wilkinson d5438c299c Polish "Use try-with-resources to close resources automatically"
- Apply code formatting
- Use try-with-resources in many other places that were missed in the
  pull request

Closes gh-8045
8 years ago
Andy Wilkinson e4f80e68fc Do not run Gradle plugin's tests when built with -DskipTests
Closes gh-9169
8 years ago
Andy Wilkinson 1ee9653f7c Group tasks and provide descriptions for tasks and configurations
Closes gh-8817
8 years ago
Andy Wilkinson 762a13e84f Configure assemble to depend upon bootJar or bootWar
Closes gh-8824
8 years ago
Andy Wilkinson a6d24a3bfc Allow bootWar to package webapp resources in dirs that overlap loader
Previously, the presence of a src/main/webapp/org directory would
cause the execution of BootWar to fail due to an attempt to write
a duplicate org/ entry to the zip output stream.

This commit updates BootZipCopyAction so that FileTreeElements that
match a directory entry created while writing the loader classes are
skipped.

Closes gh-8972
8 years ago
Andy Wilkinson ae0700efc1 Try to make RunningDocumentationTests platform independent
Windows seems unable to decide if the temp dir is in System32 or
system32 which breaks the comparison. This commit attempts to appease
the gods of case sensitity by reducing the portion of the path that we
check so that system32 vs System32 doesn't come into it.

See gh-8920
8 years ago
Andy Wilkinson 079b324e21 Make RunningDocumentationTests platform independent
Closes gh-8920
8 years ago
Stephane Nicoll 65986503c1 Fix glitch in doc
Closes gh-8921
8 years ago
Huang YunKun f303ce5ff4 Fix windows build of the Gradle plugin
Use family instead of name to check os system

Closes gh-8907
8 years ago
Andy Wilkinson 0186fb2e84 Fail fast when plugin is used with an unsupported version of Gradle
Closes gh-8820
8 years ago
Andy Wilkinson ab18901ad0 Ensure that entry is completely configured before putting to the stream
Previously, BootZipCopyAction would put the next entry to the stream
and then, in the case of a stored entry, configure its size, CRC32
etc. This had the benefit of being able to copy the entry into the
zip once, capturing its bytes for the calculation of the CRC32 as it
was copied. Unfortunately, while this produced zip files that could
be read by the JVM, other zip tools failed. For example, Go's zip
support that's used by CloudFoundry could not unzip the archive.

This commit updates BootZipCopy action to completely configure the
entry before putting it to the stream. This has the downside of
copying the file twice (once for the CRC32 and once to actually write
it to the zip stream) but this appears to be unavoidable as we have to
produce archives that can be unzipped without problems on all
platforms.

Closes gh-8816
8 years ago
Andy Wilkinson 2f64cdfa98 Include directory entries when copying loader into a Boot archive
See gh-8816
8 years ago
Andy Wilkinson 15d6c9d5c7 Merge pull request #8818 from Johnny Lim
* gh-8818:
  Fix typos in new Gradle plugin
8 years ago
Johnny Lim 8d921d49aa Fix typos in new Gradle plugin
Closes gh-8818
8 years ago
Andy Wilkinson 5bc721f3ad Polish Gradle plugin's documentation 8 years ago
Andy Wilkinson 7f5ca24ff9 Make Maven Central available to Gradle plugin's build 8 years ago
Andy Wilkinson 01166381a0 Provide separate documentation (API and reference) for Gradle plugin 8 years ago
Andy Wilkinson d43b1ae3a5 Polish the Gradle plugin's javadoc 8 years ago
Andy Wilkinson 85267def3e Integration test the reaction to the Application plugin being applied 8 years ago
Andy Wilkinson 915c17b955 Integration test the reaction to the Maven plugin being applied 8 years ago
Andy Wilkinson e552975a7a Integration test the reaction to the War plugin being applied 8 years ago
Andy Wilkinson c1f2f8079b Integration test the reaction to the Java plugin being applied 8 years ago
Andy Wilkinson b9b402e3db Rework BuildInfo to separate task and build info properties
Previously, the properties that applied to the BuildInfo task itself
and those that would be written into the build-info.properties file
were all configured on BuildInfo directly. This lack of separation
could be confusing.

This commit rework BuildInfo to separate the task's own properties
from those that are written into the build-info.properties file.

The task has also been updated so that changes to a project's
properties made after the task has been configured are reflected in
the build info properties.
8 years ago
Andy Wilkinson 201ea133e1 Guide users to apply dependency management plugin when resolution fails 8 years ago
Andy Wilkinson 8d55801c4d Restructure the code to enforce separation of plugin logic and tasks 8 years ago
Andy Wilkinson 1dc5c484f0 Use application plugin properties by convention when it is applied
bootRun's main and jvmArgs properties use mainClassName and
applicationDefaultJvmArgs respectively by convention.

bootJar and bootWar's mainClass property uses mainClassName by
convention.
8 years ago
Andy Wilkinson 188c9e0f42 Remove assumptions from BootInfo and move them to the DSL extension 8 years ago
Andy Wilkinson 5708eaf41b Simplify the DSL extension to provide a solid foundation 8 years ago
Andy Wilkinson 8048791ab2 Remove AgentPluginFeatures as they are undocumented
The current implementation is undocumented so it's not clear exactly
what it's intended to do. It also appears to overreach as, for
example, it affects every JavaExec task in a project.

We may need to reinstate something that's somewhat equivalent, but I'd
like to do that armed with more information about the intent of the
functionality and some specific problems that need to be solved.
8 years ago
Andy Wilkinson f440b7b7e3 Move decision about an entry's compression out into BootJar and BootWar 8 years ago
Andy Wilkinson 5bf8f778e2 Don't write the default loader classes when a custom launcher is used 8 years ago
Andy Wilkinson 2b44ad9809 Rework BootRunTask to be more idiomatic and make fewer assumptions 8 years ago
Andy Wilkinson 6e7e42459b Exclude Devtools by default and provide an option to include it 8 years ago