forked from github/cordova-android
Test old plugin aidl & lib mapping - repros GH-547 (PR #550)
(reproduces GH-547)
This commit is contained in:
parent
dea6846918
commit
9537e3468b
@ -78,6 +78,10 @@
|
||||
target-dir="app/libs" />
|
||||
<source-file src="src/android/mysettings.xml" target-dir="res/xml" />
|
||||
<source-file src="src/android/other.extension" target-dir="res/values" />
|
||||
<source-file src="src/android/myapi.aidl" target-dir="src/com/mytest" />
|
||||
<source-file src="src/android/testaar2.aar" target-dir="libs" />
|
||||
<source-file src="src/android/testjar2.jar" target-dir="libs" />
|
||||
<source-file src="src/android/jniLibs/x86/libnative.so" target-dir="libs/x86" />
|
||||
<lib-file src="src/android/TestLib.jar" />
|
||||
</platform>
|
||||
</plugin>
|
||||
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/jniLibs/x86/libnative.so
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/jniLibs/x86/libnative.so
vendored
Normal file
@ -0,0 +1 @@
|
||||
dummy
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/myapi.aidl
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/myapi.aidl
vendored
Normal file
@ -0,0 +1 @@
|
||||
dummy
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/testaar2.aar
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/testaar2.aar
vendored
Normal file
@ -0,0 +1 @@
|
||||
dummy
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/testjar2.jar
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/testjar2.jar
vendored
Normal file
@ -0,0 +1 @@
|
||||
dummy
|
@ -141,6 +141,38 @@ describe('android project handler', function () {
|
||||
'src/android/other.extension', temp,
|
||||
path.join('app/src/main/res/values/other.extension'), false);
|
||||
});
|
||||
|
||||
it('Test#006f : should allow installing aidl file from sources with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[6], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
|
||||
'src/android/myapi.aidl', temp,
|
||||
path.join('app/src/main/src/com/mytest/myapi.aidl'), false);
|
||||
});
|
||||
|
||||
it('Test#006g : should allow installing aar lib file from sources with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[7], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
|
||||
'src/android/testaar2.aar', temp,
|
||||
path.join('app/src/main/libs/testaar2.aar'), false);
|
||||
});
|
||||
|
||||
it('Test#006h : should allow installing jar lib file from sources with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[8], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
|
||||
'src/android/testjar2.jar', temp,
|
||||
path.join('app/src/main/libs/testjar2.jar'), false);
|
||||
});
|
||||
|
||||
it('Test#006i : should allow installing .so lib file from sources with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[9], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
|
||||
'src/android/jniLibs/x86/libnative.so', temp,
|
||||
path.join('app/src/main/libs/x86/libnative.so'), false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('of <framework> elements', function () {
|
||||
@ -326,6 +358,34 @@ describe('android project handler', function () {
|
||||
android['source-file'].uninstall(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/values/other.extension'));
|
||||
});
|
||||
|
||||
it('Test#019f : should remove stuff by calling common.removeFile for Android Studio projects, of aidl with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[6], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
android['source-file'].uninstall(valid_source[6], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/src/com/mytest/myapi.aidl'));
|
||||
});
|
||||
|
||||
it('Test#019g : should remove stuff by calling common.removeFile for Android Studio projects, of aar with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[7], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
android['source-file'].uninstall(valid_source[7], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/libs/testaar2.aar'));
|
||||
});
|
||||
|
||||
it('Test#019h : should remove stuff by calling common.removeFile for Android Studio projects, of jar with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[8], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
android['source-file'].uninstall(valid_source[8], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/libs/testjar2.jar'));
|
||||
});
|
||||
|
||||
it('Test#019i : should remove stuff by calling common.removeFile for Android Studio projects, of .so lib file with old target-dir scheme - reproduces GH-547', function () {
|
||||
// reproduces GH-547
|
||||
android['source-file'].install(valid_source[9], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
android['source-file'].uninstall(valid_source[9], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/libs/x86/libnative.so'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('of <framework> elements', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user