Add androidTargetSdkVersion as an option to update the Android SDK (#298)

* Add androidTargetSdkVersion as an option to update the Android SDK API level

* Fix build script

* Update default value

* Add JAVA_HOME

* Use Unity_path

* Update src/model/android-versioning.test.ts

Co-authored-by: Webber Takken <webber@takken.io>

* Correct JAVA_HOME

* Use unity_path

* Update JAVA_HOME to use path found from 2020.3

* Dynamically determine JAVA_HOME

* Update path determination

Co-authored-by: Webber Takken <webber@takken.io>
This commit is contained in:
David Finol
2021-11-24 06:51:52 -06:00
committed by GitHub
parent 11a0d0947e
commit 239273ca72
12 changed files with 97 additions and 7 deletions

View File

@@ -226,6 +226,19 @@ describe('Input', () => {
});
});
describe('androidTargetSdkVersion', () => {
it('returns the default value', () => {
expect(Input.androidTargetSdkVersion).toStrictEqual('');
});
it('takes input from the users workflow', () => {
const mockValue = 'secret';
const spy = jest.spyOn(core, 'getInput').mockReturnValue(mockValue);
expect(Input.androidTargetSdkVersion).toStrictEqual(mockValue);
expect(spy).toHaveBeenCalledTimes(1);
});
});
describe('allowDirtyBuild', () => {
it('returns the default value', () => {
expect(Input.allowDirtyBuild).toStrictEqual(false);