Turn off dex actions for sourceless modules.

Test: dexpreopt_test.go
Fixes: 129370564
Change-Id: Ic292f37c4f782b14fce625b85817b58c31d3f276
This commit is contained in:
Jaewoong Jung
2019-05-13 09:23:20 -07:00
parent bc975e8b89
commit a24af3ba20
2 changed files with 31 additions and 10 deletions

View File

@@ -52,14 +52,26 @@ func TestDexpreoptEnabled(t *testing.T) {
}`,
enabled: true,
},
{
name: "app without sources",
bp: `
android_app {
name: "foo",
}`,
// TODO(ccross): this should probably be false
enabled: false,
},
{
name: "app with libraries",
bp: `
android_app {
name: "foo",
static_libs: ["lib"],
}
java_library {
name: "lib",
srcs: ["a.java"],
}`,
enabled: true,
},
{
@@ -69,10 +81,8 @@ func TestDexpreoptEnabled(t *testing.T) {
name: "foo",
installable: true,
}`,
// TODO(ccross): this should probably be false
enabled: true,
enabled: false,
},
{
name: "static java library",
bp: `