Merge "Add missing dependency on compose plugin in kapt rules" am: 6c59cdb5c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2084483 Change-Id: I89772b863d415df80eaae6ff3ea75c456d213182 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
7a0e9509bc
2 changed files with 9 additions and 0 deletions
|
@ -175,6 +175,7 @@ func kotlinKapt(ctx android.ModuleContext, srcJarOutputFile, resJarOutputFile an
|
|||
|
||||
var deps android.Paths
|
||||
deps = append(deps, flags.kotlincClasspath...)
|
||||
deps = append(deps, flags.kotlincDeps...)
|
||||
deps = append(deps, srcJars...)
|
||||
deps = append(deps, flags.processorPath...)
|
||||
deps = append(deps, commonSrcFiles...)
|
||||
|
|
|
@ -325,6 +325,7 @@ func TestKotlinCompose(t *testing.T) {
|
|||
java_library {
|
||||
name: "withcompose",
|
||||
srcs: ["a.kt"],
|
||||
plugins: ["plugin"],
|
||||
static_libs: ["androidx.compose.runtime_runtime"],
|
||||
}
|
||||
|
||||
|
@ -332,6 +333,10 @@ func TestKotlinCompose(t *testing.T) {
|
|||
name: "nocompose",
|
||||
srcs: ["a.kt"],
|
||||
}
|
||||
|
||||
java_plugin {
|
||||
name: "plugin",
|
||||
}
|
||||
`)
|
||||
|
||||
buildOS := result.Config.BuildOS.String()
|
||||
|
@ -346,6 +351,9 @@ func TestKotlinCompose(t *testing.T) {
|
|||
android.AssertStringDoesContain(t, "missing compose compiler plugin",
|
||||
withCompose.VariablesForTestsRelativeToTop()["kotlincFlags"], "-Xplugin="+composeCompiler.String())
|
||||
|
||||
android.AssertStringListContains(t, "missing kapt compose compiler dependency",
|
||||
withCompose.Rule("kapt").Implicits.Strings(), composeCompiler.String())
|
||||
|
||||
android.AssertStringListDoesNotContain(t, "unexpected compose compiler dependency",
|
||||
noCompose.Rule("kotlinc").Implicits.Strings(), composeCompiler.String())
|
||||
|
||||
|
|
Loading…
Reference in a new issue