Mult proto + new app
This commit is contained in:
+13
-13
@@ -125,17 +125,14 @@ $platRoot = Join-Path $SdkRoot 'platforms'
|
||||
if ($Platform) {
|
||||
$AJ = Join-Path $platRoot "$Platform\android.jar"
|
||||
} else {
|
||||
$preferred = Join-Path $platRoot 'android-35\android.jar'
|
||||
if (Test-Path $preferred) {
|
||||
$Platform = 'android-35'; $AJ = $preferred
|
||||
} else {
|
||||
$p = Get-ChildItem $platRoot -Directory -ErrorAction SilentlyContinue |
|
||||
Where-Object { Test-Path (Join-Path $_.FullName 'android.jar') } |
|
||||
Sort-Object { [int]($_.Name -replace '\D', '') } -Descending |
|
||||
Select-Object -First 1
|
||||
if (-not $p) { Die "No android.jar found under $platRoot. Install a platform via the SDK Manager." }
|
||||
$Platform = $p.Name; $AJ = Join-Path $p.FullName 'android.jar'
|
||||
}
|
||||
# Compile against the newest installed platform: targetSdk 36 must be built
|
||||
# against android-36 or aapt rejects the manifest.
|
||||
$p = Get-ChildItem $platRoot -Directory -ErrorAction SilentlyContinue |
|
||||
Where-Object { Test-Path (Join-Path $_.FullName 'android.jar') } |
|
||||
Sort-Object { [int]($_.Name -replace '\D', '') } -Descending |
|
||||
Select-Object -First 1
|
||||
if (-not $p) { Die "No android.jar found under $platRoot. Install a platform via the SDK Manager." }
|
||||
$Platform = $p.Name; $AJ = Join-Path $p.FullName 'android.jar'
|
||||
}
|
||||
if (-not (Test-Path $AJ)) { Die "Android platform jar not found: $AJ" }
|
||||
|
||||
@@ -232,7 +229,7 @@ if ($BuildCore -or -not (Test-Path $so)) {
|
||||
$coreScript = Join-Path $RepoRoot 'build_core.ps1'
|
||||
if (-not (Test-Path $coreScript)) { Die "$why but $coreScript was not found. Pass -RepoRoot." }
|
||||
Step 'Native core (Go)...'
|
||||
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File $coreScript -ClientOnly -AndroidLibDir $libDir
|
||||
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File $coreScript -ClientOnly -AndroidLibRoot (Join-Path $Root 'lib')
|
||||
if ($LASTEXITCODE -ne 0) { Die 'build_core.ps1 failed.' }
|
||||
}
|
||||
if (-not (Test-Path $so)) { Die "Missing $so - build the Go core first." }
|
||||
@@ -257,6 +254,9 @@ Invoke-Tool (Join-Path $BT 'aapt.exe') @(
|
||||
'-S', (Join-Path $Root 'res'),
|
||||
'-A', (Join-Path $Root 'assets'),
|
||||
'-I', $AJ,
|
||||
# From targetSdk 30 Android refuses to install an APK whose resources.arsc
|
||||
# is compressed, so tell aapt to store it instead.
|
||||
'-0', 'arsc',
|
||||
'-F', "$B\resources.ap_"
|
||||
) 'aapt'
|
||||
|
||||
@@ -284,7 +284,7 @@ Invoke-Tool $jar @('cf', "$B\jclasses.jar", '-C', "$B\jclasses", '.') 'jar (java
|
||||
|
||||
Step 'DEX...'
|
||||
Invoke-Tool (Join-Path $BT 'd8.bat') (@(
|
||||
'--lib', $AJ, '--min-api', '29', '--output', "$B\dex",
|
||||
'--lib', $AJ, '--min-api', '24', '--output', "$B\dex",
|
||||
"$B\kclasses.jar", "$B\jclasses.jar", $coro
|
||||
) + $stdlib) 'd8'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user