mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Resolve issue with plugin target-dir="app*" subdirs (#572)
(subdirectories) such as "appco", with unit tests to verify Needed for @katzer plugins that use de/appplant subdirectory, for example: * cordova-plugin-local-notifications * cordova-plugin-badge * cordova-plugin-background-mode Also needed for cordova-plugin-inappbrowser Co-authored-by: Christopher J. Brody <chris.brody@gmail.com> Co-authored-by: Julio César <jcesarmobile@gmail.com> Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
This commit is contained in:
committed by
Christopher J. Brody
parent
f2d700515d
commit
8586d4a7ba
@@ -169,6 +169,12 @@ describe('android project handler', function () {
|
||||
'src/android/jniLibs/x86/libnative.so', temp,
|
||||
path.join('app/src/main/jniLibs/x86/libnative.so'), false);
|
||||
});
|
||||
|
||||
it('Test#006j : should allow installing sources with target-dir that includes "app"', function () {
|
||||
android['source-file'].install(valid_source[10], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(copyFileSpy)
|
||||
.toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/java/com/appco/DummyPlugin2.java'), false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('of <framework> elements', function () {
|
||||
@@ -378,6 +384,12 @@ describe('android project handler', function () {
|
||||
android['source-file'].uninstall(valid_source[9], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/jniLibs/x86/libnative.so'));
|
||||
});
|
||||
|
||||
it('Test#019j : should remove stuff by calling common.deleteJava for Android Studio projects, with target-dir that includes "app"', function () {
|
||||
android['source-file'].install(valid_source[10], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
android['source-file'].uninstall(valid_source[10], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(deleteJavaSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/java/com/appco/DummyPlugin2.java'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('of <framework> elements', function () {
|
||||
|
||||
Reference in New Issue
Block a user