mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-09-03 19:09:32 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5de26e4bd2 | |||
| 5e487dbdfe | |||
| 08852ad83b | |||
| 25bcfbab74 |
@@ -1,5 +1,9 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## v2.19.1
|
||||||
|
|
||||||
|
* Accept all Android SDL Licenses to fix `sdkmanager` installation. - [#172](https://github.com/ReactiveCircus/android-emulator-runner/pull/172) @marcuspridham.
|
||||||
|
|
||||||
## v2.19.0
|
## v2.19.0
|
||||||
|
|
||||||
* Add option to specify `ram-size` for the AVD. - [#165](https://github.com/ReactiveCircus/android-emulator-runner/pull/165).
|
* Add option to specify `ram-size` for the AVD. - [#165](https://github.com/ReactiveCircus/android-emulator-runner/pull/165).
|
||||||
|
|||||||
@@ -200,5 +200,6 @@ These are some of the open-source projects using (or used) **Android Emulator Ru
|
|||||||
- [wikimedia/apps-android-wikipedia](https://github.com/wikimedia/apps-android-wikipedia/blob/master/.github/workflows)
|
- [wikimedia/apps-android-wikipedia](https://github.com/wikimedia/apps-android-wikipedia/blob/master/.github/workflows)
|
||||||
- [google/android-fhir](https://github.com/google/android-fhir/tree/master/.github/workflows)
|
- [google/android-fhir](https://github.com/google/android-fhir/tree/master/.github/workflows)
|
||||||
- [google/accompanist](https://github.com/google/accompanist/blob/main/.github/workflows)
|
- [google/accompanist](https://github.com/google/accompanist/blob/main/.github/workflows)
|
||||||
|
- [dotanuki-labs/norris](https://github.com/dotanuki-labs/norris/blob/master/.github/workflows/main.yml)
|
||||||
|
|
||||||
If you are using **Android Emulator Runner** and want your project included in the list, please feel free to create an issue or open a pull request.
|
If you are using **Android Emulator Runner** and want your project included in the list, please feel free to create an issue or open a pull request.
|
||||||
|
|||||||
+2
-13
@@ -59,16 +59,8 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm
|
|||||||
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_SDK_ROOT}/platform-tools`);
|
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_SDK_ROOT}/platform-tools`);
|
||||||
// set standard AVD path
|
// set standard AVD path
|
||||||
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
|
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
|
||||||
// additional permission and license requirements for Linux
|
// accept all Android SDK licenses
|
||||||
const sdkPreviewLicensePath = `${process.env.ANDROID_SDK_ROOT}/licenses/android-sdk-preview-license`;
|
yield exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);
|
||||||
if (!isOnMac && !fs.existsSync(sdkPreviewLicensePath)) {
|
|
||||||
fs.writeFileSync(sdkPreviewLicensePath, '\n84831b9409646a918e30573bab4c9c91346d8abd');
|
|
||||||
}
|
|
||||||
// license required for API 30 and non-default API 28 system images
|
|
||||||
const sdkArmDbtLicensePath = `${process.env.ANDROID_SDK_ROOT}/licenses/android-sdk-arm-dbt-license`;
|
|
||||||
if (requiresArmDbtLicense(apiLevel, target) && !fs.existsSync(sdkArmDbtLicensePath)) {
|
|
||||||
fs.writeFileSync(sdkArmDbtLicensePath, '\n859f317696f67ef3d7f30a50a5560e7834b43903');
|
|
||||||
}
|
|
||||||
console.log('Installing latest build tools, platform tools, and platform.');
|
console.log('Installing latest build tools, platform tools, and platform.');
|
||||||
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}' > /dev/null"`);
|
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}' > /dev/null"`);
|
||||||
console.log('Installing latest emulator.');
|
console.log('Installing latest emulator.');
|
||||||
@@ -94,6 +86,3 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cm
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.installAndroidSdk = installAndroidSdk;
|
exports.installAndroidSdk = installAndroidSdk;
|
||||||
function requiresArmDbtLicense(apiLevel, target) {
|
|
||||||
return apiLevel === 30 || (apiLevel === 28 && target !== 'default');
|
|
||||||
}
|
|
||||||
|
|||||||
+2
-15
@@ -34,17 +34,8 @@ export async function installAndroidSdk(apiLevel: number, target: string, arch:
|
|||||||
// set standard AVD path
|
// set standard AVD path
|
||||||
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
|
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
|
||||||
|
|
||||||
// additional permission and license requirements for Linux
|
// accept all Android SDK licenses
|
||||||
const sdkPreviewLicensePath = `${process.env.ANDROID_SDK_ROOT}/licenses/android-sdk-preview-license`;
|
await exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);
|
||||||
if (!isOnMac && !fs.existsSync(sdkPreviewLicensePath)) {
|
|
||||||
fs.writeFileSync(sdkPreviewLicensePath, '\n84831b9409646a918e30573bab4c9c91346d8abd');
|
|
||||||
}
|
|
||||||
|
|
||||||
// license required for API 30 and non-default API 28 system images
|
|
||||||
const sdkArmDbtLicensePath = `${process.env.ANDROID_SDK_ROOT}/licenses/android-sdk-arm-dbt-license`;
|
|
||||||
if (requiresArmDbtLicense(apiLevel, target) && !fs.existsSync(sdkArmDbtLicensePath)) {
|
|
||||||
fs.writeFileSync(sdkArmDbtLicensePath, '\n859f317696f67ef3d7f30a50a5560e7834b43903');
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('Installing latest build tools, platform tools, and platform.');
|
console.log('Installing latest build tools, platform tools, and platform.');
|
||||||
|
|
||||||
@@ -73,7 +64,3 @@ export async function installAndroidSdk(apiLevel: number, target: string, arch:
|
|||||||
await exec.exec(`sh -c \\"sdkmanager --install 'cmake;${cmakeVersion}' > /dev/null"`);
|
await exec.exec(`sh -c \\"sdkmanager --install 'cmake;${cmakeVersion}' > /dev/null"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function requiresArmDbtLicense(apiLevel: number, target: string): boolean {
|
|
||||||
return apiLevel === 30 || (apiLevel === 28 && target !== 'default');
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user