Add option to specify AVD heap size (#245)

This commit is contained in:
Tim Malseed
2022-04-26 23:36:59 +10:00
committed by GitHub
parent 689ee971a8
commit cc3dd8cbef
6 changed files with 21 additions and 2 deletions
+5
View File
@@ -13,6 +13,7 @@ export async function launchEmulator(
profile: string,
cores: string,
ramSize: string,
heapSize: string,
sdcardPathOrSize: string,
diskSize: string,
avdName: string,
@@ -44,6 +45,10 @@ export async function launchEmulator(
await exec.exec(`sh -c \\"printf 'hw.ramSize=${ramSize}\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`);
}
if (heapSize) {
await exec.exec(`sh -c \\"printf 'hw.heapSize=${heapSize}\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`);
}
if (enableHardwareKeyboard) {
await exec.exec(`sh -c \\"printf 'hw.keyboard=yes\n' >> ${process.env.ANDROID_AVD_HOME}/"${avdName}".avd"/config.ini`);
}
+5
View File
@@ -61,6 +61,10 @@ async function run() {
const ramSize = core.getInput('ram-size');
console.log(`RAM size: ${ramSize}`);
// Heap size to use for AVD
const heapSize = core.getInput('heap-size');
console.log(`Heap size: ${heapSize}`);
// SD card path or size used for creating the AVD
const sdcardPathOrSize = core.getInput('sdcard-path-or-size');
console.log(`SD card path or size: ${sdcardPathOrSize}`);
@@ -162,6 +166,7 @@ async function run() {
profile,
cores,
ramSize,
heapSize,
sdcardPathOrSize,
diskSize,
avdName,