Fix a "property not found" exception in Gradle 2.x
This commit is contained in:
+3
-2
@@ -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() })
|
||||
|
||||
+3
-2
@@ -474,8 +474,9 @@ private class SubpluginEnvironment(
|
||||
}
|
||||
}
|
||||
|
||||
compileTask.setProperty("compilerPluginClasspaths", realPluginClasspaths.copyToArray())
|
||||
compileTask.setProperty("compilerPluginArguments", pluginArguments.copyToArray())
|
||||
val extraProperties = compileTask.getExtensions().getExtraProperties()
|
||||
extraProperties.set("compilerPluginClasspaths", realPluginClasspaths.copyToArray())
|
||||
extraProperties.set("compilerPluginArguments", pluginArguments.copyToArray())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user