diff options
| author | 2018-04-17 00:05:25 +0000 | |
|---|---|---|
| committer | 2018-04-17 00:05:25 +0000 | |
| commit | 038f71d7d7c068b1980c9571937c027f158a6aec (patch) | |
| tree | a504e15d18550960a9ef5870f7ee35c54d634321 /java/java.go | |
| parent | a42770b18a4711f8e453a5bc66306986e5290195 (diff) | |
| parent | fdb084029fbca9cc1e4d449ee4957b171e6d4750 (diff) | |
Merge changes I9fb94f22,I1dfac5ff
* changes:
Fix androidmk_test.go import ordering
Add support for android_library modules
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/java/java.go b/java/java.go index 04ce4694a..bc58df3ad 100644 --- a/java/java.go +++ b/java/java.go @@ -334,6 +334,8 @@ type sdkDep struct { module string systemModules string + frameworkResModule string + jar android.Path aidl android.Path } @@ -423,11 +425,12 @@ func decodeSdkDep(ctx android.BaseContext, v string) sdkDep { } } - toModule := func(m string) sdkDep { + toModule := func(m, r string) sdkDep { ret := sdkDep{ - useModule: true, - module: m, - systemModules: m + "_system_modules", + useModule: true, + module: m, + systemModules: m + "_system_modules", + frameworkResModule: r, } if m == "core.current.stubs" { ret.systemModules = "core-system-modules" @@ -442,16 +445,17 @@ func decodeSdkDep(ctx android.BaseContext, v string) sdkDep { switch v { case "": return sdkDep{ - useDefaultLibs: true, + useDefaultLibs: true, + frameworkResModule: "framework-res", } case "current": - return toModule("android_stubs_current") + return toModule("android_stubs_current", "framework-res") case "system_current": - return toModule("android_system_stubs_current") + return toModule("android_system_stubs_current", "framework-res") case "test_current": - return toModule("android_test_stubs_current") + return toModule("android_test_stubs_current", "framework-res") case "core_current": - return toModule("core.current.stubs") + return toModule("core.current.stubs", "") default: return toFile(v) } @@ -681,7 +685,10 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { tag := ctx.OtherModuleDependencyTag(module) if to, ok := module.(*Library); ok { - checkLinkType(ctx, j, to, tag.(dependencyTag)) + switch tag { + case bootClasspathTag, libTag, staticLibTag: + checkLinkType(ctx, j, to, tag.(dependencyTag)) + } } switch dep := module.(type) { case Dependency: |