Skip to content

Conversation

@chris-mitchell
Copy link
Contributor

Updates the way we define our extension so that consumers can simply define the entire name of the task to run for jvm / assemble android test / run android test. See the sample app for examples.

@codecov
Copy link

codecov bot commented Dec 9, 2020

Codecov Report

Merging #41 (ab9932f) into main (331a1d7) will increase coverage by 11.96%.
The diff coverage is 34.37%.

Impacted file tree graph

@@ Coverage Diff @@ ## main #41 +/- ## ============================================= + Coverage 39.04% 51.00% +11.96%  - Complexity 25 34 +9  ============================================= Files 8 8 Lines 397 398 +1 Branches 87 86 -1 ============================================= + Hits 155 203 +48  + Misses 211 168 -43  + Partials 31 27 -4 
Impacted Files Coverage Δ Complexity Δ
...ctedmoduledetector/AffectedModuleDetectorPlugin.kt 56.66% <27.58%> (+56.66%) 10.00 <4.00> (+10.00)
...ffectedmoduledetector/AffectedTestConfiguration.kt 100.00% <100.00%> (+42.85%) 4.00 <3.00> (-3.00) ⬆️
...x/affectedmoduledetector/AffectedModuleDetector.kt 46.28% <0.00%> (+6.28%) 1.00% <0.00%> (ø%)
...ropbox/affectedmoduledetector/DependencyTracker.kt 87.50% <0.00%> (+12.50%) 4.00% <0.00%> (+2.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 286100a...ab9932f. Read the comment docs.

@digitalbuddha
Copy link
Contributor

12% coverage increase. Fancy! Will review in am

val assembleAndroidTestTask get() = "assemble${variantToTest?.capitalize()}AndroidTest"
val runAndroidTestTask get() = "connected${variantToTest?.capitalize()}AndroidTest"
val jvmTest get() = "test${variantToTest?.capitalize()}UnitTest"
var assembleAndroidTestTask : String? = "assembleDebugAndroidTest"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opening these up to be nullable. If they are set to null, we'll ignore that module when creating the main task.

val paths = getAffectedPaths(testType, project)
paths.forEach { path ->
task.dependsOn(path)
val pluginIds = listOf("com.android.application", "com.android.library", "java-library")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kotlin library?

@chris-mitchell chris-mitchell deleted the refactorAffectedTestConfig branch December 11, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants