Add condtion to avoid build error

If docs file which is result of javadoc is null, there is a build error
when building stubs file. To avoid build error, we don't build if srcJar
files is exist but they don't have java file list.

Bug:77577799
Test: make -j
Test: Marking @hide to all APIs in javax.obex library
      -> make -j -> check build result.
      result is success

Change-Id: I85439417a36425e89a8fa2ecbc66d1b2022bc63a
This commit is contained in:
Sundong Ahn 2018-06-28 14:53:20 +09:00
parent ffc924b8f8
commit 24a099c3b8
1 changed files with 2 additions and 1 deletions

View File

@ -41,10 +41,11 @@ var (
blueprint.RuleParams{
Command: `rm -rf "$outDir" "$annoDir" "$srcJarDir" && mkdir -p "$outDir" "$annoDir" "$srcJarDir" && ` +
`${config.ZipSyncCmd} -d $srcJarDir -l $srcJarDir/list -f "*.java" $srcJars && ` +
`(if [ -s $srcJarDir/list ] || [ -s $out.rsp ] ; then ` +
`${config.SoongJavacWrapper} ${config.JavacWrapper}${config.JavacCmd} ${config.JavacHeapFlags} ${config.CommonJdkFlags} ` +
`$processorpath $javacFlags $bootClasspath $classpath ` +
`-source $javaVersion -target $javaVersion ` +
`-d $outDir -s $annoDir @$out.rsp @$srcJarDir/list && ` +
`-d $outDir -s $annoDir @$out.rsp @$srcJarDir/list ; fi ) && ` +
`${config.SoongZipCmd} -jar -o $out -C $outDir -D $outDir`,
CommandDeps: []string{
"${config.JavacCmd}",