Gradle: fix warning about annotations path entry points to a non-existent location

#KT-6865 Fixed
This commit is contained in:
Natalia Ukhorskaya
2015-02-25 17:55:47 +03:00
parent 171ea9416e
commit 09435ad0e3
@@ -120,9 +120,11 @@ public open class KotlinCompile() : AbstractKotlinCompile<K2JVMCompilerArguments
}
val embeddedAnnotations = getAnnotations(getProject(), getLogger())
val userAnnotations = (kotlinOptions.annotations ?: "").split(File.pathSeparatorChar).toList()
val userAnnotations = kotlinOptions.annotations?.split(File.pathSeparatorChar)?.toList() ?: emptyList()
val allAnnotations = if (kotlinOptions.noJdkAnnotations) userAnnotations else userAnnotations.plus(embeddedAnnotations.map { it.getPath() })
args.annotations = allAnnotations.makeString(File.pathSeparator)
if (allAnnotations.isNotEmpty()) {
args.annotations = allAnnotations.join(File.pathSeparator)
}
args.noStdlib = true
args.noJdkAnnotations = true