Spaces:
Runtime error
Runtime error
File size: 772 Bytes
97fa170 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | const { exec } = require("child_process");
const processApk = (jobId, data, updateCallback) => {
updateCallback({ status: "processing", progress: "10%" });
const buildCommand = `flutter build apk --release --obfuscate --split-debug-info=./debug/${jobId}`;
updateCallback({ status: "compiling", progress: "50%" });
setTimeout(() => {
const success = true;
if (success) {
updateCallback({
status: "completed",
progress: "100%",
downloadUrl: `https://api.fprojects.id/download/${jobId}.apk`,
securityLevel: "high",
obfuscated: true
});
} else {
updateCallback({
status: "failed",
error: "compilation error"
});
}
}, 10000);
};
module.exports = {
processApk
}; |