summaryrefslogtreecommitdiff
path: root/android/sdk_version.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2023-01-17 20:40:22 +0000
committer Jihoon Kang <jihoonkang@google.com> 2023-03-28 21:53:45 +0000
commit1bff0349d4954284e0e6fbcab2ace95e4be15766 (patch)
tree4fd0efd0fac0ee6f3ddeabe67add19661bded145 /android/sdk_version.go
parenta22c4b6a796477efa9802726da5073ae7e2ceef2 (diff)
Modify Soong to utilize from-text android.jar in build
Context - from-text android.jar files are built using Metalava, and these can be utilized in `decodeSdkDep` so that any modules that depends on APIs can be compiled using from-text android.jars - This change removes dependency on source java files when compiling stub android.jar files Implementation - Modify java_api_library module to create system modules using the generated android.jar - Replace modules in decodeSdkDep to link against java_api_library modules - Add --build-from-text-stub flag to hide the feature behind a flag Test: m --build-from-text-stub Bug: 271154441 Change-Id: I104df595edc65c0006820d5ae5b15f1fb167e190
Diffstat (limited to 'android/sdk_version.go')
-rw-r--r--android/sdk_version.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/android/sdk_version.go b/android/sdk_version.go
index 7ace638b5..1e1fe1020 100644
--- a/android/sdk_version.go
+++ b/android/sdk_version.go
@@ -94,8 +94,9 @@ func (k SdkKind) JavaLibraryName(c Config) string {
// not check if either module exists.
// TODO: Return .txt (single-tree or multi-tree equivalents) based on config
func JavaLibraryNameFromText(c Config, name string) string {
- // This returns the default for now.
- // TODO: Implement this
+ if c.BuildFromTextStub() {
+ return name + ".from-text"
+ }
return name
}