Fix a "property not found" exception in Gradle 2.x

This commit is contained in:
Yan Zhulanow
2015-03-16 17:42:58 +03:00
parent 6d9d3f00a2
commit 6fb5dacde4
2 changed files with 6 additions and 4 deletions
@@ -101,8 +101,9 @@ public open class KotlinCompile() : AbstractKotlinCompile<K2JVMCompilerArguments
val srcDirsSources = HashSet<SourceDirectorySet>()
override fun populateTargetSpecificArgs(args: K2JVMCompilerArguments) {
args.pluginClasspaths = property("compilerPluginClasspaths") as? Array<String>
args.pluginOptions = property("compilerPluginArguments") as? Array<String>
val extraProperties = getExtensions().getExtraProperties()
args.pluginClasspaths = extraProperties.get("compilerPluginClasspaths") as? Array<String>
args.pluginOptions = extraProperties.get("compilerPluginArguments") as? Array<String>
if (StringUtils.isEmpty(kotlinOptions.classpath)) {
val existingClasspathEntries = getClasspath().filter({ it != null && it.exists() })