Usually, java 9 source sets contain only module-info.java file, so
Kotlin compilation does not run because there are no .kt sources.
However, it can still start after some incremental changes and
thus it's important to have its JVM target configured consistently
with Java compilation of the same source set.
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.
Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
The reason is that when advancing language version, for example from 1.5
to 1.6, there is a brief period between bootstraps where the
bootstrapped compiler has latest stable language version 1.6, yet the
project is still built with 1.5. That leads to a (correct) warning that
progressive mode makes no sense unless the latest language version is
used, which fails the build because of Werror.
When testing bootstrap in progressive mode, we don't actually care about
these warnings, so disable Werror in this case.
The only case where this could matter would be if we were introducing
_warnings_ in progressive mode and checking that there are no new
warnings on Kotlin would be important for us, but so far progressive
mode has only been used to turn already existing warnings to errors.
For example it fixes compilation of `:kotlin-ide.kotlin.generators:testClasses`
This commit fixes that Gradle tries to find jars of 202 IDEA in ivy repo of 211 IDEA:
```
* What went wrong:
Execution failed for task ':kotlin-ide.kotlin.tests-common:compileTestKotlin'.
> Could not resolve all files for configuration ':kotlin-ide.kotlin.tests-common:testCompileClasspath'.
> Could not find extensions-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/extensions-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/extensions.jar
> Could not find guava-29.0-jre-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/guava-29.0-jre-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/guava-29.0-jre.jar
> Could not find asm-all-8.0.1-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/asm-all-8.0.1-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/asm-all-8.0.1.jar
> Could not find streamex-0.7.2-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/streamex-0.7.2-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/streamex-0.7.2.jar
```
java_home tool shows also JRE installations located at
"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" path.
They should not be used as there are no javac and other tools there.
This commit fixes:
```
org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException:
Could not find method intellijDep() for arguments [] on object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
```
This commit fixes:
```
* What went wrong:
Execution failed for task ':kotlin-ide.intellij.platform.testExtensions:compileKotlin'.
> Could not resolve all files for configuration ':kotlin-ide.intellij.platform.testExtensions:compileClasspath'.
> Could not find intellij-core-analysis-deprecated-202.7660.26.jar (kotlin.build:ideaIC:202.7660.26).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/artifacts/lib/intellij-core-analysis-deprecated.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/artifacts/intellij-core-analysis-deprecated.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/artifacts/plugins/ideaIC/lib/intellij-core-analysis-deprecated.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/intellij-core-analysis-deprecated-202.7660.26.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/202.7660.26/intellij-core-analysis-deprecated.jar
```