Switches the plugin modules that apply the kotlin-dsl plugin from the Groovy DSL to the Kotlin DSL, so each build can reference the embedded `kotlin-dsl` plugin id directly and the version pin can be dropped from the version catalog. The conventions plugin is updated to the bare id for the same reason. Differential Revision: https://phabricator.services.mozilla.com/D301592
37 lines
1.2 KiB
Kotlin
37 lines
1.2 KiB
Kotlin
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
// Prevents gradle builds from looking for a root settings.gradle
|
|
pluginManagement {
|
|
if (gradle.parent?.extra?.has("mozconfig") == true) {
|
|
gradle.extra["mozconfig"] = gradle.parent!!.extra["mozconfig"]
|
|
gradle.extra["configureMavenRepositories"] = gradle.parent!!.extra["configureMavenRepositories"]
|
|
} else {
|
|
apply(from = file("../../../gradle/mozconfig.gradle"))
|
|
}
|
|
|
|
@Suppress("UNCHECKED_CAST")
|
|
val configureMavenRepositories = gradle.extra["configureMavenRepositories"] as groovy.lang.Closure<*>
|
|
|
|
repositories {
|
|
configureMavenRepositories.call(this)
|
|
}
|
|
}
|
|
|
|
dependencyResolutionManagement {
|
|
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
|
|
|
@Suppress("UNCHECKED_CAST")
|
|
val configureMavenRepositories = gradle.extra["configureMavenRepositories"] as groovy.lang.Closure<*>
|
|
|
|
repositories {
|
|
configureMavenRepositories.call(this)
|
|
}
|
|
versionCatalogs {
|
|
create("libs") {
|
|
from(files("../../../../../gradle/libs.versions.toml"))
|
|
}
|
|
}
|
|
}
|