Fix downgrading from 1.1 to 1.0.x in Gradle
If @Input property is added in new plugin version and this property has a new type (a class/enum which is not presented in previous plugin) then downgrading leads to an exception, because Gradle tries to deserialize the property value from its caches, but the type of value does not exist. Workaround: add new String property.
This commit is contained in:
+4
-1
@@ -79,7 +79,10 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractCo
|
||||
internal var coroutinesFromGradleProperties: Coroutines? = null
|
||||
// Input is needed to force rebuild even if source files are not changed
|
||||
@get:Input
|
||||
val coroutines: Coroutines
|
||||
internal val coroutinesStr: String
|
||||
get() = coroutines.name
|
||||
|
||||
private val coroutines: Coroutines
|
||||
get() = kotlinExt.experimental.coroutines
|
||||
?: coroutinesFromGradleProperties
|
||||
?: Coroutines.DEFAULT
|
||||
|
||||
Reference in New Issue
Block a user