-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android][tools] fix expo go versioning issues on android (expo#22950)
# Why fix expo-go android versioning for sdk 49 close ENG-8955 # How - [tools] fix for react-native monorepo changes - [tools] update manifest-merger because the original one doesn't support java 17. since the new manifest-merger has kotlin runtime and the jar takes about 35MB. rather than committing a prebuilt jar, now we build manifest-merger from source. - [tools] since expo#22609 we don't have `package` in libraries' AndroidManifest.xml, the manifest-merger still requires the `package`, so we have to temporarily put the `package` back during manifest merging. (the `package` name is generated from `namespace` in build.gradle) - [tools] the original jarjar uses outdated [ASM](https://asm.ow2.io/) and it doesn't support bytecode generated by kotlin. react-native now has some kotlin code, and the original jarjar cannot transform package name from those kotlin classes. i've tried to rebuild a jarjar from [this revision](google/jarjar@e11d563). this requires some manual steps like updating ASM libs and install ant builder. so i still commit the prebuilt jarjar in this pr. - [updates] force casting for `UpdateEntity` to deal with kotlin smart casting from versioned to unversioned kernel class. (i'll leave inline comment for this) - [expo-modules-core's `android-annotation`] the project stays in a place that does not support versioning yet. in this pr i just keep it as an unversionable project. cc @lukmccall # Test Plan `et add-sdk -p android -s 49.0.0` + android versioned expo-go + sdk 49 NCL smoke test
- Loading branch information
Showing
39 changed files
with
577 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 | |
|
||
android.useAndroidX=true | ||
android.enableJetifier=true | ||
|
||
# Remove this workaround when upgrading to [email protected] | ||
kotlin.jvm.target.validation.mode=warning |
Binary file modified
BIN
+1.19 KB
(100%)
android/versioned-react-native/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
android/versioned-react-native/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
includeBuild('../../react-native-lab/react-native/packages/react-native-gradle-plugin/') | ||
include ':ReactAndroid' | ||
include ':ReactAndroid:hermes-engine' | ||
project(':ReactAndroid:hermes-engine').projectDir = new File(rootDir, 'ReactAndroid/hermes-engine') | ||
include ':packages:react-native:ReactAndroid' | ||
project(':packages:react-native:ReactAndroid').projectDir = new File(rootDir, 'packages/react-native/ReactAndroid') | ||
include ':packages:react-native:ReactAndroid:hermes-engine' | ||
project(':packages:react-native:ReactAndroid:hermes-engine').projectDir = new File(rootDir, 'packages/react-native/ReactAndroid/hermes-engine') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
9 changes: 9 additions & 0 deletions
9
tools/src/versioning/android/android-manifest-merger/.gitattributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
5 changes: 5 additions & 0 deletions
5
tools/src/versioning/android/android-manifest-merger/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build |
16 changes: 16 additions & 0 deletions
16
tools/src/versioning/android/android-manifest-merger/app/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
application | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("com.android.tools.build:manifest-merger:31.0.2") | ||
} | ||
|
||
application { | ||
mainClass.set("com.android.manifmerger.Merger") | ||
} |
1 change: 1 addition & 0 deletions
1
tools/src/versioning/android/android-manifest-merger/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. |
Binary file added
BIN
+60.2 KB
tools/src/versioning/android/android-manifest-merger/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
...s/src/versioning/android/android-manifest-merger/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.