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

Commit 4ada982d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Rename jetifier property and add it to androidmk"

parents 66f2e870 1001a797
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ func init() {
			"LOCAL_DEX_PREOPT_GENERATE_PROFILE": "dex_preopt.profile_guided",

			"LOCAL_PRIVATE_PLATFORM_APIS": "platform_apis",
			"LOCAL_JETIFIER_ENABLED":      "jetifier",
		})
}

+2 −0
Original line number Diff line number Diff line
@@ -631,12 +631,14 @@ include $(call all-makefiles-under,$(LOCAL_PATH))
			LOCAL_SRC_FILES := test.jar
			LOCAL_MODULE_CLASS := JAVA_LIBRARIES
			LOCAL_STATIC_ANDROID_LIBRARIES :=
			LOCAL_JETIFIER_ENABLED := true
			include $(BUILD_PREBUILT)
		`,
		expected: `
			java_import {
				jars: ["test.jar"],

				jetifier: true,
			}
		`,
	},
+2 −2
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ type AARImportProperties struct {
	Libs        []string

	// if set to true, run Jetifier against .aar file. Defaults to false.
	Jetifier_enabled *bool
	Jetifier *bool
}

type AARImport struct {
@@ -540,7 +540,7 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
	aarName := ctx.ModuleName() + ".aar"
	var aar android.Path
	aar = android.PathForModuleSrc(ctx, a.properties.Aars[0])
	if Bool(a.properties.Jetifier_enabled) {
	if Bool(a.properties.Jetifier) {
		inputFile := aar
		aar = android.PathForModuleOut(ctx, "jetifier", aarName)
		TransformJetifier(ctx, aar.(android.WritablePath), inputFile)
+2 −2
Original line number Diff line number Diff line
@@ -1726,7 +1726,7 @@ type ImportProperties struct {
	Exclude_dirs []string

	// if set to true, run Jetifier against .jar file. Defaults to false.
	Jetifier_enabled *bool
	Jetifier *bool
}

type Import struct {
@@ -1771,7 +1771,7 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) {
	outputFile := android.PathForModuleOut(ctx, "combined", jarName)
	TransformJarsToJar(ctx, outputFile, "for prebuilts", jars, android.OptionalPath{},
		false, j.properties.Exclude_files, j.properties.Exclude_dirs)
	if Bool(j.properties.Jetifier_enabled) {
	if Bool(j.properties.Jetifier) {
		inputFile := outputFile
		outputFile = android.PathForModuleOut(ctx, "jetifier", jarName)
		TransformJetifier(ctx, outputFile, inputFile)