Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Clean up variant aware code #80

Merged
merged 5 commits into from Feb 13, 2018
Merged

Clean up variant aware code #80

merged 5 commits into from Feb 13, 2018

Conversation

tasomaniac
Copy link
Contributor

⚠️ Depends in #79

DomainObjectSet.all loop is live and thanks to that usually afterEvaluate is not necessary because the closure will be called later (just after) the variants have been added.

getAllVariants was merging android variants with test and unitTest variants. This was breaking the liveliness of the set. That's why we needed afterEvaluate.

Since the variant aware code is extracted away, this PR cleans this up by calling all on variants one by one instead of merging them.

And thanks to that, the for looping over variants happen in the base class. This means that the implementations for Checkstyle, Findbugs and PMD are cleaner because they configure 1 variant at a time.

source = sourceSet.java.srcDirs
classpath = files("$buildDir/intermediates/classes/")
}
variant.sourceSets.each { sourceSet ->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just 1 level indentation deleted, no change.

@tasomaniac tasomaniac force-pushed the clean-up branch 5 times, most recently from 5149d63 to e8b1f43 Compare February 13, 2018 10:27
@tasomaniac
Copy link
Contributor Author

retest this please

@tasomaniac tasomaniac changed the base branch from android-lint-improves to develop February 13, 2018 15:17
Copy link
Contributor

@tobiasheine tobiasheine left a comment

Choose a reason for hiding this comment

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

lgtm

@tobiasheine tobiasheine merged commit e0d14b1 into develop Feb 13, 2018
@tobiasheine tobiasheine deleted the clean-up branch February 13, 2018 16:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants