Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79a94a27 authored by Ulyana Trafimovich's avatar Ulyana Trafimovich Committed by Gerrit Code Review
Browse files

Merge "Replace `is_uses_lib` property with `provides_uses_lib`."

parents 3e0b9c03 54027b57
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1883,8 +1883,10 @@ type UsesLibraryProperties struct {
	// to true if either uses_libs or optional_uses_libs is set.  Will unconditionally default to true in the future.
	Enforce_uses_libs *bool

	// If the library itself is a uses-library (this is needed for non-SDK libraries).
	Is_uses_lib *bool
	// Optional name of the <uses-library> provided by this module. This is needed for non-SDK
	// libraries, because SDK ones are automatically picked up by Soong. The <uses-library> name
	// normally is the same as the module name, but there are exceptions.
	Provides_uses_lib *string
}

// usesLibrary provides properties and helper functions for AndroidApp and AndroidAppImport to verify that the
+3 −3
Original line number Diff line number Diff line
@@ -1979,9 +1979,9 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
	// added to the Android manifest.
	j.exportedSdkLibs.MaybeAddLibraryPath(ctx, j.OptionalImplicitSdkLibrary(), j.DexJarBuildPath(), j.DexJarInstallPath())

	// If this is a non-SDK uses-library, export itself.
	if proptools.Bool(j.usesLibraryProperties.Is_uses_lib) {
		j.exportedSdkLibs.AddLibraryPath(ctx, ctx.ModuleName(), j.DexJarBuildPath(), j.DexJarInstallPath())
	// A non-SDK library may provide a <uses-library> (the name may be different from the module name).
	if lib := proptools.String(j.usesLibraryProperties.Provides_uses_lib); lib != "" {
		j.exportedSdkLibs.AddLibraryPath(ctx, lib, j.DexJarBuildPath(), j.DexJarInstallPath())
	}

	j.distFiles = j.GenerateTaggedDistFiles(ctx)