Bug 1837478 - Refactor FenixDependencies into a plugin using composite build

fenix/116.0
Gabriel Luong 1 year ago committed by mergify[bot]
parent 7bbdc57d31
commit 1d4cdcc0b8

@ -83,7 +83,7 @@ buildscript {
}
// Variables in plugins {} aren't directly supported. Hack around it by setting an
// intermediate variable which can pull from FenixDependencies.kt and be used later.
// intermediate variable which can pull from FenixDependenciesPlugin.kt and be used later.
ext {
detekt_plugin = FenixVersions.detekt
protobuf_plugin = FenixVersions.protobuf_plugin

@ -0,0 +1,26 @@
/* 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/. */
plugins {
id "org.gradle.kotlin.kotlin-dsl" version "2.4.1"
}
repositories {
if (project.hasProperty("centralRepo")) {
maven {
name "MavenCentral"
url project.property("centralRepo")
allowInsecureProtocol true // Local Nexus in CI uses HTTP
}
} else {
mavenCentral()
}
}
gradlePlugin {
plugins.register("FenixDependenciesPlugin") {
id = "FenixDependenciesPlugin"
implementationClass = "FenixDependenciesPlugin"
}
}

@ -0,0 +1,5 @@
/* 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

@ -2,9 +2,16 @@
* 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/. */
import org.gradle.api.Plugin
import org.gradle.api.initialization.Settings
// If you ever need to force a toolchain rebuild (taskcluster) then edit the following comment.
// FORCE REBUILD 2023-05-12
class FenixDependenciesPlugin : Plugin<Settings> {
override fun apply(settings: Settings) = Unit
}
object FenixVersions {
const val kotlin = "1.8.21"
const val coroutines = "1.6.4"

@ -5,9 +5,11 @@
pluginManagement {
includeBuild("../android-components/plugins/publicsuffixlist")
includeBuild("../android-components/plugins/dependencies")
includeBuild("./plugins/fenixdependencies")
}
plugins {
id 'FenixDependenciesPlugin'
id 'mozac.DependenciesPlugin'
}

Loading…
Cancel
Save