-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[all packages][Android] Migrate to Android SDK 31
and Java 11
#16941
[all packages][Android] Migrate to Android SDK 31
and Java 11
#16941
Conversation
ENG-2835 Update Android library compileSdkVersion to 31
|
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.
thanks for this update! there's just some nit from duplicated or missing changes.
do you have the detailed warnings from the AGP missing of ndkVersion?
i noticed this change from react-native upstream and it looks like they are using the default ndk version responding to the AGP version. that's why i removed the ndkVersion property from 0.68 upgrade 😅
- Propagate migration to `compileSdkVersion 31` and `targetSdkPackage 31` to every package (`safeExtGet` fallback) - Migrated to `ndkVersion` syntax for specifying Android NDK version in `expo-av` and `expoview` (fixed numerous warnings) - Migrated to Java 11 - Applied the chagnes for every package that required them (including versioned Expoview packages) - Cleanedup the style/syntax in a few packages - Deduplicated gradle code in expoview
ce3ba9e
to
9cdc304
Compare
@Kudo, I was flooded with warning messages about NDK being specified in non canonical and deprecated way and there was a suggestion to migrate towards |
94115e3
to
e16283e
Compare
Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines. I've found some issues in your pull request that should be addressed (click on them for more details) 👇
|
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.
LGTM 👍
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.
LGTM ✅
Just one question:
Are you going to update the java
version on the CI? or setting android.kotlinOptions.jvmTarget
is enough?
IIRC Java on the CI is already bumped by the RN 0.68 upgrade PR |
oh no, one thing i missed. eas.json supports to specify ndk version which may through the |
correct - we use |
@Kudo You can already specify ndk version in eas.json https://docs.expo.dev/build-reference/eas-json/#ndk , If I understand correctly if ANDROID_NDK_HOME is deprecated it will be just ignored, so android build process should use the correct ndk version if it's installed. Note that it would still be user's responsibility to install that NDK, plus it increases the build time. For classic builds, we can just add additional ndk for new SDKs and keep ANDROID_NDK_HOME pointed to sth for compatibility with older sdks |
@wkozyra95 yep, that's why i am pointing this out whether we should deprecate the eas.json ndk support or backport the |
I'm merging it right now and if something would be decided about |
Almost all but one CI failures are unrelate to this PR.
I'll look into it right now 👀 |
# Why fix updates-e2e ci error after #16941 landed. the error job is like this one: https://github.com/expo/expo/runs/5883741338?check_suite_focus=true. the root cause is that updates-e2e uses sdk-44 template which is far away from latest main, e.g. AGP version, `compileSdkVersion` and `targetSdkVersion`. # How use latest expo-template-bare-minimal for expo prebuild # Test Plan updates-e2e ci green Co-authored-by: Brent Vatne <brentvatne@gmail.com>
3.2.0 seems incompatible with our android sdk target see: expo/expo#16941
3.2.0 seems incompatible with our android sdk target see: expo/expo#16941
3.2.0 seems incompatible with our android sdk target see: expo/expo#16941
3.2.0 seems incompatible with our android sdk target see: expo/expo#16941
3.2.0 seems incompatible with our android sdk target see: expo/expo#16941
3.2.0 seems incompatible with our android sdk target see: expo/expo#16941
3.2.0 seems incompatible with our android sdk target see: expo/expo#16941
Why
Continues Android upgrading process started in #16752 (comment)
Resolves ENG-2835
How
compileSdkVersion 31
andtargetSdkPackage 31
to every package (safeExtGet
fallbacks upgrades)ndkVersion
syntax for specifying Android NDK version inexpo-av
andexpoview
(fixed numerous warnings) Reference to AGP docsandroid.compileOptions.sourceCompatibility
,android.compileOptions.targetCompatibility
andandroid.kotlinOptions.jvmTarget
Reference to AGP docsTest Plan
Expo Go (Versioned Flavour)
on physical phonebare-expo
on physical phoneChecklist
expo build
(eg: updated@expo/xdl
).expo prebuild
& EAS Build (eg: updated a module plugin).Side notes
~/.gradle
)