Wizard: remove resolutionStrategy from settings.gradle

This commit is contained in:
Ilya Kirillov
2020-10-09 22:25:57 +03:00
parent 8b89eb5dc8
commit e824199169
8 changed files with 6 additions and 67 deletions
@@ -8,13 +8,7 @@ pluginManagement {
url 'KOTLIN_REPO'
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == 'com.android' || requested.id.name == 'kotlin-android-extensions') {
useModule('com.android.tools.build:gradle:4.0.1')
}
}
}
}
rootProject.name = 'generatedProject'
@@ -8,13 +8,7 @@ pluginManagement {
url = uri("KOTLIN_REPO")
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "com.android" || requested.id.name == "kotlin-android-extensions") {
useModule("com.android.tools.build:gradle:4.0.1")
}
}
}
}
rootProject.name = "generatedProject"
@@ -8,13 +8,7 @@ pluginManagement {
url 'KOTLIN_REPO'
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == 'com.android' || requested.id.name == 'kotlin-android-extensions') {
useModule('com.android.tools.build:gradle:4.0.1')
}
}
}
}
rootProject.name = 'multiplatformMobileApplication'
@@ -8,13 +8,7 @@ pluginManagement {
url = uri("KOTLIN_REPO")
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "com.android" || requested.id.name == "kotlin-android-extensions") {
useModule("com.android.tools.build:gradle:4.0.1")
}
}
}
}
rootProject.name = "multiplatformMobileApplication"
@@ -8,12 +8,6 @@ pluginManagement {
url 'KOTLIN_REPO'
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == 'com.android' || requested.id.name == 'kotlin-android-extensions') {
useModule('com.android.tools.build:gradle:4.0.1')
}
}
}
}
rootProject.name = 'multiplatformMobileLibrary'
@@ -8,12 +8,6 @@ pluginManagement {
url = uri("KOTLIN_REPO")
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "com.android" || requested.id.name == "kotlin-android-extensions") {
useModule("com.android.tools.build:gradle:4.0.1")
}
}
}
}
rootProject.name = "multiplatformMobileLibrary"
@@ -12,30 +12,6 @@ import org.jetbrains.kotlin.tools.projectWizard.settings.version.Version
interface PluginManagementIR : GradleIR
data class AndroidResolutionStrategyIR(
val androidGradlePluginVersion: Version
) : PluginManagementIR, FreeIR, SingleIR {
override fun GradlePrinter.renderGradle() {
sectionCall("resolutionStrategy", needIndent = true) {
sectionCall("eachPlugin", needIndent = true) {
sectionCall(
"if (requested.id.namespace == ${"com.android".quotified} || requested.id.name == ${"kotlin-android-extensions".quotified})",
needIndent = true
) {
call("useModule", forceBrackets = true) {
when (dsl) {
GradlePrinter.GradleDsl.KOTLIN ->
+"com.android.tools.build:gradle:${androidGradlePluginVersion}".quotified
GradlePrinter.GradleDsl.GROOVY ->
+"com.android.tools.build:gradle:$androidGradlePluginVersion".quotified
}
}
}
}
}
}
}
data class PluginManagementRepositoryIR(val repositoryIR: RepositoryIR) : PluginManagementIR, RepositoryWrapper {
override fun GradlePrinter.renderGradle() {
repositoryIR.render(this)
@@ -77,7 +77,6 @@ interface AndroidModuleConfigurator : ModuleConfigurator,
override fun Reader.createSettingsGradleIRs(module: Module) = buildList<BuildSystemIR> {
+createRepositories(KotlinPlugin.version.propertyValue).map { PluginManagementRepositoryIR(RepositoryIR(it)) }
+AndroidResolutionStrategyIR(Versions.GRADLE_PLUGINS.ANDROID)
}
override fun createModuleIRs(