[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 {
|
||||
|
||||
override fun resolveCompilerArguments(any: Any): List<String>? {
|
||||
if (any is KotlinCompilerArgumentsProducer) {
|
||||
return resolveCompilerArguments(any)
|
||||
return when (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> {
|
||||
|
||||
Reference in New Issue
Block a user