diff options
| author | 2025-01-13 11:19:54 -0800 | |
|---|---|---|
| committer | 2025-01-13 11:19:54 -0800 | |
| commit | ece2411f774bb8d52a2bdd5a5060ba4f8422a048 (patch) | |
| tree | 4e9706dc8eb86871748ad37c85d049bad1b2b56b /java/java.go | |
| parent | 403c3cd86480327c0b3eb15f47c4e10c7c25e614 (diff) | |
| parent | 27b74aa99ad90bc3e913edcdede208dac4db0f7c (diff) | |
Merge changes I4fb8fc36,I5d7150fe into main
* changes:
Convert classLoaderContextForUsesLibDeps to use ModuleProxy.
Convert checkSdkVersions to use ModuleProxy.
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index 48ba8def2..3a1bc335a 100644 --- a/java/java.go +++ b/java/java.go @@ -276,6 +276,11 @@ type ModuleWithUsesLibraryInfo struct { UsesLibrary *usesLibrary } +type ModuleWithSdkDepInfo struct { + SdkLinkType sdkLinkType + Stubs bool +} + // JavaInfo contains information about a java module for use by modules that depend on it. type JavaInfo struct { // HeaderJars is a list of jars that can be passed as the javac classpath in order to link @@ -364,10 +369,16 @@ type JavaInfo struct { ProvidesUsesLibInfo *ProvidesUsesLibInfo ModuleWithUsesLibraryInfo *ModuleWithUsesLibraryInfo + + ModuleWithSdkDepInfo *ModuleWithSdkDepInfo } var JavaInfoProvider = blueprint.NewProvider[*JavaInfo]() +type JavaLibraryInfo struct{} + +var JavaLibraryInfoProvider = blueprint.NewProvider[JavaLibraryInfo]() + // SyspropPublicStubInfo contains info about the sysprop public stub library that corresponds to // the sysprop implementation library. type SyspropPublicStubInfo struct { @@ -1047,6 +1058,8 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) { TopLevelTarget: j.sourceProperties.Top_level_test_target, }) + android.SetProvider(ctx, JavaLibraryInfoProvider, JavaLibraryInfo{}) + if javaInfo != nil { setExtraJavaInfo(ctx, j, javaInfo) android.SetProvider(ctx, JavaInfoProvider, javaInfo) @@ -3542,4 +3555,12 @@ func setExtraJavaInfo(ctx android.ModuleContext, module android.Module, javaInfo UsesLibrary: mwul.UsesLibrary(), } } + + if mwsd, ok := module.(moduleWithSdkDep); ok { + linkType, stubs := mwsd.getSdkLinkType(ctx, ctx.ModuleName()) + javaInfo.ModuleWithSdkDepInfo = &ModuleWithSdkDepInfo{ + SdkLinkType: linkType, + Stubs: stubs, + } + } } |