Cleanup warnings in scripting code

This commit is contained in:
Ilya Chernikov
2020-04-06 13:12:56 +02:00
parent d863dc04e6
commit 195a90d333
20 changed files with 134 additions and 119 deletions
@@ -29,7 +29,7 @@ suspend fun resolveFromAnnotations(resolver: ExternalDependenciesResolver, annot
return annotations.filterIsInstance(DependsOn::class.java).flatMapSuccess { dep ->
val artifactCoordinates =
if (dep.value.isNotBlank()) dep.value
else listOf(dep.groupId, dep.artifactId, dep.version).filter { it?.isNotBlank() ?: false }.joinToString(":")
else listOf(dep.groupId, dep.artifactId, dep.version).filter { it.isNotBlank() }.joinToString(":")
resolver.resolve(artifactCoordinates)
}
}
@@ -141,7 +141,7 @@ class MainKtsConfigurator : RefineScriptCompilationConfigurationHandler {
return resolveResult.onSuccess { resolvedClassPath ->
ScriptCompilationConfiguration(context.compilationConfiguration) {
if (resolvedClassPath != null) updateClasspath(resolvedClassPath)
updateClasspath(resolvedClassPath)
if (importedSources.isNotEmpty()) importScripts.append(importedSources)
if (compileOptions.isNotEmpty()) compilerOptions.append(compileOptions)
}.asSuccess()