diff options
author | 2024-12-06 21:08:06 +0000 | |
---|---|---|
committer | 2024-12-06 21:08:06 +0000 | |
commit | f7f72eff9eb73e0af44382eaa19967b4589cfe51 (patch) | |
tree | 80101cca123f125f3e224c2cacdfd3118d4506fb /java/base.go | |
parent | 71a028d9e4e95e318fbd8ad231da84a6f971359a (diff) | |
parent | 0a3ef84335088feccba395822a66a13b7eb49faa (diff) |
Merge "Change compose Compiler. New Soong Exclude_common_Srcs." into main
Diffstat (limited to 'java/base.go')
-rw-r--r-- | java/base.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/base.go b/java/base.go index c0ac4ab99..f26404b8c 100644 --- a/java/base.go +++ b/java/base.go @@ -60,6 +60,9 @@ type CommonProperties struct { // This is most useful in the arch/multilib variants to remove non-common files Exclude_srcs []string `android:"path,arch_variant"` + // list of Kotlin source files that should excluded from the list of common_srcs. + Exclude_common_srcs []string `android:"path,arch_variant"` + // list of directories containing Java resources Java_resource_dirs []string `android:"arch_variant"` @@ -922,7 +925,7 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { if j.useCompose(ctx) { ctx.AddVariationDependencies(ctx.Config().BuildOSCommonTarget.Variations(), kotlinPluginTag, - "androidx.compose.compiler_compiler-hosted-plugin") + "kotlin-compose-compiler-plugin") } } @@ -1182,7 +1185,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath flags = protoFlags(ctx, &j.properties, &j.protoProperties, flags) } - kotlinCommonSrcFiles := android.PathsForModuleSrcExcludes(ctx, j.properties.Common_srcs, nil) + kotlinCommonSrcFiles := android.PathsForModuleSrcExcludes(ctx, j.properties.Common_srcs, j.properties.Exclude_common_srcs) if len(kotlinCommonSrcFiles.FilterOutByExt(".kt")) > 0 { ctx.PropertyErrorf("common_srcs", "common_srcs must be .kt files") } |