Wizard: remove resolutionStrategy from settings.gradle
This commit is contained in:
+1
-7
@@ -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'
|
||||
|
||||
|
||||
+1
-7
@@ -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"
|
||||
|
||||
|
||||
+1
-7
@@ -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'
|
||||
|
||||
|
||||
+1
-7
@@ -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"
|
||||
|
||||
|
||||
+1
-7
@@ -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'
|
||||
+1
-7
@@ -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"
|
||||
-24
@@ -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)
|
||||
|
||||
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user