-
Notifications
You must be signed in to change notification settings - Fork 999
Android only upgrade react-native to 0.72.x #17062
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
Conversation
Jenkins BuildsClick to see older builds (99)
|
This failure:
Appears to indicate lack of
And it is in the store:
But if I
Which together with the |
Also, this change(67a4164) appears to be entirely unnecessary: status-mobile/nix/deps/gradle/generate.sh Line 89 in 67a4164
Because the dependency is included even without it:
As far as I can tell the key issue here is the |
@jakubgs maybe this is related : oblador/react-native-keychain#595 (comment) |
Yes, it's most likely that the issue is not in |
7fc685a
to
46f3645
Compare
68139cc
to
ff40abc
Compare
https://repo1.maven.org/maven2/com/facebook/react/react-android/0.72.3/react-android-0.72.3.pom This code need to be ammended: status-mobile/nix/deps/gradle/url2json.sh Lines 117 to 123 in 255a3b9
|
The latest issue with gradel deps:
No binary, only pom file... |
f3429ab
to
1203834
Compare
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.
Good work man. But we need to do something about all those gradle exceptions added.
nix/deps/gradle/url2json.sh
Outdated
[[ "${PKG_NAME}" == react-android-* ]] && fetch_and_template_file "${PKG_NAME}.module" | ||
[[ "${PKG_NAME}" == react-android-* ]] && fetch_and_template_file "${PKG_NAME}-release.aar" | ||
[[ "${PKG_NAME}" == react-android-* ]] && fetch_and_template_file "${PKG_NAME}-debug.aar" | ||
[[ "${PKG_NAME}" == cli-* ]] && fetch_and_template_file "${PKG_NAME}-all.jar" |
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.
That's horrible. I don't agree with this change at all. This needs to be dealt with in a generic way. Adding more special-case exceptions is just bad.
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.
this okay? : ef67791
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.
I added it to test that it helped.
As for packaging style changed, note:
- packaging is pom, but it has aars
- it's not only pom and aar, but also module
I wonder if it's react-native specific, or another way of handling maven packages. Then we could make it even more generic for all new cases, which might appear in the future.
@@ -134,15 +110,8 @@ def jscFlavor = 'org.webkit:android-jsc:+' | |||
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode | |||
* and the benefits of using Hermes will therefore be sharply reduced. | |||
*/ | |||
def enableHermes = project.ext.react.get("enableHermes", false); | |||
def enableHermes = hermesEnabled.toBoolean(); |
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.
What does this do?
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.
sets it to whatever was set in gradle.properties
, in our case false
according to new template : https://github.com/facebook/react-native/blob/0.72-stable/packages/react-native/template/android/gradle.properties#L44
// The version of react-native is set by the React Native Gradle Plugin | ||
implementation("com.facebook.react:react-android") | ||
// implementation 'com.facebook.soloader:soloader:0.10.4+' | ||
// implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") |
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.
If we don't need it lets remove it.
@jakubgs : Thanks for the review! I will clean up this PR 👍🏻 |
# Special rule set for changes introduced by react-native 0.72 | ||
# mapping package name patterns to file types | ||
declare -A RULE_SET | ||
RULE_SET["react-android-*"]="*.module *-release.aar *-debug.aar" | ||
RULE_SET["cli-*"]="*-all.jar" |
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.
I don't think this is a good solution. I think the correct solution is to check if .module
exists, based on this:
The .module file is a Gradle Module Metadata file. It allows to publish two variants for debug and release.
From:
This shows us that if next to a react-android-0.72.3.pom
exists a react-android-0.72.3.module
that would mean that the -release
and -debug
.
But honestly, I'm starting to think it might just be simpler to get a folder listing and fetch most files without any logic attached to it, since it just makes things more complex than they need to be.
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.
One problem though is that dl.google.com
repo does not provide listings of files:
> curl -sv https://dl.google.com/dl/android/maven2/com/google/prefab/cli/2.0.0/ 2>&1 > /dev/null | grep '^<'
< HTTP/2 404
< content-length: 1449
< content-type: text/html; charset=utf-8
< server: downloads
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.
I could't find a way to list things from dl.google.com
. If you know or can find a way to do that we could then simplify url2json.sh
script a lot by simply downloading everything listed(or almost everything).
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.
https://maven.google.com/web/index.html#com.google.prefab:cli:2.0.0
as mentioned by @siddarthkay, has the links to the 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.
A separate system for listing things. That's fucking great. Instead of simplifying it they are complicating it.
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.
@siddarthkay in hindsight I think your original solution was better. The handle_react_native_new_dependencies
doesn't make things simpler, it makes them more obscure.
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.
I found something nice by examining the requests in the dev console:
> curl -s https://dl.google.com/android/maven2/com/google/prefab/cli/2.0.0/artifact-metadata.json | jq
{
"artifacts": [
{
"name": "cli-2.0.0-all.jar",
"tag": "jar"
},
{
"name": "cli-2.0.0.pom",
"tag": "pom"
}
]
}
I think there's hope.
- Easing Import - FadeIn swap for Transition Import - easing - linear - Extrapolate - Interpolate
318d131
to
f90615a
Compare
7cb898e
to
e29825d
Compare
looks stale, feel free to reopen if needed |
This PR does many things : - Upgrade `react-native ` to `0.72.5` - Upgrade `react-native-reanimated` to `3.5.4` - Upgrade `react-native-navigation` to `7.37.0` - `ndkVersion` has been bumped to `25.2.9519653` - `cmakeVersion` has been bumped to `3.22.1` - `kotlinVersion` has been bumped to `1.7.22` - `AGP` has been bumped to `7.4.2` - `Gradle` has been upgraded to `8.0.1` - Android `CompileSDK` and `TargetSDK` have been bumped to 33 - `@react-native-async-storage/async-storage` has been upgraded to `1.19.3` - `@walletconnect/client` has been nuked - some of the old `react-native-reanimated` code has been nuked - `react-native-keychain` fork has been replaced with `8.1.2` - On Android we are currently relying on `Hermes` Engine. - On iOS we are currently relying on JSC - We are not enabling new architecture for now (I have plans for that in the future) ref: #18138 IOS only PR : #16721 Android only PR : #17062 - `make run-metro` now has a target of `android` which was `clojure` earlier, this will increase the time it takes to start metro terminal but this is needed otherwise you will get a nasty error while developing for android locally.
This commit does many things : - Upgrade `react-native ` to `0.72.5` - Upgrade `react-native-reanimated` to `3.5.4` - Upgrade `react-native-navigation` to `7.37.0` - `ndkVersion` has been bumped to `25.2.9519653` - `cmakeVersion` has been bumped to `3.22.1` - `kotlinVersion` has been bumped to `1.7.22` - `AGP` has been bumped to `7.4.2` - `Gradle` has been upgraded to `8.0.1` - Android `CompileSDK` and `TargetSDK` have been bumped to 33 - `@react-native-async-storage/async-storage` has been upgraded to `1.19.3` - `@walletconnect/client` has been nuked - some of the old `react-native-reanimated` code has been nuked - `react-native-keychain` fork has been replaced with `8.1.2` - On Android we are currently relying on `Hermes` Engine. - On iOS we are currently relying on JSC - We are not enabling new architecture for now (I have plans for that in the future) ref: #18138 IOS only PR : #16721 Android only PR : #17062 - `make run-metro` now has a target of `android` which was `clojure` earlier, this will increase the time it takes to start metro terminal but this is needed otherwise you will get a nasty error while developing for android locally.
This commit does many things : - Upgrade `react-native ` to `0.72.5` - Upgrade `react-native-reanimated` to `3.5.4` - Upgrade `react-native-navigation` to `7.37.0` - `ndkVersion` has been bumped to `25.2.9519653` - `cmakeVersion` has been bumped to `3.22.1` - `kotlinVersion` has been bumped to `1.7.22` - `AGP` has been bumped to `7.4.2` - `Gradle` has been upgraded to `8.0.1` - Android `CompileSDK` and `TargetSDK` have been bumped to 33 - `@react-native-async-storage/async-storage` has been upgraded to `1.19.3` - `@walletconnect/client` has been nuked - some of the old `react-native-reanimated` code has been nuked - `react-native-keychain` fork has been replaced with `8.1.2` - On Android we are currently relying on `Hermes` Engine. - On iOS we are currently relying on `JSC` - We are not enabling new architecture for now (I have plans for that in the future) ref: #18138 IOS only PR : #16721 Android only PR : #17062 - `make run-metro` now has a target of `android` which was `clojure` earlier, this will increase the time it takes to start metro terminal but this is needed otherwise you will get a nasty error while developing for android locally.
This PR is just made to test and fix effects of this upgrade on CI.
Note: This PR only contains Android side of the upgrades.
state: WIP