Files
sousa-gecko/mobile/android/android-components/plugins/dependencies/settings.gradle.kts
T
Ryan VanderMeulen 1dc15d1e7b Bug 2041041 - Convert kotlin-dsl Gradle plugin builds to Kotlin DSL. r=ahochheiden
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
2026-05-21 19:23:24 +00:00

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"))
}
}
}