j3k0 edited a comment on issue #547: Compatibility of old plugins with non-Java source-file entries URL: https://github.com/apache/cordova-android/issues/547#issuecomment-439023007 When I see this proposed patch: ```js } else if (obj.src.endsWith('.java')) { return path.join(APP_MAIN_PREFIX, 'java', obj.targetDir.substring(4), path.basename(obj.src)); } else if (obj.src.endsWith('.aidl')) { return path.join(APP_MAIN_PREFIX, 'aidl', obj.targetDir.substring(4), path.basename(obj.src)); } else if (obj.targetDir.includes('libs')) { if (obj.src.endsWith('.so')) { return path.join(APP_MAIN_PREFIX, 'jniLibs', obj.targetDir.substring(5), path.basename(obj.src)); } else { return path.join('app', obj.targetDir, path.basename(obj.src)); } ``` I wonder if the "fileType" part of `path.join` calls shouldn't be an extra attribute of `<source-file>`. It could default to this kind of heuristic, but allow more flexibility. Example: ```xml <source-file src="path/libfoo.so" type="jniLibs" target-dir="..." /> <source-file src="path/IFoo.aidl" type="aidl" target-dir="..." /> <source-file src="path/Foo.bar" type="barFiles" target-dir="..." /> ```
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org