Bug 1870123 - Remove the GitHubPlugin and GithubDetailsTask. r=owlish,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201490
This commit is contained in:
@@ -400,22 +400,6 @@ tasks.register("listRepositories") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("githubBuildDetails", GithubDetailsTask) {
|
|
||||||
text = """### Test result files
|
|
||||||
|
|
||||||
- [Test Coverage]({reportsUrl}/jacoco/jacocoReleaseTestReport/html/index.html)
|
|
||||||
- [Unit Tests]({reportsUrl}/tests/testReleaseUnitTest/index.html)
|
|
||||||
- [Android Lint]({reportsUrl}/lint-results-release.html)"""
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Detekt Results Android-Components]({reportsUrl}/detekt.html)"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Android Lint Results Android-Components]({reportsUrl}/lint-results-debug.html)"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("testToolsDir", Exec) {
|
tasks.register("testToolsDir", Exec) {
|
||||||
group = "verification"
|
group = "verification"
|
||||||
description = "Run tests in the tools/ directory."
|
description = "Run tests in the tools/ directory."
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
/* 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 "4.2.1"
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
gradlePlugin {
|
|
||||||
plugins.register("mozac.GitHubPlugin") {
|
|
||||||
id = "mozac.GitHubPlugin"
|
|
||||||
implementationClass = "GitHubPlugin"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
/* 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/. */
|
|
||||||
|
|
||||||
buildCache {
|
|
||||||
local {
|
|
||||||
directory = new File(rootDir, '../../.build-cache')
|
|
||||||
removeUnusedEntriesAfterDays = 30
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
/* 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/. */
|
|
||||||
|
|
||||||
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 java.io.File
|
|
||||||
|
|
||||||
class GitHubPlugin : Plugin<Settings> {
|
|
||||||
override fun apply(settings: Settings) = Unit
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper to write to the "customCheckRunText.md" file for Taskcluster.
|
|
||||||
* Taskcluster uses this file to populate the "Details" section in the GitHub Checks panel UI.
|
|
||||||
*/
|
|
||||||
open class GithubDetailsTask : DefaultTask() {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Text to display in the Github Checks panel under "Details". Any markdown works here.
|
|
||||||
* The text is written to a markdown file which is used by Taskcluster.
|
|
||||||
* Links are automatically rewritten to point to the correct Taskcluster URL.
|
|
||||||
*/
|
|
||||||
@Input
|
|
||||||
var text: String = ""
|
|
||||||
|
|
||||||
private val detailsFile = File("/builds/worker/github/customCheckRunText.md")
|
|
||||||
private val suffix = "\n\n_(404 if compilation failed)_"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Action called by Gradle that writes the "customCheckRunText.md" file.
|
|
||||||
*/
|
|
||||||
@TaskAction
|
|
||||||
fun writeFile() {
|
|
||||||
val taskId = System.getenv("TASK_ID")
|
|
||||||
val reportsUrl = "https://firefoxci.taskcluster-artifacts.net/$taskId/0/public/reports"
|
|
||||||
val replaced = text.replace("{reportsUrl}", reportsUrl)
|
|
||||||
|
|
||||||
project.mkdir("/builds/worker/github")
|
|
||||||
detailsFile.writeText(replaced + suffix)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,13 +4,11 @@
|
|||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
includeBuild("plugins/dependencies")
|
includeBuild("plugins/dependencies")
|
||||||
includeBuild("plugins/github")
|
|
||||||
includeBuild("plugins/publicsuffixlist")
|
includeBuild("plugins/publicsuffixlist")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'mozac.DependenciesPlugin'
|
id 'mozac.DependenciesPlugin'
|
||||||
id 'mozac.GitHubPlugin'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/android-components")
|
ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/android-components")
|
||||||
|
|||||||
@@ -277,18 +277,6 @@ tasks.register("listRepositories") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("githubTestDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Unit Test Results Fenix]({reportsUrl}/test/testFenixDebugUnitTest/index.html)"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Detekt Results Fenix]({reportsUrl}/detekt.html)"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Android Lint Results Fenix]({reportsUrl}/lint-results-debug.html)"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Task to copy generated baseline profile to the app module nightly variant.
|
// Task to copy generated baseline profile to the app module nightly variant.
|
||||||
tasks.register("copyBaselineProfile", DefaultTask) {
|
tasks.register("copyBaselineProfile", DefaultTask) {
|
||||||
doLast {
|
doLast {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ pluginManagement {
|
|||||||
includeBuild("../android-components/plugins/publicsuffixlist")
|
includeBuild("../android-components/plugins/publicsuffixlist")
|
||||||
includeBuild("../android-components/plugins/dependencies")
|
includeBuild("../android-components/plugins/dependencies")
|
||||||
includeBuild("../android-components/plugins/config")
|
includeBuild("../android-components/plugins/config")
|
||||||
includeBuild("../android-components/plugins/github")
|
|
||||||
includeBuild("./plugins/apksize")
|
includeBuild("./plugins/apksize")
|
||||||
includeBuild("./plugins/fenixdependencies")
|
includeBuild("./plugins/fenixdependencies")
|
||||||
}
|
}
|
||||||
@@ -16,7 +15,6 @@ plugins {
|
|||||||
id 'FenixDependenciesPlugin'
|
id 'FenixDependenciesPlugin'
|
||||||
id "mozac.ConfigPlugin"
|
id "mozac.ConfigPlugin"
|
||||||
id 'mozac.DependenciesPlugin'
|
id 'mozac.DependenciesPlugin'
|
||||||
id 'mozac.GitHubPlugin'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/fenix")
|
ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/fenix")
|
||||||
|
|||||||
@@ -161,15 +161,3 @@ tasks.register("listRepositories") {
|
|||||||
project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
|
project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("githubTestDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Unit Test Results]({reportsUrl}/test/testFocusDebugUnitTest/index.html)"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Detekt Results Focus]({reportsUrl}/detekt.html)"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
|
||||||
text = "### [Android Lint Results Focus]({reportsUrl}/lint-results-debug.html)"
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,14 +6,12 @@ pluginManagement {
|
|||||||
includeBuild("../android-components/plugins/publicsuffixlist")
|
includeBuild("../android-components/plugins/publicsuffixlist")
|
||||||
includeBuild("../android-components/plugins/dependencies")
|
includeBuild("../android-components/plugins/dependencies")
|
||||||
includeBuild("../android-components/plugins/config")
|
includeBuild("../android-components/plugins/config")
|
||||||
includeBuild("../android-components/plugins/github")
|
|
||||||
includeBuild("./plugins/focusdependencies")
|
includeBuild("./plugins/focusdependencies")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "mozac.ConfigPlugin"
|
id "mozac.ConfigPlugin"
|
||||||
id 'mozac.DependenciesPlugin'
|
id 'mozac.DependenciesPlugin'
|
||||||
id 'mozac.GitHubPlugin'
|
|
||||||
id 'FocusDependenciesPlugin'
|
id 'FocusDependenciesPlugin'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/dependencies")
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/dependencies")
|
||||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/publicsuffixlist")
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/publicsuffixlist")
|
||||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/github")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'mozac.DependenciesPlugin'
|
id 'mozac.DependenciesPlugin'
|
||||||
id 'mozac.GitHubPlugin'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// You might think topsrcdir is '.', but that's not true when the Gradle build
|
// You might think topsrcdir is '.', but that's not true when the Gradle build
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ def _get_build_gradle_paths(gradle_project):
|
|||||||
|
|
||||||
file_list = [
|
file_list = [
|
||||||
"mobile/android/android-components/plugins/dependencies/build.gradle",
|
"mobile/android/android-components/plugins/dependencies/build.gradle",
|
||||||
"mobile/android/android-components/plugins/github/build.gradle",
|
|
||||||
"mobile/android/android-components/plugins/publicsuffixlist/build.gradle",
|
"mobile/android/android-components/plugins/publicsuffixlist/build.gradle",
|
||||||
f"{project_dir}/build.gradle",
|
f"{project_dir}/build.gradle",
|
||||||
f"{project_dir}/{project_subdir}/build.gradle",
|
f"{project_dir}/{project_subdir}/build.gradle",
|
||||||
|
|||||||
@@ -72,10 +72,8 @@ jobs:
|
|||||||
arguments:
|
arguments:
|
||||||
- mobile/android/android-components/
|
- mobile/android/android-components/
|
||||||
- lint
|
- lint
|
||||||
- githubLintAndroidDetails
|
|
||||||
- ktlint
|
- ktlint
|
||||||
- detekt
|
- detekt
|
||||||
- githubLintDetektDetails
|
|
||||||
resources:
|
resources:
|
||||||
# TODO: Make focus lint tasks use their own gradle deps tasks
|
# TODO: Make focus lint tasks use their own gradle deps tasks
|
||||||
- mobile/android/focus-android/plugins/focusdependencies/src/main/java/FocusDependenciesPlugin.kt
|
- mobile/android/focus-android/plugins/focusdependencies/src/main/java/FocusDependenciesPlugin.kt
|
||||||
@@ -87,10 +85,8 @@ jobs:
|
|||||||
arguments:
|
arguments:
|
||||||
- mobile/android/fenix/
|
- mobile/android/fenix/
|
||||||
- lint
|
- lint
|
||||||
- githubLintAndroidDetails
|
|
||||||
- ktlint
|
- ktlint
|
||||||
- detekt
|
- detekt
|
||||||
- githubLintDetektDetails
|
|
||||||
- mozilla-detekt-rules:test
|
- mozilla-detekt-rules:test
|
||||||
- mozilla-lint-rules:test
|
- mozilla-lint-rules:test
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ job-defaults:
|
|||||||
description: 'Run detekt over all modules'
|
description: 'Run detekt over all modules'
|
||||||
run:
|
run:
|
||||||
using: gradlew
|
using: gradlew
|
||||||
gradlew: ['detekt', 'githubLintDetektDetails']
|
gradlew: ['detekt']
|
||||||
use-caches: false
|
use-caches: false
|
||||||
worker:
|
worker:
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -74,7 +74,7 @@ detekt-fenix:
|
|||||||
run:
|
run:
|
||||||
pre-gradlew:
|
pre-gradlew:
|
||||||
- ["cd", "mobile/android/fenix"]
|
- ["cd", "mobile/android/fenix"]
|
||||||
gradlew: [detekt, githubLintDetektDetails, 'mozilla-detekt-rules:test']
|
gradlew: [detekt, 'mozilla-detekt-rules:test']
|
||||||
treeherder:
|
treeherder:
|
||||||
symbol: detekt(fenix)
|
symbol: detekt(fenix)
|
||||||
worker:
|
worker:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ job-defaults:
|
|||||||
description: 'Run lint over all modules'
|
description: 'Run lint over all modules'
|
||||||
run:
|
run:
|
||||||
using: gradlew
|
using: gradlew
|
||||||
gradlew: ['lint', 'githubLintAndroidDetails']
|
gradlew: ['lint']
|
||||||
use-caches: false
|
use-caches: false
|
||||||
worker:
|
worker:
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -64,6 +64,6 @@ fenix:
|
|||||||
run:
|
run:
|
||||||
pre-gradlew:
|
pre-gradlew:
|
||||||
- ["cd", "mobile/android/fenix"]
|
- ["cd", "mobile/android/fenix"]
|
||||||
gradlew: ['lintDebug', 'githubLintAndroidDetails', 'mozilla-lint-rules:test']
|
gradlew: ['lintDebug', 'mozilla-lint-rules:test']
|
||||||
treeherder:
|
treeherder:
|
||||||
symbol: lint(fenix)
|
symbol: lint(fenix)
|
||||||
|
|||||||
Reference in New Issue
Block a user