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

Commit 5b7035f8 authored by Paul Duffin's avatar Paul Duffin
Browse files

Explicitly specify `--api-class-resolution api` for metalava

Previously, `--api-class-resolution api` was the default if that option
was not specified but the other change in this topic is switching it to
`--api-class-resolution api:classpath` to match the behavior in
AndroidX. This change explicitly specifies the option needed by Soong's
use of metalava.

Bug: 285140653
Test: m checkapi
Change-Id: Ief3c7f9dfdfa946f21cb048a579ec90309fb350f
parent b2cd6f69
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -535,6 +535,10 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
		// b/223382732
		// b/223382732
		FlagWithArg("--hide ", "ChangedDefault")
		FlagWithArg("--hide ", "ChangedDefault")


	// Force metalava to ignore classes on the classpath when an API file contains missing classes.
	// See b/285140653 for more information.
	cmd.FlagWithArg("--api-class-resolution ", "api")

	return cmd
	return cmd
}
}


+4 −0
Original line number Original line Diff line number Diff line
@@ -1728,6 +1728,10 @@ func metalavaStubCmd(ctx android.ModuleContext, rule *android.RuleBuilder,
		FlagWithArg("--hide ", "InvalidNullabilityOverride").
		FlagWithArg("--hide ", "InvalidNullabilityOverride").
		FlagWithArg("--hide ", "ChangedDefault")
		FlagWithArg("--hide ", "ChangedDefault")


	// Force metalava to ignore classes on the classpath when an API file contains missing classes.
	// See b/285140653 for more information.
	cmd.FlagWithArg("--api-class-resolution ", "api")

	return cmd
	return cmd
}
}