Make buckets in TeamCity configuration (#10552)
Currently, the primary obstacles for us to improve CI feedback time is the long-running jobs: `integTest`/`core`/`dependencyManagement` each takes more than 10 minutes. Without decreasing the time we can't improve CI feedback time.
This PR changes the previous subproject-based TC job to bucket-based TC job: a bucket can contain a split of large subproject, or many tiny subprojects. This makes CI configuration more flexiable and efficient.
For example, all tiny subprojects which only contain unit tests can be merged to `AllUnitTests`, just as before - but now we make this more generic.
`integTest` subproject can be split to 3 jobs: `integTest`/`integTest_2`/`integTest_3`. Splitted project has a special parameter `-PtestSplit=1/3`/`-PtestSplit=2/3`/`-PtestSplit=3/3` so the build can choose only a subset of tests to execute.
Change all subprojects to use 'implementation' dependencies
- All projects now explicitly declare all dependencies to other
subprojects. This makes issues more visible, guards for accidental
addition of new dependencies, and leaks much less transitive
dependencies on the compile classpathes.
- All usages of 'runtime' to declare dependencies have been replaced
- All projects are now `java-library` (and declare this explicitly)
- Most remaining Groovy scripts are translated to Kotlin
- The old 'compile' and 'runtime' configurations are not
configured/created anymore for the 'testFixture' and 'integTest'
- Some obsolete dependencies (see previous commits) are removed
- 'api' is used scarcely on purpose as the current project structure is
not well designed for this. The projects contain code for several
concerns of the build tool and thus putting complete projects on the
API of others exposes too much. They should be split up along
functional concerns first.