You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "breautek (via GitHub)" <gi...@apache.org> on 2023/07/04 17:50:38 UTC
[GitHub] [cordova-plugin-file] breautek commented on a diff in pull request #472: WIP: fix(android): Fix deprecated left shift usage (support was removed in Gradle 5)
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: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org