diff options
| author | 2020-09-07 10:23:53 +0000 | |
|---|---|---|
| committer | 2020-09-07 10:23:53 +0000 | |
| commit | 99bd32927432bffa070681538754ae146535f7d1 (patch) | |
| tree | 2c515fec8d794a7dae57bf53f85ed119f9336ce5 /java/java.go | |
| parent | 288f40ba51649ce702b19667d11def58601d797c (diff) | |
| parent | bb3467d2974ff904c7b00324af1ddd355a9199cb (diff) | |
Merge "Allow non-SDK Java libraries to masquerade as <uses-library>." am: bb3467d297
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1417188
Change-Id: If25aaa0174091e966cc5c6b16063b6486a7b4ab6
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index ecc2e2aaf..7bb877d3c 100644 --- a/java/java.go +++ b/java/java.go @@ -441,6 +441,7 @@ type Module struct {  	hiddenAPI  	dexer  	dexpreopter +	usesLibrary  	linter  	// list of the xref extraction files @@ -456,6 +457,7 @@ func (j *Module) addHostProperties() {  	j.AddProperties(  		&j.properties,  		&j.protoProperties, +		&j.usesLibraryProperties,  	)  } @@ -1980,6 +1982,11 @@ 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()) +	} +  	j.distFiles = j.GenerateTaggedDistFiles(ctx)  }  |