bjoernQ / unmock-plugin

Gradle plugin to be used in combination with the new unit testing feature of the Gradle Plugin / Android Studio to use real classes for e.g. SparseArray.
Apache License 2.0
323 stars 22 forks source link

Solves issue #51 #53

Closed stephanenicolas closed 5 years ago

stephanenicolas commented 5 years ago

Solves issue #51
I made all changes. Now tasks are created per variant (e.g. unMockDebugUnitTest, unmockMyBuildTypeReleaseUnitTest, etc.).

There is no afterEvaluate block anymore.

And cherry on top of the cake, as the plugin is in Groovy, it benefits from a full dynamic typing and doesn't rely on the android plugin ;) . But honnestly it would be better to have it typed, in kotlin, and depending on the plugin IMHO.

stephanenicolas commented 5 years ago

@drewhannay thx for the comment ! I just pushed a commit to fix it, the change is a few lines above your comment.

drewhannay commented 5 years ago

LGTM! FYI one of us will have to update our PR, depending on who gets merged first :)

stephanenicolas commented 5 years ago

Thx for the review @drewhannay . @bjoernQ we're quite ready :)

bjoernQ commented 5 years ago

@stephanenicolas just merged the other PR - this one needs an update now unfortunately

stephanenicolas commented 5 years ago

@drewhannay @bjoernQ here is the new PR. I changed quite a few things from my previous PR and actually re-ordered a few things in the plugin to take into account the lazy configurations and the tests variants.

Now things are more clear:

drewhannay commented 5 years ago

LGTM :)