(sdkVariant, abiVariant, versionCode, platforms)
| 633 | } |
| 634 | |
| 635 | async function canUploadApk (sdkVariant, abiVariant, versionCode, platforms) { |
| 636 | const type = sdkVariant !== 'latest' ? abiVariant + ucfirst(sdkVariant) : abiVariant; |
| 637 | for (let i = 0; i < platforms.length; i++) { |
| 638 | const platform = platforms[i]; |
| 639 | const isDefault = platform === 'googlePlay'; |
| 640 | const max = type === 'universal' ? await getObject('apk', isDefault ? 'max' : platform + '-max') : null; |
| 641 | const id = isDefault ? type : platform + '-' + type; |
| 642 | const cur = await getObject('apk', id); |
| 643 | const maxVersion = Math.max(cur ? cur.versionCode : 0, type === 'universal' && platform === 'googlePlay' && max ? max.versionCode : 0); |
| 644 | if (versionCode <= maxVersion) { |
| 645 | return false; |
| 646 | } |
| 647 | } |
| 648 | return true; |
| 649 | } |
| 650 | |
| 651 | async function traceDuration (type, name, startTime, endTime, isComplete) { |
| 652 | if (typeof endTime !== 'number') |
no test coverage detected