-
-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Android SDK to version 35.0.1 and targetSdkVersion to 35 #10081
Conversation
@@ -0,0 +1,93 @@ | |||
name: Package Android SDKs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's annoying to run win/linux just to package SDK for all the platforms.
I added this action we can run manually and prepare SDKs specified in sdk.py
|
||
PLATFORM=android-${ANDROID_PLATFORM} | ||
|
||
HOST=`uname | tr '[:upper:]' '[:lower:]'` | ||
SDKMANAGER="sdkmanager" | ||
D8TOOL="d8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some improvements for the script to be able to build it on windows
@@ -288,7 +288,8 @@ task createBobLightJar(type: Jar, dependsOn: [createExternalLibsLightJar, create | |||
include 'libexec/**/glslang*', | |||
'libexec/**/tint*', | |||
'libexec/**/spirv-opt*', | |||
'libexec/**/luajit*' | |||
'libexec/**/luajit*', | |||
'libexec/**/aapt2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to use aapt2
from build tools
to link apk instead of one from bundletool-all.jar
Otherwise we will get:
RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.
Failed to load resources table in APK ‘android.jar’.
// Make sure it's extracted once | ||
File bundletool = new File(Bob.getLibExecPath("bundletool-all.jar")); | ||
String aapt2 = Bob.getExe(Platform.getHostPlatform(), "aapt2"); | ||
if (aapt2 == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep both ways in case we will be able to remove this extra appt2
again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split into two executables using:
lipo aapt2 -thin x86_64 -output aapt2-x86_64
lipo aapt2 -thin arm64 -output aapt2-arm64
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-20.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better use 22.04 at least because 20.04 end of life at Apr'25.
actions/runner-images#11101
echo "ANDROID_TARGET_API_LEVEL=$ANDROID_TARGET_API_LEVEL" >> $GITHUB_ENV | ||
echo "ANDROID_BUILD_TOOLS_VERSION=$ANDROID_BUILD_TOOLS_VERSION" >> $GITHUB_ENV | ||
|
||
- name: Archive results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth to implement direct upload to S3 instead of github artifacts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah, it's pretty rare action and I don't see it as a problem to upload it myself.
{ | ||
extractFile(bundletool, platformName + "/" + getAapt2Name(), aapt2); | ||
aapt2.setExecutable(true); | ||
File aapt2_file = new File(bundletool.getParent(), getAapt2Name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codestyle] aapt2_file -> aapt2File
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use two different code styles in the same function if you see above.
I just picked one we use for tools
But I'll fix it
{ | ||
platformName = "linux"; | ||
} | ||
Platform hostPlatform = Platform.getHostPlatform(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems it worth to move outside condition body and use it in String aapt2 = Bob.getExe(Platform.getHostPlatform(), "aapt2");
|
||
TOOLHOSTNAME=$HOST | ||
if [ "$HOST" == "darwin" ]; then | ||
TOOLHOSTNAME="mac" | ||
fi | ||
|
||
if [ "$TERM" == "cygwin" ]; then | ||
HOST="win" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong indentation.
if (libc_url != null) { | ||
File f = new File(rootFolder, Platform.getHostPlatform().getPair() + "/lib/" + libc_filename); | ||
Bob.atomicCopy(libc_url, f, false); | ||
String libcFilename = Platform.getHostPlatform().getLibPrefix() + "c++" + Platform.getHostPlatform().getLibSuffix(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just renaming for consistency
Android SDK updated to the latest stable version 35.0.1
Fix #10037