-
Notifications
You must be signed in to change notification settings - Fork 625
Fix for coverage collection. #490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -21,7 +21,11 @@ task generateCoverageMeasurements(type: GenerateMeasurementsTask) { | |||
description 'Runs checkCoverage task in all projects and calculates coverage percents.' | |||
group 'Measurements' | |||
|
|||
dependsOn rootProject.allprojects.collect { it.tasks.withType(JacocoReport) }.flatten() | |||
dependsOn rootProject.allprojects.findAll { | |||
it.path.startsWith(':firebase-') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention here is to only depend on check tasks of firebase products instead of all. Is there a more reliant way to distinguish firebase products from other utility subprojects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check if the projects are using the Firebase library plugin. This plugin encapsulates some of the release and testing logic, and we only use it on the actual Firebase projects.
project.extensions.findByType(FirebaseLibraryExtension.class) != null
should do the trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all below projects have this plugin:
project ':firebase-common'
project ':firebase-database'
project ':firebase-database-collection'
project ':firebase-datatransport'
project ':firebase-firestore'
project ':firebase-functions'
project ':firebase-inappmessaging-display'
project ':firebase-storage'
project ':protolite-well-known-types'
project ':firebase-common:ktx'
project ':firebase-firestore:ktx'
project ':firebase-functions:ktx'
project ':transport:transport-api'
project ':transport:transport-backend-cct'
project ':transport:transport-runtime'
by running
rootProject.allprojects.findAll { it.extensions.findByType(FirebaseLibraryExtension) != null }.forEach { println it }
Anyway to exclude :protolite-well-known-types
, :transport:transport-api
, :transport:transport-backend-cct
, and :transport:transport-runtime
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should include those. The transport ones are part of Firelog. Any reason for excluding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Discussed offline.
Fix failing task `:tools:measurement:apksize:preFirestoreAggressiveBuild`. Make coverage task depend on only firebase product check tasks.
4f82b9b
to
e908e51
Compare
Fix failing task
:tools:measurement:apksize:preFirestoreAggressiveBuild
.Make coverage task depend on only firebase product check tasks.
The tasks dependency graph previously looks like:
Now it looks like: