Fixes build & run related bugs from builder refactor PR #461 (#490)

- General Code Refactor
- Removed builder type argument from getBuilder API
- Removed any reference of conditional statements around builder type
- Remove plugin handler install and uninstall option flag android_studio
- Remove --gradle flag references
- Fixed plugin handler install and uninstall pathing issues
- Added parseBuildOptions export so run can get build related options.
- Use the nobuild flag option to control the run build.
- Updated test spec to reflect the changes.
This commit is contained in:
エリス
2018-09-06 11:06:18 +09:00
committed by GitHub
parent 7ab0cf123d
commit 23b24491c3
13 changed files with 81 additions and 192 deletions
+1 -21
View File
@@ -38,16 +38,7 @@ describe('AndroidProject', () => {
expect(project.projectDir).toBe(PROJECT_DIR);
});
it('should set www folder correctly if not Android Studio project', () => {
AndroidStudioSpy.isAndroidStudioProject.and.returnValue(false);
const project = new AndroidProject(PROJECT_DIR);
expect(project.www).toBe(path.join(PROJECT_DIR, 'assets/www'));
});
it('should set www folder correctly if it is an Android Studio project', () => {
AndroidStudioSpy.isAndroidStudioProject.and.returnValue(true);
const project = new AndroidProject(PROJECT_DIR);
expect(project.www).toBe(path.join(PROJECT_DIR, 'app/src/main/assets/www'));
});
@@ -108,19 +99,8 @@ describe('AndroidProject', () => {
androidProject = new AndroidProject(PROJECT_DIR);
});
it('should get the package name from the project root manifest', () => {
AndroidStudioSpy.isAndroidStudioProject.and.returnValue(false);
it('should get the package name AndroidManifest', () => {
androidProject.getPackageName();
expect(AndroidManifestSpy).toHaveBeenCalledWith(path.join(PROJECT_DIR, 'AndroidManifest.xml'));
});
it('should get the package name from the Android Studio manifest', () => {
AndroidStudioSpy.isAndroidStudioProject.and.returnValue(true);
androidProject.getPackageName();
expect(AndroidManifestSpy).toHaveBeenCalledWith(path.join(PROJECT_DIR, 'app/src/main/AndroidManifest.xml'));
});