Simplifies and make it aligned with official documentation, which
removes some old workarounds. Additionally, it enables publication of
Gradle metadata file, which is required for plugin variants feature
support.
Instead of using 'gradleApi()' as Gradle API dependency, which provides
build current Gradle version api, now setup is using
"dev.gradleplugins:gradle-api" artifacts with specific Gradle version.
This allows to have more fine-grained Gradle support for removed apis.
^KT-49227 In Progress
* `install` task provided by `maven` plugin doesn't support configuration cache so replace `maven` plugin with `maven-publish` and use task that is subtype of PublishToMavenRepository. `maven-publish` partially support configuration cache, see https://github.com/gradle/gradle/issues/13468
* Apply `signing` plugin only if it really needed. The plugin doesn't support configuration cache. See https://github.com/gradle/gradle/issues/13470
Relates to #KT-44611
From KOTLIN-CR-2801 reasons to move:
- I've changed repo layout and build process in incompatible way and decided to change location
- It was difficult to find and annoying to locate, it was very deep and long path
- I think dependencies/repo path is very easy to remember and find
- It was called dependencies some time ago
* Fix Java not compiled in kotlin-gradle-plugin Kotlin source set
* Fix the integration tests running under Java 6
* Fix kotlin-gradle-subplugin-example not being installed -- needed
for a test
* Fix Android tests being always excluded
* Move versions out of `build.gradle` (x2) to a common `versions.gradle`
* Move JDK, dist and bootstrap to `commonConfiguration.gradle`
* Build `kotlin-gradle-plugin` with JDK_18
* Add gradle-tools subproject
* Add Gradle buildscripts to the related projects
* Remove the projects from the libraries pom.xml
* Move AndroidGradleWrapper.groovy to separate source root
* Changed artifact dependencies to project dependencies where needed
* Extract common configuration into commonConfiguration.gradle
* (convert functions to closures to be able to call them)
* Refactor DSL usage
* Replace `project.properties` with `findProperty`
* Unify Gradle wrapper between `libraries` and `gradle-tools`
(as a temporary solution, just made the wrapper files the same)