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:28:27 UTC

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

brodybits 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_r233263028
 
 

 ##########
 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 did not see an official link, will remove the comment. I would like to give credit somehow, maybe in a comment in this PR?

----------------------------------------------------------------
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