Преглед изворни кода

Merge "Always run AndroidGlobalLintChecker.jar with lint invocations"

Matt Gilbride пре 1 година
родитељ
комит
18ac53b4d0
2 измењених фајлова са 5 додато и 0 уклоњено
  1. 3 0
      java/lint.go
  2. 2 0
      java/testing.go

+ 3 - 0
java/lint.go

@@ -366,6 +366,9 @@ func (l *linter) lint(ctx android.ModuleContext) {
 		}
 	}
 
+	l.extraLintCheckJars = append(l.extraLintCheckJars, android.PathForSource(ctx,
+		"prebuilts/cmdline-tools/AndroidGlobalLintChecker.jar"))
+
 	rule := android.NewRuleBuilder(pctx, ctx).
 		Sbox(android.PathForModuleOut(ctx, "lint"),
 			android.PathForModuleOut(ctx, "lint.sbox.textproto")).

+ 2 - 0
java/testing.go

@@ -56,6 +56,8 @@ var PrepareForTestWithJavaBuildComponents = android.GroupFixturePreparers(
 		"build/make/target/product/security": nil,
 		// Required to generate Java used-by API coverage
 		"build/soong/scripts/gen_java_usedby_apex.sh": nil,
+		// Needed for the global lint checks provided from frameworks/base
+		"prebuilts/cmdline-tools/AndroidGlobalLintChecker.jar": nil,
 	}.AddToFixture(),
 )