You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/11/13 23:21:36 UTC

[GitHub] jcesarmobile commented on a change in pull request #550: Fix for old plugins with non-Java sources (GH-547)

jcesarmobile commented on a change in pull request #550: Fix for old plugins with non-Java sources (GH-547)
URL: https://github.com/apache/cordova-android/pull/550#discussion_r233261415
 
 

 ##########
 File path: bin/templates/cordova/lib/pluginHandlers.js
 ##########
 @@ -293,20 +293,28 @@ function generateAttributeError (attribute, element, id) {
 }
 
 function getInstallDestination (obj) {
-    return studioPathRemap(obj) ||
-        path.join(obj.targetDir, path.basename(obj.src));
-}
-
-function studioPathRemap (obj) {
-    // If any source file is using the app new directory structure,
-    // don't penalize it
-    if (!obj.targetDir.includes('app')) {
-        if (obj.src.endsWith('.java')) {
-            return path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src));
+    if (obj.targetDir.includes('app')) {
+        // If any source file is using the new app directory structure,
+        // don't penalize it
+        return path.join(obj.targetDir, path.basename(obj.src));
+    } else if (obj.src.endsWith('.java')) {
+        return path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src));
+    } else if (obj.src.endsWith('.aidl')) {
+        return path.join('app/src/main/aidl', obj.targetDir.substring(4), path.basename(obj.src));
+    } else if (obj.targetDir.includes('libs')) {
+        if (obj.src.endsWith('.so')) {
+            // THANKS FOR GUIDANCE:
 
 Review comment:
   I would prefer some official link about how to handle .so files than a thanks comment. If we don't have some official link, then just remove the comments as the code is pretty complex and this comments don't add value.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org