Model test fixtures as a propert artifact Previously they were modeled as just a file collection, which confused the IDEA importer. They now use the more canonical way of defining an additional artifact.
In a next step they should be reimplemented using variant aware dependency resolution, so that we don't need a special DSL to declare these dependencies.
Remove dependency on Java 7 in our build (#6494) ### Context
Currently we need 3 JDKs to build Gradle:
- Java 7 to compile most code - Our build runs on Java 8 - Java 9 to compile some code using Java 9 API.
Our goal is to use only one JDK. After this PR, we can:
- If running the build on Java 9/10, we can only use a single JDK. - If running the build on Java 8, we still need an extra JDK to compile some code using Java 9 API. After we migrate all CI builds to Java 9/10, we may completely drop the support for running on Java 8.
Previously, we use different JDKs to compile different subprojects, which made things really complicated. This PR greatly simplify the compiler selection code, after this PR, we only need one single Java9-compatible JDK to compile all code.
#### Refine verification mechanism
Previously, we had verification for:
- If build cache enabled, verify the current build is running on Java 8 because CI is running on Java 8. - If running some specific tasks (e.g. distribution generation), verify the build/compiler JDK is Oracle JDK.
This PR does the following improvements:
- Since all `Compile` tasks share a common compiler, verify that compiler is Java9-compatible. Oracle JDK is not mandatory. - If running some specific tasks (e.g. distribution generation), verify the build/compiler JDK is Oracle JDK.
This PR collects these verification into a single plugin, instead of code everywhere previously.