You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2015/03/17 14:56:57 UTC
[1/2] cordova-plugin-file git commit: CB-8689 Fix NPE in
makeEntryForNativeUri (was affecting file-transfer)
Repository: cordova-plugin-file
Updated Branches:
refs/heads/master d57238b5b -> 6e9193418
CB-8689 Fix NPE in makeEntryForNativeUri (was affecting file-transfer)
Regression was introduced in a recent commit and was never released.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/5b1afc28
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/5b1afc28
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/5b1afc28
Branch: refs/heads/master
Commit: 5b1afc28123e8fbe2b09a278ca748914c22b3ca1
Parents: d57238b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Mar 17 09:54:48 2015 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Mar 17 09:54:48 2015 -0400
----------------------------------------------------------------------
src/android/Filesystem.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/5b1afc28/src/android/Filesystem.java
----------------------------------------------------------------------
diff --git a/src/android/Filesystem.java b/src/android/Filesystem.java
index 46786f3..478f6f0 100644
--- a/src/android/Filesystem.java
+++ b/src/android/Filesystem.java
@@ -83,12 +83,12 @@ public abstract class Filesystem {
public JSONObject makeEntryForURL(LocalFilesystemURL inputURL) {
Uri nativeUri = toNativeUri(inputURL);
- return makeEntryForURL(inputURL, nativeUri);
+ return nativeUri == null ? null : makeEntryForURL(inputURL, nativeUri);
}
public JSONObject makeEntryForNativeUri(Uri nativeUri) {
LocalFilesystemURL inputUrl = toLocalUri(nativeUri);
- return makeEntryForURL(inputUrl, nativeUri);
+ return inputUrl == null ? null : makeEntryForURL(inputUrl, nativeUri);
}
public JSONObject getEntryForLocalURL(LocalFilesystemURL inputURL) throws IOException {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[2/2] cordova-plugin-file git commit: Tweak build-extras.gradle to
just read/write to main `assets/` instead of `build/`
Posted by ag...@apache.org.
Tweak build-extras.gradle to just read/write to main `assets/` instead of `build/`
Gave up on trying to figure out how to make it work correctly within
build/
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/6e919341
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/6e919341
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/6e919341
Branch: refs/heads/master
Commit: 6e9193418cfe91b74222bcc1c421ea1f4bba327a
Parents: 5b1afc2
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Mar 17 09:56:15 2015 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Mar 17 09:56:15 2015 -0400
----------------------------------------------------------------------
src/android/build-extras.gradle | 44 ++++++++++++++++--------------------
1 file changed, 20 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/6e919341/src/android/build-extras.gradle
----------------------------------------------------------------------
diff --git a/src/android/build-extras.gradle b/src/android/build-extras.gradle
index cf4ad92..86d91a6 100644
--- a/src/android/build-extras.gradle
+++ b/src/android/build-extras.gradle
@@ -17,34 +17,30 @@
under the License.
*/
ext.postBuildExtras = {
- android.applicationVariants.all { variant ->
- def variantName = variant.name.capitalize()
- def processResourcesTask = tasks["process${variantName}Resources"]
- def inAssetsDir = variant.mergeAssets.rawInputFolders.iterator().next()
- def outAssetsDir = inAssetsDir
- def outFile = new File(outAssetsDir, "cdvasset.manifest")
+ def inAssetsDir = file("assets")
+ def outAssetsDir = inAssetsDir
+ def outFile = new File(outAssetsDir, "cdvasset.manifest")
- def newTask = task("cdvCreateAssetManifest$variantName") << {
- println("Reading from ${inAssetsDir}")
- println("Writing to ${outFile}")
+ def newTask = task("cdvCreateAssetManifest") << {
+ println("Reading from ${inAssetsDir}")
+ println("Writing to ${outFile}")
- def contents = new HashMap()
- contents[""] = inAssetsDir.list()
- def tree = fileTree(dir: inAssetsDir)
- tree.visit { fileDetails ->
- if (fileDetails.isDirectory()) {
- contents[fileDetails.relativePath.toString()] = fileDetails.file.list()
- }
+ def contents = new HashMap()
+ contents[""] = inAssetsDir.list()
+ def tree = fileTree(dir: inAssetsDir)
+ tree.visit { fileDetails ->
+ if (fileDetails.isDirectory()) {
+ contents[fileDetails.relativePath.toString()] = fileDetails.file.list()
}
+ }
- outAssetsDir.mkdirs()
- outFile.withObjectOutputStream { oos ->
- oos.writeObject(contents)
- }
+ outAssetsDir.mkdirs()
+ outFile.withObjectOutputStream { oos ->
+ oos.writeObject(contents)
}
- newTask.dependsOn(tasks["prepare${variantName}Dependencies"])
- newTask.inputs.dir inAssetsDir
- newTask.outputs.file outFile
- processResourcesTask.dependsOn(newTask)
}
+ newTask.inputs.dir inAssetsDir
+ newTask.outputs.file outFile
+ def preBuildTask = tasks["preBuild"]
+ preBuildTask.dependsOn(newTask)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org