mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-28 00:58:12 -07:00
Bogus directory.
This commit is contained in:
parent
b3705eca80
commit
9dbeb8f14f
1 changed files with 2 additions and 6 deletions
|
@ -108,8 +108,7 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler,
|
||||||
runBefore = arrayOf("compile"), runAfter = arrayOf("clean"))
|
runBefore = arrayOf("compile"), runAfter = arrayOf("clean"))
|
||||||
fun taskGenerateRFile(project: Project): TaskResult {
|
fun taskGenerateRFile(project: Project): TaskResult {
|
||||||
|
|
||||||
val resDir = "temporaryBogusResDir"
|
val aarDependencies = explodeAarFiles(project)
|
||||||
val aarDependencies = explodeAarFiles(project, File(resDir))
|
|
||||||
preDexFiles.addAll(preDex(project, context.variant, aarDependencies))
|
preDexFiles.addAll(preDex(project, context.variant, aarDependencies))
|
||||||
val rDirectory = KFiles.joinAndMakeDir(KFiles.generatedSourceDir(project, context.variant, "r"))
|
val rDirectory = KFiles.joinAndMakeDir(KFiles.generatedSourceDir(project, context.variant, "r"))
|
||||||
extraSourceDirectories.add(File(rDirectory))
|
extraSourceDirectories.add(File(rDirectory))
|
||||||
|
@ -163,7 +162,7 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler,
|
||||||
* Extract all the .aar files found in the dependencies and add their android.jar to classpathEntries,
|
* Extract all the .aar files found in the dependencies and add their android.jar to classpathEntries,
|
||||||
* which will be added to the classpath at compile time via the classpath interceptor.
|
* which will be added to the classpath at compile time via the classpath interceptor.
|
||||||
*/
|
*/
|
||||||
private fun explodeAarFiles(project: Project, resDir: File) : List<File> {
|
private fun explodeAarFiles(project: Project) : List<File> {
|
||||||
log(2, "Exploding aars")
|
log(2, "Exploding aars")
|
||||||
val result = arrayListOf<File>()
|
val result = arrayListOf<File>()
|
||||||
project.compileDependencies.filter {
|
project.compileDependencies.filter {
|
||||||
|
@ -174,9 +173,6 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler,
|
||||||
if (!File(AndroidFiles.explodedManifest(project, mavenId)).exists()) {
|
if (!File(AndroidFiles.explodedManifest(project, mavenId)).exists()) {
|
||||||
log(2, " Exploding ${it.jarFile.get()} to $destDir")
|
log(2, " Exploding ${it.jarFile.get()} to $destDir")
|
||||||
JarUtils.extractJarFile(it.jarFile.get(), destDir)
|
JarUtils.extractJarFile(it.jarFile.get(), destDir)
|
||||||
|
|
||||||
// Copy all the resources from this aar into the same intermediate directory
|
|
||||||
KFiles.copyRecursively(destDir.resolve("res"), resDir)
|
|
||||||
} else {
|
} else {
|
||||||
log(2, " $destDir already exists, not extracting again")
|
log(2, " $destDir already exists, not extracting again")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue