Fix explicitApiMode could be overwritten by freeCompilerArgs
Now tasks has a separate task input for 'explicitApiMode' which is passed to Kotlin compiler via arg, rather than free compiler args. ^KT-57653 Fixed
This commit is contained in:
committed by
Space Team
parent
d3043b6f1c
commit
2ea65bd658
+6
-1
@@ -34,7 +34,10 @@ interface KotlinTopLevelExtensionConfig {
|
||||
/**
|
||||
* Different modes that can be used to set the level of issue reporting for [KotlinTopLevelExtensionConfig.explicitApi] option.
|
||||
*/
|
||||
enum class ExplicitApiMode(val cliOption: String) {
|
||||
enum class ExplicitApiMode(
|
||||
@Deprecated("Should not be exposed in api", level = DeprecationLevel.ERROR)
|
||||
val cliOption: String
|
||||
) {
|
||||
/** Report issues as errors. */
|
||||
Strict("strict"),
|
||||
|
||||
@@ -44,5 +47,7 @@ enum class ExplicitApiMode(val cliOption: String) {
|
||||
/** Disable issues reporting. */
|
||||
Disabled("disable");
|
||||
|
||||
@Deprecated("Should not be exposed in api", level = DeprecationLevel.ERROR)
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
fun toCompilerArg() = "-Xexplicit-api=$cliOption"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user