Skip to content

Commit

Permalink
Merge "pass read new storage parameter to java codegen" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhi Dou authored and Gerrit Code Review committed Sep 23, 2024
2 parents 480c0e5 + 9cf2e8e commit 168b3f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aconfig/codegen/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ var (
` --mode ${mode}` +
` --cache ${in}` +
` --out ${out}.tmp` +
` --allow-instrumentation ${debug}` +
` && $soong_zip -write_if_changed -jar -o ${out} -C ${out}.tmp -D ${out}.tmp` +
` && rm -rf ${out}.tmp`,
CommandDeps: []string{
"$aconfig",
"$soong_zip",
},
Restat: true,
}, "mode")
}, "mode", "debug")

// For cc_aconfig_library: Generate C++ library
cppRule = pctx.AndroidStaticRule("cc_aconfig_library",
Expand Down
5 changes: 4 additions & 1 deletion aconfig/codegen/java_aconfig_library.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (

"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
"strconv"
)

type declarationsTagType struct {
Expand Down Expand Up @@ -71,6 +72,7 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) DepsMutator(module *ja
module.AddSharedLibrary("aconfig-annotations-lib")
// TODO(b/303773055): Remove the annotation after access issue is resolved.
module.AddSharedLibrary("unsupportedappusage")
module.AddSharedLibrary("aconfig_storage_reader_java")
}
}

Expand Down Expand Up @@ -102,7 +104,8 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuild
Output: srcJarPath,
Description: "aconfig.srcjar",
Args: map[string]string{
"mode": mode,
"mode": mode,
"debug": strconv.FormatBool(ctx.Config().ReleaseReadFromNewStorage()),
},
})

Expand Down
2 changes: 2 additions & 0 deletions java/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,9 @@ func gatherRequiredDepsForTest() string {
"kotlin-stdlib-jdk8",
"kotlin-annotations",
"stub-annotations",

"aconfig-annotations-lib",
"aconfig_storage_reader_java",
"unsupportedappusage",
}

Expand Down

0 comments on commit 168b3f8

Please sign in to comment.