mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 01:53:00 +08:00
unit test source-file with custom lib target-dir
for JAR and AAR (GH-540) Co-Authored-By: Kyle Kirbatski <kkirbatski@gmrmarketing.com> Co-Authored-By: Christopher J. Brody <chris.brody@gmail.com> Co-Authored-By: @afdev82 (Antonio Facciolo)
This commit is contained in:
parent
c2f6631f91
commit
3caefcae49
@ -72,6 +72,10 @@
|
|||||||
target-dir="src/com/phonegap/plugins/dummyplugin" />
|
target-dir="src/com/phonegap/plugins/dummyplugin" />
|
||||||
<source-file src="src/android/DummyPlugin2.java"
|
<source-file src="src/android/DummyPlugin2.java"
|
||||||
target-dir="app/src/main/src/com/phonegap/plugins/dummyplugin" />
|
target-dir="app/src/main/src/com/phonegap/plugins/dummyplugin" />
|
||||||
|
<source-file src="src/android/TestLib.jar"
|
||||||
|
target-dir="app/libs" />
|
||||||
|
<source-file src="src/android/TestAar.aar"
|
||||||
|
target-dir="app/libs" />
|
||||||
<lib-file src="src/android/TestLib.jar" />
|
<lib-file src="src/android/TestLib.jar" />
|
||||||
</platform>
|
</platform>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/TestAar.aar
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/TestAar.aar
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
./org.test.plugins.dummyplugin/src/android/TestAar.aar
|
@ -108,6 +108,19 @@ describe('android project handler', function () {
|
|||||||
expect(copyFileSpy)
|
expect(copyFileSpy)
|
||||||
.toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/src/com/phonegap/plugins/dummyplugin/DummyPlugin2.java'), false);
|
.toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/src/com/phonegap/plugins/dummyplugin/DummyPlugin2.java'), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: renumber these tests and other tests below
|
||||||
|
it('Test#007a : should allow installing lib file from sources using proper path', function () {
|
||||||
|
android['source-file'].install(valid_source[2], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||||
|
expect(copyFileSpy)
|
||||||
|
.toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp, path.join('app/libs/TestLib.jar'), false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Test#007b : should allow installing aar file from sources using proper path', function () {
|
||||||
|
android['source-file'].install(valid_source[3], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||||
|
expect(copyFileSpy)
|
||||||
|
.toHaveBeenCalledWith(dummyplugin, 'src/android/TestAar.aar', temp, path.join('app/libs/TestAar.aar'), false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('of <framework> elements', function () {
|
describe('of <framework> elements', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user