commit | 8d74e3351856950afe816b479adae7587aa746ae | [log] [tgz] |
---|---|---|
author | Xavier Ducrohet <xav@google.com> | Tue Jan 07 22:08:16 2020 -0800 |
committer | Xavier Ducrohet <xav@google.com> | Wed Jan 15 16:23:38 2020 +0000 |
tree | 9bd39685ba4f4c03dc6e539d44b1d110b515e6e5 | |
parent | f1ede07d5774b9fd51fd24e14f2fbc2992fd0665 [diff] |
Introduce AndroidTest and UnitTest interfaces. This change rework the inheritance hierarchy. In order to reduce confusion, Variant is now the base only for the actual build output (apk, aar). Variants are components and tests are components too. The new tree looks like this: - Component - Variant - ApplicationVariant - LibraryVariant - .... - UnitTest - AndroidTest The Properties tree looks the same. This means the onVariants API only acts on variants but not components. We will introduce later a onComponents that requires Type filtering, but onVariants can be specialized in each Extension to default to the actual Variant that most users will want to touch. To offset the lack of tests in onVariants we give access to them via the variant: onVariants().withName("foo") { onProperties { // variant props here } unitTest { enabled = false onProperties { // test props here } } androidTest { enabled = false } } Because the root type is now Component[Properties], this change also renames some classes for *Variant* to *Component* Bug: N/A Test: existing tests Change-Id: Ie56cf03779b414a8d869d0db9a3268c54268a522
This project contains: