misc/androidstudio: check on javaCompile to avoid exception
In commit https://git.io/vQ1gV, the classpath was delayed evaluated to the task executions. But at Library mode, there will be exception because the javaCompile involved is not intialized. Add check to fix it. Change-Id: I23ab2374a704de9fd7bf74ccfaed255045032b3d Reviewed-on: https://go-review.googlesource.com/48050 Reviewed-by: Elias Naur <elias.naur@gmail.com>
This commit is contained in:
parent
e1125eeafd
commit
901bda64d6
@ -216,9 +216,11 @@ class GomobileTask extends BindTask implements OutputFileTask {
|
|||||||
}
|
}
|
||||||
def cmd = ["bind", "-i"]
|
def cmd = ["bind", "-i"]
|
||||||
// Add the generated R and databinding classes to the classpath.
|
// Add the generated R and databinding classes to the classpath.
|
||||||
|
if (javaCompile) {
|
||||||
def classpath = project.files(javaCompile.classpath, javaCompile.destinationDir)
|
def classpath = project.files(javaCompile.classpath, javaCompile.destinationDir)
|
||||||
cmd << "-classpath"
|
cmd << "-classpath"
|
||||||
cmd << classpath.join(File.pathSeparator)
|
cmd << classpath.join(File.pathSeparator)
|
||||||
|
}
|
||||||
cmd << "-o"
|
cmd << "-o"
|
||||||
cmd << outputFile.getAbsolutePath()
|
cmd << outputFile.getAbsolutePath()
|
||||||
cmd << "-target"
|
cmd << "-target"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user