[Gradle][Minor] IdeCompilerArgumentsResolver: Replace if with when
KTIJ-24976
This commit is contained in:
committed by
Space Team
parent
133f2260e0
commit
d85d6fc0bb
+4
-8
@@ -19,15 +19,11 @@ internal class IdeCompilerArgumentsResolverImpl(
|
|||||||
) : IdeCompilerArgumentsResolver {
|
) : IdeCompilerArgumentsResolver {
|
||||||
|
|
||||||
override fun resolveCompilerArguments(any: Any): List<String>? {
|
override fun resolveCompilerArguments(any: Any): List<String>? {
|
||||||
if (any is KotlinCompilerArgumentsProducer) {
|
return when (any) {
|
||||||
return resolveCompilerArguments(any)
|
is KotlinCompilerArgumentsProducer -> resolveCompilerArguments(any)
|
||||||
|
is KotlinCompilation<*> -> resolveCompilerArguments(any.compileTaskProvider.orNull ?: return null)
|
||||||
|
else -> return null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (any is KotlinCompilation<*>) {
|
|
||||||
return resolveCompilerArguments(any.compileTaskProvider.orNull ?: return null)
|
|
||||||
}
|
|
||||||
|
|
||||||
return null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun resolveCompilerArguments(producer: KotlinCompilerArgumentsProducer): List<String> {
|
private fun resolveCompilerArguments(producer: KotlinCompilerArgumentsProducer): List<String> {
|
||||||
|
|||||||
Reference in New Issue
Block a user