mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Fix the app/ bug.
This commit is contained in:
parent
a5b180e6db
commit
5ee24d4738
1 changed files with 4 additions and 3 deletions
|
@ -125,7 +125,7 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, v
|
||||||
|
|
||||||
inner class AaptCommand(project: Project, aapt: String, val aaptCommand: String,
|
inner class AaptCommand(project: Project, aapt: String, val aaptCommand: String,
|
||||||
useErrorStream: Boolean = false,
|
useErrorStream: Boolean = false,
|
||||||
cwd: File = File(project.directory)) : AndroidCommand(project, androidHome(project), aapt) {
|
cwd: File = File(".")) : AndroidCommand(project, androidHome(project), aapt) {
|
||||||
init {
|
init {
|
||||||
directory = cwd
|
directory = cwd
|
||||||
useErrorStreamAsErrorIndicator = useErrorStream
|
useErrorStreamAsErrorIndicator = useErrorStream
|
||||||
|
@ -209,8 +209,9 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, v
|
||||||
|
|
||||||
private fun compile(project: Project, rDirectory: String): File {
|
private fun compile(project: Project, rDirectory: String): File {
|
||||||
val sourceFiles = arrayListOf(Paths.get(rDirectory, "R.java").toFile().path)
|
val sourceFiles = arrayListOf(Paths.get(rDirectory, "R.java").toFile().path)
|
||||||
val buildDir = Paths.get(project.buildDirectory, "generated", "classes").toFile()
|
val buildDir = File(AndroidFiles.generated(project), "classes")
|
||||||
val cai = CompilerActionInfo(project.directory, listOf(), sourceFiles, buildDir, listOf(
|
// Using a directory of "." since the project.directory is already present in buildDir
|
||||||
|
val cai = CompilerActionInfo(".", listOf(), sourceFiles, buildDir, listOf(
|
||||||
"-source", "1.6", "-target", "1.6"))
|
"-source", "1.6", "-target", "1.6"))
|
||||||
javaCompiler.compile(project, context, cai)
|
javaCompiler.compile(project, context, cai)
|
||||||
return buildDir
|
return buildDir
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue