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

Commit 7e86385f authored by Colin Cross's avatar Colin Cross
Browse files

Fix ravenizer when transitive classpath is enabled

Ravenizer and the other rules that modify the output jar also need to
replace the implementation jar depset with the modified output jar.

Bug: 308016794
Test: atest CtsOsTestCasesRavenwood
Flag: build.RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH
Change-Id: I87ec143431c09ed878f8e1c3541b56d8077e23b5
parent c9b4f6b5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1665,6 +1665,8 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
			Output:      ravenizerOutput,
		})
		outputFile = ravenizerOutput
		localImplementationJars = android.Paths{ravenizerOutput}
		completeStaticLibsImplementationJars = android.NewDepSet(android.PREORDER, localImplementationJars, nil)
	}

	if j.shouldApiMapper() {
@@ -1677,6 +1679,8 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
			Output:      apiMapperFile,
		})
		outputFile = apiMapperFile
		localImplementationJars = android.Paths{apiMapperFile}
		completeStaticLibsImplementationJars = android.NewDepSet(android.PREORDER, localImplementationJars, nil)
	}

	// Check package restrictions if necessary.
@@ -1698,6 +1702,8 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
			Validation: pkgckFile,
		})
		outputFile = packageCheckOutputFile
		localImplementationJars = android.Paths{packageCheckOutputFile}
		completeStaticLibsImplementationJars = android.NewDepSet(android.PREORDER, localImplementationJars, nil)

		// Check packages and create a timestamp file when complete.
		CheckJarPackages(ctx, pkgckFile, outputFile, j.properties.Permitted_packages)