bp2build kotlinCFlags
for java_library, java_binary, android_app & android_library Change-Id: Ia8dec7e7d497eb41b2d8dcd8c44c3090d1d3b4bd Bug: 271265771 Test: go test ./bp2build
This commit is contained in:
@@ -306,3 +306,41 @@ java_library{
|
||||
}),
|
||||
}})
|
||||
}
|
||||
|
||||
func TestAndroidAppKotlinCflags(t *testing.T) {
|
||||
runAndroidAppTestCase(t, Bp2buildTestCase{
|
||||
Description: "Android app with kotlincflags",
|
||||
ModuleTypeUnderTest: "android_app",
|
||||
ModuleTypeUnderTestFactory: java.AndroidAppFactory,
|
||||
Filesystem: map[string]string{
|
||||
"res/res.png": "",
|
||||
},
|
||||
Blueprint: simpleModuleDoNotConvertBp2build("filegroup", "foocert") + `
|
||||
android_app {
|
||||
name: "foo",
|
||||
srcs: ["a.java", "b.kt"],
|
||||
certificate: ":foocert",
|
||||
manifest: "fooManifest.xml",
|
||||
kotlincflags: ["-flag1", "-flag2"],
|
||||
}
|
||||
`,
|
||||
ExpectedBazelTargets: []string{
|
||||
MakeBazelTarget("android_library", "foo_kt", AttrNameToString{
|
||||
"srcs": `[
|
||||
"a.java",
|
||||
"b.kt",
|
||||
]`,
|
||||
"manifest": `"fooManifest.xml"`,
|
||||
"resource_files": `["res/res.png"]`,
|
||||
"kotlincflags": `[
|
||||
"-flag1",
|
||||
"-flag2",
|
||||
]`,
|
||||
}),
|
||||
MakeBazelTarget("android_binary", "foo", AttrNameToString{
|
||||
"deps": `[":foo_kt"]`,
|
||||
"certificate": `":foocert"`,
|
||||
"manifest": `"fooManifest.xml"`,
|
||||
}),
|
||||
}})
|
||||
}
|
||||
|
Reference in New Issue
Block a user