From 23a1ba687d60b79680dc6b37ce5e7f1cc161362a Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Wed, 19 Sep 2018 11:19:39 -0700 Subject: [PATCH] Fix race condition for jdiff/apicheck Some build breakages happening on git_master/docs because jdiff rule and apicheck rule may start in the same time, and jdiff may delete the same srcjars and out dirs when apicheck trying to read which can cause apicheck to be failed. So change the dir names used by jdiff to not mix with dirs used by apicheck. Test: m -j docs Bug: b/114368000 Change-Id: I90a53e0ef5f1ff947db7eb8cc73744919a9b93cb --- java/droiddoc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/droiddoc.go b/java/droiddoc.go index a2b10c542..a4050d552 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -1528,9 +1528,9 @@ func (d *Droidstubs) transformJdiff(ctx android.ModuleContext, implicits android Implicits: implicits, ImplicitOutputs: implicitOutputs, Args: map[string]string{ - "outDir": android.PathForModuleOut(ctx, "out").String(), - "srcJarDir": android.PathForModuleOut(ctx, "srcjars").String(), - "stubsDir": android.PathForModuleOut(ctx, "stubsDir").String(), + "outDir": android.PathForModuleOut(ctx, "jdiff-out").String(), + "srcJarDir": android.PathForModuleOut(ctx, "jdiff-srcjars").String(), + "stubsDir": android.PathForModuleOut(ctx, "jdiff-stubsDir").String(), "srcJars": strings.Join(d.Javadoc.srcJars.Strings(), " "), "opts": opts, "bootclasspathArgs": bootclasspathArgs,