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

Commit 878c6626 authored by Mathew Inwood's avatar Mathew Inwood
Browse files

Use correct variant for annotation processors.

Annotation processors should always have a common host variant, rather
than a device variant as the build was looking for before.

Bug: 110868826
Test: m
Change-Id: I2b7d0e7ed1af3f2f9ddb87d2bf36920737a507e9
parent b1f0f1ae
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ type config struct {

	Targets              map[OsClass][]Target
	BuildOsVariant       string
	BuildOsCommonVariant string

	deviceConfig *deviceConfig

@@ -310,6 +311,7 @@ func NewConfig(srcDir, buildDir string) (Config, error) {

	config.Targets = targets
	config.BuildOsVariant = targets[Host][0].String()
	config.BuildOsCommonVariant = getCommonTargets(targets[Host])[0].String()

	if err := config.fromEnv(); err != nil {
		return Config{}, err
+3 −2
Original line number Diff line number Diff line
@@ -522,8 +522,9 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {

	ctx.AddDependency(ctx.Module(), libTag, j.properties.Libs...)
	ctx.AddDependency(ctx.Module(), staticLibTag, j.properties.Static_libs...)
	ctx.AddDependency(ctx.Module(), annoTag, j.properties.Annotation_processors...)

	ctx.AddFarVariationDependencies([]blueprint.Variation{
		{"arch", ctx.Config().BuildOsCommonVariant},
	}, annoTag, j.properties.Annotation_processors...)
	android.ExtractSourcesDeps(ctx, j.properties.Srcs)
	android.ExtractSourcesDeps(ctx, j.properties.Exclude_srcs)
	android.ExtractSourcesDeps(ctx, j.properties.Java_resources)