Bug 1924520 - Configuration cache part 2. r=geckoview-reviewers,android-reviewers,nalexander,owlish,ohall
Differential Revision: https://phabricator.services.mozilla.com/D236898
This commit is contained in:
@@ -134,7 +134,7 @@ ifeq ($(MOZ_BUILD_APP),mobile/android)
|
|||||||
recurse_android-stage-package: stage-package
|
recurse_android-stage-package: stage-package
|
||||||
|
|
||||||
recurse_android-archive-geckoview:
|
recurse_android-archive-geckoview:
|
||||||
GRADLE_INVOKED_WITHIN_MACH_BUILD=1 $(topsrcdir)/mach --log-no-times android archive-geckoview
|
GRADLE_INVOKED_WITHIN_MACH_BUILD=1 $(topsrcdir)/mach --log-no-times android archive-geckoview $(if $(MOZ_AUTOMATION),--no-configuration-cache)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MOZ_WIDGET_TOOLKIT
|
ifdef MOZ_WIDGET_TOOLKIT
|
||||||
|
|||||||
@@ -117,38 +117,36 @@ subprojects {
|
|||||||
|
|
||||||
testLogging.events = []
|
testLogging.events = []
|
||||||
|
|
||||||
def out = services.get(StyledTextOutputFactory).create("an-ouput")
|
|
||||||
|
|
||||||
beforeSuite { descriptor ->
|
beforeSuite { descriptor ->
|
||||||
if (descriptor.getClassName() != null) {
|
if (descriptor.getClassName() != null) {
|
||||||
out.style(Style.Header).println("\nSUITE: " + descriptor.getClassName())
|
println("\nSUITE: " + descriptor.getClassName())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeTest { descriptor ->
|
beforeTest { descriptor ->
|
||||||
out.style(Style.Description).println(" TEST: " + descriptor.getName())
|
println(" TEST: " + descriptor.getName())
|
||||||
}
|
}
|
||||||
|
|
||||||
onOutput { descriptor, event ->
|
onOutput { descriptor, event ->
|
||||||
logger.lifecycle(" " + event.message.trim())
|
it.logger.lifecycle(" " + event.message.trim())
|
||||||
}
|
}
|
||||||
|
|
||||||
afterTest { descriptor, result ->
|
afterTest { descriptor, result ->
|
||||||
switch (result.getResultType()) {
|
switch (result.getResultType()) {
|
||||||
case ResultType.SUCCESS:
|
case ResultType.SUCCESS:
|
||||||
out.style(Style.Success).println(" SUCCESS")
|
println(" SUCCESS")
|
||||||
break
|
break
|
||||||
|
|
||||||
case ResultType.FAILURE:
|
case ResultType.FAILURE:
|
||||||
def testId = descriptor.getClassName() + "." + descriptor.getName()
|
def testId = descriptor.getClassName() + "." + descriptor.getName()
|
||||||
out.style(Style.Failure).println(" TEST-UNEXPECTED-FAIL | " + testId + " | " + result.getException())
|
println(" TEST-UNEXPECTED-FAIL | " + testId + " | " + result.getException())
|
||||||
break
|
break
|
||||||
|
|
||||||
case ResultType.SKIPPED:
|
case ResultType.SKIPPED:
|
||||||
out.style(Style.Info).println(" SKIPPED")
|
println(" SKIPPED")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
logger.lifecycle("")
|
it.logger.lifecycle("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ apply plugin: 'com.google.android.gms.oss-licenses-plugin'
|
|||||||
apply plugin: 'kotlinx-serialization'
|
apply plugin: 'kotlinx-serialization'
|
||||||
|
|
||||||
import groovy.json.JsonOutput
|
import groovy.json.JsonOutput
|
||||||
import org.gradle.internal.logging.text.StyledTextOutput.Style
|
|
||||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
import static org.gradle.api.tasks.testing.TestResult.ResultType
|
import static org.gradle.api.tasks.testing.TestResult.ResultType
|
||||||
@@ -828,17 +826,18 @@ if (project.hasProperty("coverage")) {
|
|||||||
// Usage: "./gradlew printVariants
|
// Usage: "./gradlew printVariants
|
||||||
// -------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------
|
||||||
tasks.register('printVariants') {
|
tasks.register('printVariants') {
|
||||||
doLast {
|
def variants = project.provider {
|
||||||
def variants = android.applicationVariants.collect { variant -> [
|
android.applicationVariants.collect { variant -> [
|
||||||
apks: variant.outputs.collect { output -> [
|
apks: variant.outputs.collect { output -> [
|
||||||
abi: output.getFilter(FilterConfiguration.FilterType.ABI.name()),
|
abi: output.getFilter(FilterConfiguration.FilterType.ABI.name()),
|
||||||
fileName: output.outputFile.name
|
fileName: output.outputFile.name
|
||||||
]},
|
]},
|
||||||
build_type: variant.buildType.name,
|
build_type: variant.buildType.name,
|
||||||
name: variant.name,
|
name: variant.name,
|
||||||
]}
|
]}}
|
||||||
|
doLast {
|
||||||
// AndroidTest is a special case not included above
|
// AndroidTest is a special case not included above
|
||||||
variants.add([
|
variants.get().add([
|
||||||
apks: [[
|
apks: [[
|
||||||
abi: 'noarch',
|
abi: 'noarch',
|
||||||
fileName: 'app-debug-androidTest.apk',
|
fileName: 'app-debug-androidTest.apk',
|
||||||
@@ -846,7 +845,7 @@ tasks.register('printVariants') {
|
|||||||
build_type: 'androidTest',
|
build_type: 'androidTest',
|
||||||
name: 'androidTest',
|
name: 'androidTest',
|
||||||
])
|
])
|
||||||
println 'variants: ' + JsonOutput.toJson(variants)
|
println 'variants: ' + JsonOutput.toJson(variants.get())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -859,38 +858,36 @@ afterEvaluate {
|
|||||||
|
|
||||||
testLogging.events = []
|
testLogging.events = []
|
||||||
|
|
||||||
def out = services.get(StyledTextOutputFactory).create("tests")
|
|
||||||
|
|
||||||
beforeSuite { descriptor ->
|
beforeSuite { descriptor ->
|
||||||
if (descriptor.getClassName() != null) {
|
if (descriptor.getClassName() != null) {
|
||||||
out.style(Style.Header).println("\nSUITE: " + descriptor.getClassName())
|
println("\nSUITE: " + descriptor.getClassName())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeTest { descriptor ->
|
beforeTest { descriptor ->
|
||||||
out.style(Style.Description).println(" TEST: " + descriptor.getName())
|
println(" TEST: " + descriptor.getName())
|
||||||
}
|
}
|
||||||
|
|
||||||
onOutput { descriptor, event ->
|
onOutput { descriptor, event ->
|
||||||
logger.lifecycle(" " + event.message.trim())
|
it.logger.lifecycle(" " + event.message.trim())
|
||||||
}
|
}
|
||||||
|
|
||||||
afterTest { descriptor, result ->
|
afterTest { descriptor, result ->
|
||||||
switch (result.getResultType()) {
|
switch (result.getResultType()) {
|
||||||
case ResultType.SUCCESS:
|
case ResultType.SUCCESS:
|
||||||
out.style(Style.Success).println(" SUCCESS")
|
println(" SUCCESS")
|
||||||
break
|
break
|
||||||
|
|
||||||
case ResultType.FAILURE:
|
case ResultType.FAILURE:
|
||||||
def testId = descriptor.getClassName() + "." + descriptor.getName()
|
def testId = descriptor.getClassName() + "." + descriptor.getName()
|
||||||
out.style(Style.Failure).println(" TEST-UNEXPECTED-FAIL | " + testId + " | " + result.getException())
|
println(" TEST-UNEXPECTED-FAIL | " + testId + " | " + result.getException())
|
||||||
break
|
break
|
||||||
|
|
||||||
case ResultType.SKIPPED:
|
case ResultType.SKIPPED:
|
||||||
out.style(Style.Info).println(" SKIPPED")
|
println(" SKIPPED")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
logger.lifecycle("")
|
it.logger.lifecycle("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ apply from: versionCodeGradle
|
|||||||
|
|
||||||
import com.android.build.api.variant.FilterConfiguration
|
import com.android.build.api.variant.FilterConfiguration
|
||||||
import groovy.json.JsonOutput
|
import groovy.json.JsonOutput
|
||||||
import org.gradle.internal.logging.text.StyledTextOutput.Style
|
|
||||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
import static org.gradle.api.tasks.testing.TestResult.ResultType
|
import static org.gradle.api.tasks.testing.TestResult.ResultType
|
||||||
@@ -640,17 +638,17 @@ if (project.hasProperty("coverage")) {
|
|||||||
// Taskgraph Usage: "./gradlew printVariants
|
// Taskgraph Usage: "./gradlew printVariants
|
||||||
// -------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------
|
||||||
tasks.register('printVariants') {
|
tasks.register('printVariants') {
|
||||||
doLast {
|
def variants = project.provider { android.applicationVariants.collect { variant -> [
|
||||||
def variants = android.applicationVariants.collect { variant -> [
|
|
||||||
apks: variant.outputs.collect { output -> [
|
apks: variant.outputs.collect { output -> [
|
||||||
abi: output.getFilter(FilterConfiguration.FilterType.ABI.name()),
|
abi: output.getFilter(FilterConfiguration.FilterType.ABI.name()),
|
||||||
fileName: output.outputFile.name
|
fileName: output.outputFile.name
|
||||||
]},
|
]},
|
||||||
build_type: variant.buildType.name,
|
build_type: variant.buildType.name,
|
||||||
name: variant.name,
|
name: variant.name,
|
||||||
]}
|
]}}
|
||||||
|
doLast {
|
||||||
// AndroidTest is a special case not included above
|
// AndroidTest is a special case not included above
|
||||||
variants.add([
|
variants.get().add([
|
||||||
apks: [[
|
apks: [[
|
||||||
abi: 'noarch',
|
abi: 'noarch',
|
||||||
fileName: 'app-debug-androidTest.apk',
|
fileName: 'app-debug-androidTest.apk',
|
||||||
@@ -658,7 +656,7 @@ tasks.register('printVariants') {
|
|||||||
build_type: 'androidTest',
|
build_type: 'androidTest',
|
||||||
name: 'androidTest',
|
name: 'androidTest',
|
||||||
])
|
])
|
||||||
println 'variants: ' + JsonOutput.toJson(variants)
|
println 'variants: ' + JsonOutput.toJson(variants.get())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -671,38 +669,36 @@ afterEvaluate {
|
|||||||
|
|
||||||
testLogging.events = []
|
testLogging.events = []
|
||||||
|
|
||||||
def out = services.get(StyledTextOutputFactory).create("tests")
|
|
||||||
|
|
||||||
beforeSuite { descriptor ->
|
beforeSuite { descriptor ->
|
||||||
if (descriptor.getClassName() != null) {
|
if (descriptor.getClassName() != null) {
|
||||||
out.style(Style.Header).println("\nSUITE: " + descriptor.getClassName())
|
println("\nSUITE: " + descriptor.getClassName())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeTest { descriptor ->
|
beforeTest { descriptor ->
|
||||||
out.style(Style.Description).println(" TEST: " + descriptor.getName())
|
println(" TEST: " + descriptor.getName())
|
||||||
}
|
}
|
||||||
|
|
||||||
onOutput { descriptor, event ->
|
onOutput { descriptor, event ->
|
||||||
logger.lifecycle(" " + event.message.trim())
|
it.logger.lifecycle(" " + event.message.trim())
|
||||||
}
|
}
|
||||||
|
|
||||||
afterTest { descriptor, result ->
|
afterTest { descriptor, result ->
|
||||||
switch (result.getResultType()) {
|
switch (result.getResultType()) {
|
||||||
case ResultType.SUCCESS:
|
case ResultType.SUCCESS:
|
||||||
out.style(Style.Success).println(" SUCCESS")
|
println(" SUCCESS")
|
||||||
break
|
break
|
||||||
|
|
||||||
case ResultType.FAILURE:
|
case ResultType.FAILURE:
|
||||||
def testId = descriptor.getClassName() + "." + descriptor.getName()
|
def testId = descriptor.getClassName() + "." + descriptor.getName()
|
||||||
out.style(Style.Failure).println(" TEST-UNEXPECTED-FAIL | " + testId + " | " + result.getException())
|
println(" TEST-UNEXPECTED-FAIL | " + testId + " | " + result.getException())
|
||||||
break
|
break
|
||||||
|
|
||||||
case ResultType.SKIPPED:
|
case ResultType.SKIPPED:
|
||||||
out.style(Style.Info).println(" SKIPPED")
|
println(" SKIPPED")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
logger.lifecycle("")
|
it.logger.lifecycle("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,10 +252,12 @@ set_config("GRADLE_ANDROID_LINT_TASKS", gradle_android_lint_tasks)
|
|||||||
@depends(gradle_android_build_config)
|
@depends(gradle_android_build_config)
|
||||||
def gradle_android_api_lint_tasks(build_config):
|
def gradle_android_api_lint_tasks(build_config):
|
||||||
"""Gradle tasks run by |mach android api-lint|."""
|
"""Gradle tasks run by |mach android api-lint|."""
|
||||||
|
# --no-configuration-cache will be removed in bug 1950099
|
||||||
return [
|
return [
|
||||||
"geckoview:apiLint{geckoview.variant.name}".format(
|
"geckoview:apiLint{geckoview.variant.name}".format(
|
||||||
geckoview=build_config.geckoview
|
geckoview=build_config.geckoview
|
||||||
),
|
),
|
||||||
|
"--no-configuration-cache",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export PATH=$MOZ_FETCHES_DIR/jdk-8/bin:$PATH
|
|||||||
|
|
||||||
export MOZCONFIG=mobile/android/config/mozconfigs/android-arm-gradle-dependencies/nightly-lite
|
export MOZCONFIG=mobile/android/config/mozconfigs/android-arm-gradle-dependencies/nightly-lite
|
||||||
./mach build
|
./mach build
|
||||||
./mach gradle downloadDependencies
|
./mach gradle downloadDependencies --no-configuration-cache
|
||||||
./mach android gradle-dependencies
|
./mach android gradle-dependencies --no-configuration-cache
|
||||||
|
|
||||||
. taskcluster/scripts/misc/android-gradle-dependencies/after.sh
|
. taskcluster/scripts/misc/android-gradle-dependencies/after.sh
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export PATH=$MOZ_FETCHES_DIR/jdk-8/bin:$PATH
|
|||||||
|
|
||||||
export MOZCONFIG=mobile/android/config/mozconfigs/android-arm-gradle-dependencies/nightly
|
export MOZCONFIG=mobile/android/config/mozconfigs/android-arm-gradle-dependencies/nightly
|
||||||
./mach build
|
./mach build
|
||||||
./mach gradle downloadDependencies
|
./mach gradle downloadDependencies --no-configuration-cache
|
||||||
./mach android gradle-dependencies
|
./mach android gradle-dependencies --no-configuration-cache
|
||||||
pushd mobile/android/fenix
|
pushd mobile/android/fenix
|
||||||
./gradlew detekt lint assembleDebug mozilla-lint-rules:test :benchmark:assembleBenchmark
|
./gradlew detekt lint assembleDebug mozilla-lint-rules:test :benchmark:assembleBenchmark
|
||||||
popd
|
popd
|
||||||
|
|||||||
Reference in New Issue
Block a user