mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-04 00:02:03 +08:00
Rewrite install dir resolution for legacy plugins (#589)
* Improve target-dir restriction for detecting new android project structure used in plugin.xml. (#575) * Clarify old source-file declaration way from the new one and improve ambiguous code. * Better check `src/main` forms. * Replace path search with RegExp vars. * Fix RegExp in order to match `/` or `EOL`. * Remove template strings for NodeJS 4 support (wanted in case we port these changes to `7.1.x` at some point). * Add pointer to deprecation plan in GH-580.
This commit is contained in:
@@ -169,6 +169,12 @@ describe('android project handler', function () {
|
||||
expect(copyFileSpy)
|
||||
.toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/java/com/appco/DummyPlugin2.java'), false);
|
||||
});
|
||||
|
||||
it('Test#006k : should allow installing sources with target-dir that includes "app" in its first directory', function () {
|
||||
android['source-file'].install(valid_source[11], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(copyFileSpy)
|
||||
.toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/java/appco/src/DummyPlugin2.java'), false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('of <framework> elements', function () {
|
||||
|
||||
Reference in New Issue
Block a user