diff options
author | Rashed Abdel-Tawab <rashed@linux.com> | 2018-08-09 14:08:53 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-12-08 22:28:30 +0200 |
commit | 90783142d5e53e22fead18d736a64e54e05bcd82 (patch) | |
tree | 60fbf8ac439ab179d607e084d74a117d0f7ea747 /java/java.go | |
parent | c743f0c55518796912fb96126d6a262bf1edfa6e (diff) |
soong: Squash of lineage-sdk bringup commits
Squash of:
Author: Rashed Abdel-Tawab <rashed@linux.com>
Date: Thu Aug 9 14:08:53 2018 -0700
soong: Special case Lineage SDK
* org.lineageos.platform-res.apk needs to be installed to /system/framework
* org.lineageos.platform-res needs to be a dependency for
org.lineageos.platform and org.lineageos.platform.internal
* Add other special exceptions for org.lineageos.platform-res
Change-Id: Ic617c07c086916005ea4b88f26d31c61691a45f8
Author: Sam Mortimer <sam@mortimer.me.uk>
Date: Thu Aug 30 15:33:16 2018 -0700
soong: make org.lineage.platform-res depend on framework-res
*) Allows us to build org.lineage.platform-res with no_framework_libs
true (as is done for framework-res).
*) Whilst we're here, undo a dependency loop prevention in aar.go
that we added during sdk bringup to allow our platform res to build
with no_framework_libs false.
Change-Id: Ib452a2e45112baf5d61b70b4be1ce0c01dfd84e5
Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date: Mon Feb 4 18:56:52 2019 +0100
Always link org.lineageos.platform-res for org.lineageos.platform.sdk
Test: m clean && m org.lineageos.platform.sdk
Change-Id: I58956855bd4d1157e2582103c4861e7b384b4f73
Author: Sam Mortimer <sam@mortimer.me.uk>
Date: Fri Aug 31 10:52:29 2018 -0700
soong: Allow framework to access lineage-sdk resources
*) Make framework depend on lineage-sdk resource package
*) Allows framework module to access lineage-sdk resources
via usual org.lineageos.platform.internal.R paths.
Change-Id: Ifd19d43d9308ac370ad40a499de16bf8ce204beb
Change-Id: Icc18de5dfaa83fc0a1eda6f3704f3a92e1de0764
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index a55ded35f..d5f1ffd57 100644 --- a/java/java.go +++ b/java/java.go @@ -578,6 +578,7 @@ var ( bootClasspathTag = dependencyTag{name: "bootclasspath"} systemModulesTag = dependencyTag{name: "system modules"} frameworkResTag = dependencyTag{name: "framework-res"} + lineageResTag = dependencyTag{name: "org.lineageos.platform-res"} frameworkApkTag = dependencyTag{name: "framework-apk"} kotlinStdlibTag = dependencyTag{name: "kotlin-stdlib"} kotlinAnnotationsTag = dependencyTag{name: "kotlin-annotations"} @@ -610,6 +611,7 @@ type sdkDep struct { java9Classpath []string frameworkResModule string + lineageResModule string jars android.Paths aidl android.OptionalPath @@ -704,11 +706,22 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { ctx.AddVariationDependencies(nil, systemModulesTag, sdkDep.systemModules) } + if ctx.ModuleName() == "framework" || ctx.ModuleName() == "framework-annotation-proc" { + ctx.AddDependency(ctx.Module(), lineageResTag, "org.lineageos.platform-res") + } if ctx.ModuleName() == "android_stubs_current" || ctx.ModuleName() == "android_system_stubs_current" || ctx.ModuleName() == "android_test_stubs_current" { ctx.AddVariationDependencies(nil, frameworkApkTag, "framework-res") } + if ctx.ModuleName() == "org.lineageos.platform-res" { + ctx.AddDependency(ctx.Module(), frameworkResTag, "framework-res") + } + if ctx.ModuleName() == "org.lineageos.platform" || + ctx.ModuleName() == "org.lineageos.platform.internal" || + ctx.ModuleName() == "org.lineageos.platform.sdk" { + ctx.AddDependency(ctx.Module(), lineageResTag, "org.lineageos.platform-res") + } } syspropPublicStubs := syspropPublicStubs(ctx.Config()) @@ -1057,6 +1070,19 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { } else { ctx.PropertyErrorf("exported_plugins", "%q is not a java_plugin module", otherName) } + case lineageResTag: + if ctx.ModuleName() == "org.lineageos.platform" || + ctx.ModuleName() == "org.lineageos.platform.internal" || + ctx.ModuleName() == "org.lineageos.platform.sdk" { + // org.lineageos.platform.jar has a one-off dependency on the R.java and Manifest.java files + // generated by org.lineageos.platform-res.apk + deps.srcJars = append(deps.srcJars, dep.(*AndroidApp).aaptSrcJar) + } + if ctx.ModuleName() == "framework" { + // framework.jar has a one-off dependency on the R.java and Manifest.java files + // generated by org.lineageos.platform-res.apk + deps.srcJars = append(deps.srcJars, dep.(*AndroidApp).aaptSrcJar) + } case frameworkApkTag: if ctx.ModuleName() == "android_stubs_current" || ctx.ModuleName() == "android_system_stubs_current" || |