[Gradle] KotlinPlugin.kt: Convert minimalSupportedAgpVersion into data class representation
^KT-54033 Verification Pending
This commit is contained in:
committed by
Space
parent
f286588e4c
commit
5580e4f06c
+3
-3
@@ -734,16 +734,16 @@ internal open class KotlinAndroidPlugin(
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val MINIMAL_SUPPORTED_AGP_VERSION = "3.6.4"
|
private val minimalSupportedAgpVersion = AndroidGradlePluginVersion(3, 6, 4)
|
||||||
fun androidTargetHandler(): AndroidProjectHandler {
|
fun androidTargetHandler(): AndroidProjectHandler {
|
||||||
val tasksProvider = KotlinTasksProvider()
|
val tasksProvider = KotlinTasksProvider()
|
||||||
val androidGradlePluginVersion = AndroidGradlePluginVersion.currentOrNull
|
val androidGradlePluginVersion = AndroidGradlePluginVersion.currentOrNull
|
||||||
|
|
||||||
if (androidGradlePluginVersion != null) {
|
if (androidGradlePluginVersion != null) {
|
||||||
if (androidGradlePluginVersion < MINIMAL_SUPPORTED_AGP_VERSION) {
|
if (androidGradlePluginVersion < minimalSupportedAgpVersion) {
|
||||||
throw IllegalStateException(
|
throw IllegalStateException(
|
||||||
"Kotlin: Unsupported version of com.android.tools.build:gradle plugin: " +
|
"Kotlin: Unsupported version of com.android.tools.build:gradle plugin: " +
|
||||||
"version $MINIMAL_SUPPORTED_AGP_VERSION or higher should be used with kotlin-android plugin"
|
"version $minimalSupportedAgpVersion or higher should be used with kotlin-android plugin"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user