breautek commented on code in PR #472:
URL:
https://github.com/apache/cordova-plugin-file/pull/472#discussion_r1252261632
##########
src/android/build-extras.gradle:
##########
@@ -19,25 +19,27 @@
ext.postBuildExtras = {
def inAssetsDir = file("assets")
def outAssetsDir = inAssetsDir
+ outAssetsDir.mkdirs()
def outFile = new File(outAssetsDir, "cdvasset.manifest")
- def newTask = task("cdvCreateAssetManifest") << {
- def contents = new HashMap()
- def sizes = new HashMap()
- contents[""] = inAssetsDir.list()
- def tree = fileTree(dir: inAssetsDir)
- tree.visit { fileDetails ->
- if (fileDetails.isDirectory()) {
- contents[fileDetails.relativePath.toString()] =
fileDetails.file.list()
- } else {
- sizes[fileDetails.relativePath.toString()] =
fileDetails.file.length()
+ def newTask = task("cdvCreateAssetManifest") {
+ doLast {
+ def contents = new HashMap()
+ def sizes = new HashMap()
+ contents["test"] = inAssetsDir.list()
Review Comment:
Been 2 years since I created this PR so I don't remember the rationale, but
this doesn't seem correct... especialyl since its being changed from
`contents[""] = ...`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]