OpenSearch/buildSrc
Rene Groeschke 91e956e96a
Simplify jdk downloads via artifact transforms (#60713) (#60803)
* Simplify jdk downloads via artifact transforms

This reworks the jdk download plugin to use artifact transforms.
That allows us to simplify the jdk download plugin by a lot. The
benefits of using artifact transforms are:

- they transform an artifact to an upacked folder on the fly as part
of the dependenc resolution allowing us to remove all the custom created unpack tasks
and configurations

- Artifact transforms support gradle build cache. Requesting a jdk folder on a clean machine
will likely be resolved from the build cache

- The manual mingling about not extracting jdks multiple times by all jdks channeling through
root project configurations can be removed as they support up-to-date checking and build cache
which will ensure these archives are only resolved once per build at max.

Also the test coverage has been ported to Spock that supports data driven testing. This porting
includes an introduction to a wiremock fixture that can be used later on for mocking repository
urls in other integration tests

* Simplify artifact transform registration

* Change jdk finalization and repository setup

Jdk finalization is now done via `configuration.defaultDependencies`.
This has two benefits:
- we only configure and finalize the JDKs we actually use during the build
- afterEvaluate hooks are problematic in combination with task avoidance api.
Relying on task avoidance api in Gradle moves more configuration logic into the materialization
of tasks which is, with task avoidance api, is done ideally during the task graph calculation.
Anything created (e.g. jdks) created late in this task graph calculation would never be finalized
via afterEvaluate hooks as this has been fired before already with the jdk not there yet.

Furthermore we now only configure repositories in the projects where the jdk is declared
(aka the jdk-download plugin is applied) and only if the jdk is actually requested during the build.

* Fix javadoc

* Fix jdk download repo content filtering

* Minor cleanup

* Apply review feedback and cleanup
2020-08-06 12:34:20 +02:00
..
reaper Improvement usage of gradle task avoidance api (#56627) (#56981) 2020-05-25 09:37:33 +02:00
src Simplify jdk downloads via artifact transforms (#60713) (#60803) 2020-08-06 12:34:20 +02:00
.gitignore
build.gradle Add compatibility testing for JDBC driver (#60409) 2020-07-29 10:45:11 -07:00
formatterConfig.xml Tweak formatting config for exception lists (#54710) 2020-04-03 16:54:31 +01:00
settings.gradle Remove empty buildSrc subproject (#47415) 2019-10-01 16:34:31 -07:00
version.properties Bump version to 7.10.0 2020-07-15 11:56:45 +01:00