Allow to pass any object for 'jdkVersion'.
This object should be accepted by 'JavaVersion.toVersion' method. ^KT-45611 In Progress
This commit is contained in:
+10
-4
@@ -40,8 +40,10 @@ interface KotlinJavaToolchain {
|
|||||||
*
|
*
|
||||||
* Major JDK version is considered as compile task input.
|
* Major JDK version is considered as compile task input.
|
||||||
*
|
*
|
||||||
* @param jdkHomeLocation path to JDK.
|
* @param jdkHomeLocation path to the JDK
|
||||||
|
*
|
||||||
* *Note*: project build will fail on providing here JRE instead of JDK!
|
* *Note*: project build will fail on providing here JRE instead of JDK!
|
||||||
|
*
|
||||||
* @param jdkVersion provided JDK version
|
* @param jdkVersion provided JDK version
|
||||||
*/
|
*/
|
||||||
fun use(
|
fun use(
|
||||||
@@ -52,12 +54,16 @@ interface KotlinJavaToolchain {
|
|||||||
/**
|
/**
|
||||||
* Set JDK to use for Kotlin compilation.
|
* Set JDK to use for Kotlin compilation.
|
||||||
*
|
*
|
||||||
* @see [use]
|
* @param jdkHomeLocation path to the JDK
|
||||||
|
*
|
||||||
|
* **Note**: project build will fail on providing here JRE instead of JDK!
|
||||||
|
*
|
||||||
|
* @param jdkVersion any type that is accepted by [JavaVersion.toVersion]
|
||||||
*/
|
*/
|
||||||
fun use(
|
fun use(
|
||||||
jdkHomeLocation: String,
|
jdkHomeLocation: String,
|
||||||
jdkVersion: JavaVersion
|
jdkVersion: Any
|
||||||
) = use(File(jdkHomeLocation), jdkVersion)
|
) = use(File(jdkHomeLocation), JavaVersion.toVersion(jdkVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
interface JavaToolchainSetter {
|
interface JavaToolchainSetter {
|
||||||
|
|||||||
Reference in New Issue
Block a user