Skip to content

Commit

Permalink
fix(android): add missing null check for res folders (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
arazabishov authored May 4, 2020
1 parent 8b5f37f commit 79ebd0f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test-app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ ext.applyTestAppModule = { Project project, String packageName ->
def androidResDir = androidResourceFiles
.find { it.isDirectory() && it.name == "res" }

androidResourceFiles.remove(androidResDir)
if (androidResDir != null) {
androidResourceFiles.remove(androidResDir)
}

def generatedAssetsDir = file("${buildDir}/generated/rncli/src/main/assets/")
generatedAssetsDir.mkdirs()
Expand All @@ -69,8 +71,10 @@ ext.applyTestAppModule = { Project project, String packageName ->
}

task copyResources(type: Copy) {
from androidResDir
into generatedResDir
if (androidResDir != null) {
from androidResDir
into generatedResDir
}
}

preBuild.dependsOn(copyManifest)
Expand Down

0 comments on commit 79ebd0f

Please sign in to comment.