From 7392925a8b18f4471c82ec407d7ecace37e576bb Mon Sep 17 00:00:00 2001 From: kezong <379977@qq.com> Date: Fri, 26 Jul 2019 21:55:32 +0800 Subject: [PATCH] fix bug that jni and assets can't embed in windows #37 --- .../src/main/groovy/com/kezong/fataar/VariantProcessor.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/main/groovy/com/kezong/fataar/VariantProcessor.groovy b/source/src/main/groovy/com/kezong/fataar/VariantProcessor.groovy index 4dfaddf7..6d182ce2 100644 --- a/source/src/main/groovy/com/kezong/fataar/VariantProcessor.groovy +++ b/source/src/main/groovy/com/kezong/fataar/VariantProcessor.groovy @@ -275,7 +275,7 @@ class VariantProcessor { assetsTask.doFirst { for (archiveLibrary in mAndroidArchiveLibraries) { - if (archiveLibrary.assetsFolder != null && archiveLibrary.assetsFolder.size() > 0) { + if (archiveLibrary.assetsFolder != null && archiveLibrary.assetsFolder.exists()) { mProject.android.sourceSets.each { if (it.name == mVariant.name) { it.assets.srcDir(archiveLibrary.assetsFolder) @@ -302,7 +302,7 @@ class VariantProcessor { mergeJniLibsTask.doFirst { for (archiveLibrary in mAndroidArchiveLibraries) { - if (archiveLibrary.jniFolder != null && archiveLibrary.jniFolder.size() > 0) { + if (archiveLibrary.jniFolder != null && archiveLibrary.jniFolder.exists()) { mProject.android.sourceSets.each { if (it.name == mVariant.name) { it.jniLibs.srcDir(archiveLibrary.jniFolder)