mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
unit test source-file with custom lib target-dir (PR #542)
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
4d151d3057
commit
f8584c63e6
@ -72,6 +72,10 @@
|
||||
target-dir="src/com/phonegap/plugins/dummyplugin" />
|
||||
<source-file src="src/android/DummyPlugin2.java"
|
||||
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" />
|
||||
</platform>
|
||||
</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
|
@ -114,6 +114,19 @@ describe('android project handler', function () {
|
||||
expect(copyFileSpy)
|
||||
.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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user