Bug 1845354 - Refactor ApkSizeTask into a plugin using composite build

fenix/117.0
Gabriel Luong 10 months ago committed by mergify[bot]
parent 0f9517c88c
commit 0676ef5608

@ -1,5 +1,4 @@
import org.apache.tools.ant.util.StringUtils
import org.mozilla.fenix.gradle.tasks.ApkSizeTask
plugins {
id "com.jetbrains.python.envs" version "$python_envs_plugin"

@ -17,7 +17,3 @@ repositories {
mavenCentral()
}
}
dependencies {
implementation "org.json:json:20210307"
}

@ -0,0 +1,30 @@
/* 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()
}
}
dependencies {
implementation "org.json:json:20210307"
}
gradlePlugin {
plugins.register("ApkSizePlugin") {
id = "ApkSizePlugin"
implementationClass = "ApkSizePlugin"
}
}

@ -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,9 @@
* 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/. */
package org.mozilla.fenix.gradle.tasks
import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
import org.gradle.api.initialization.Settings
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
import org.json.JSONArray
@ -14,6 +14,10 @@ import java.io.File
import java.nio.file.Files
import java.nio.file.Paths
class ApkSizePlugin : Plugin<Settings> {
override fun apply(settings: Settings) = Unit
}
/**
* Gradle task for determining the size of APKs and logging them in a perfherder compatible format.
*/

@ -6,10 +6,12 @@ pluginManagement {
includeBuild("../android-components/plugins/publicsuffixlist")
includeBuild("../android-components/plugins/dependencies")
includeBuild("../android-components/plugins/config")
includeBuild("./plugins/apksize")
includeBuild("./plugins/fenixdependencies")
}
plugins {
id 'ApkSizePlugin'
id 'FenixDependenciesPlugin'
id "mozac.ConfigPlugin"
id 'mozac.DependenciesPlugin'

Loading…
Cancel
Save