Commit Graph

75 Commits

Author SHA1 Message Date
Siddarth Kumar 9db49b8ca0
move rn-mail code to our native modules (#19760)
In this commit we nuke the unmaintained library `react-native-mail` and move over the logic to our native modules.
This also helps to fix `make nix-update-gradle` which would fail because of that library.

- Android
- iOS

status: ready
2024-04-24 11:55:40 +02:00
Siddarth Kumar da25280555
clean up unused libraries (#19456)
## Summary

This PR removes all of the unused `npm` libraries and their corresponding `gradle`/`cocoapods` dependencies.
The list of npm dependencies removed are :
- `@babel/preset-typescript`
- `create-react-class`
- `react-native-haptic-feedback`
- `react-native-image-viewing`
- `react-native-languages`
- `react-native-randombytes`
- `react-syntax-highlighter`
- `rn-emoji-keyboard`
- `tdigest`

This saves us some bytes in the bundle size.

## Platforms
- Android
- iOS
2024-04-02 16:32:54 +05:30
Siddarth Kumar a716f4e435
upgrade `react-native` to 0.73.5 (#18563)
fixes #18291

## Summary
Changes worth mentioning are :
- More hacks/patches
- Force app to use `Java 17` everywhere to compile `kotlin,java`
- `gems` were upgraded after a long time
- `aapt2` was bumped to `8.1.1`
- `metro` is now at `0.80.4`
- `xcbeautify` was bumped to `1.4.0`
- `@react-native-community/clipboard` lib was replaced with `@react-native-clipboard/clipboard`
- `react-native-dialogs` lib was upgraded to `1.1.2`
- `react-native-gesture-handler` lib was upgraded to `2.14.1`
- `react-native-navigation` was upgraded to `7.37.2`

## Platforms
- Android
- iOS
2024-03-22 19:51:44 +05:30
Siddarth Kumar 2c96c38339
chore: disable hermes and cleanup gradle vars (#18832)
fixes #18831

We update the nix derivation to build android by passing `hermesEnabled` flag which checks the environment variable and if the environment variable is not set we default `hermesEnabled` to `true`.
This ensures that `hermes` is disabled for debug builds and enabled for release builds.

In this commit we also
- rename `nix/mobile/android/release.nix` → `nix/mobile/android/build.nix` since that nix file no longer generates release only builds.
- cleanup 2 other env vars and use the `gradle` project format
- replace `BUILD_NUMBER` with `verisonCode` for consistency
- replace `androidGradleOpts ` with `buildUrl ` 
- bump `status-jenkins-lib` to v1.8.7
2024-02-15 13:48:11 +05:30
Siddarth Kumar 59c07050b2
chore: remove hermes enable condition (#18723)
We recently disabled `hermes` for debug builds here -> https://github.com/status-im/status-mobile/pull/18675
A side effect of that is when we run `make nix-update-gradle` the `hermes` pom gets removed from `deps.list`
This pom is necessary for release builds.
Currently that pom exists in `deps.list` but someone may accidentally remove it when running `make nix-update-gradle`

In this commit we remove the conditional implementation of `hermes` or `jsc` in `build.gradle`
This ensures that the `hermes` pom we need during release builds is not removed from `deps.list`.

I also ran `make nix-update-gradle` just to be sure.
I compared the apk in this commit to other PRs and the size increased by 2MB.
A small price to pay so that the team can run Malli locally without crashing their debug app frequently.

I've added a FIXME comment in the code for when we want to cut back on bundle size later.
2024-02-06 16:57:05 +05:30
Lungu Cristian 901818492d
Replace unmaintained biometrics package (#18531)
* feat: added react-native-biometrics dependency

* chore: added malli schema to auth

* fix: malli schema

* feat: using react-native-biometrics

* fix: removed biometry not-enrolled error supression

* feat: added check for enabled biometric

* fix: biometrics error handling on ios

* chore: remove touch-id library

* chore: cleanup

* removed proj.list dep

* fix: gradle get_projects regex edge-case

Handles cases when the gradle project has a description, which shows up when running `gradle projects` as (`react-native-biometrics` - react-native-biometrics), breaking `make nix-update-gradle`. Here we're just adjusting the regex to ignore everything in the line after the closing (`).

* build: ran "make nix-update-gradle"

* chore: comment typo

* chore: replaced old lib in test mocks

* fix: addressed review comments

* fix: using event for standard-auth biometrics

* ref: using ex-cause for biometric error codes

* fix: removed promesa changes

* fix: auth slide biometric success not triggered
2024-01-29 13:33:46 +02:00
Siddarth Kumar 09bf6673cf
chore: upgrade `kotlinPluginVersion` to `1.9.0` (#18487)
### Summary

We need to bump `kotlin` Plugin version to `1.9.0` because the `nixpkgs` upgrade will set default `gradle` version to `8.4`.
`gradle` version `8.4` comes with a base `kotlin` version of `1.9.0` which becomes incompatible with our existing version of `1.7`

Otherwise we get errors like this :

```
e: /Users/siddarthkumar/code/experiments/status-mobile/node_modules/@react-native/
gradle-plugin/src/main/kotlin/com/facebook/react/utils/TaskUtils.kt: (25, 7): Class
'kotlin.collections.CollectionsKt__CollectionsKt' was compiled with an incompatible version of Kotlin.
The binary version of its metadata is 1.9.0, expected version is 1.7.1.
The class is loaded from /nix/store/3a228ppiiljfvsrxyq15h25chmiwsmbh-gradle-8.4/lib/gradle/lib/
kotlin-stdlib-1.9.10.jar!/kotlin/collections/CollectionsKt__CollectionsKt.class
.
.
.
```

needed for https://github.com/status-im/status-mobile/pull/18321

In this commit we set `kotlinPluginVersion` to `1.9.0` and update `gradle` dependencies.

#### Platforms
- Android
2024-01-16 21:18:15 +05:30
Siddarth Kumar 7a4d79179d
chore: add Kotlin support (#18293)
This commit is a pre-requisite to upgrading `react-native` to `0.73.x`, now that react-native has completely moved their android code over from `Java` to `Kotlin` , it is also necessary for us to begin doing the same.

This commit converts just 2 files which are important at the moment.
- `android/app/src/main/java/im/status/ethereum/MainActivity.java`
- `android/app/src/main/java/im/status/ethereum/MainApplication.java`

I will can convert the remaining files in follow ups.
2023-12-28 20:20:25 +05:30
Siddarth Kumar 761a7df06f
upgrade react-native to 0.72.5 (#17241)
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: https://github.com/status-im/status-mobile/issues/18138

IOS only PR : https://github.com/status-im/status-mobile/pull/16721
Android only PR : https://github.com/status-im/status-mobile/pull/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.
2023-12-11 21:22:23 +05:30
Ibrahem Khalil b910f05286
Update `react-native-camera-kit` to latest beta to enable programmitcal zooming (#17708) 2023-10-24 11:48:36 +03:00
Jakub Sokołowski 2df7a7cf6d
nix: do not exclude module files from Gradle deps
This is necessary for the React Native `0.72.5` build to work.
https://github.com/status-im/status-mobile/pull/17241

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-10-19 14:06:39 +02:00
Andrea Maria Piana 155f57ca6b
Dont parse unused identicon 2023-09-06 14:09:37 +01:00
Jakub Sokołowski f433956657
nix: refresh Gradle dependenncies using new setup
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-09-04 09:58:21 +02:00
Jakub Sokołowski 83f622d349
nix: make fetching Gradle dependencies more generic
Before what we did was essentially guess what files might exist for any
given package. This approach mostly works, but not entirely.
This is especially problematic when dealing with weird edge case
packages like `react-native`, which you can read about here:

https://github.com/react-native-community/discussions-and-proposals/pull/508
https://github.com/react-native-community/discussions-and-proposals/blob/4a06fc64/proposals/0508-out-of-npm-artifacts.md#the-react-native-android-archive

In order to avoid as much the guessing aspect of fetching Gradle
dependencies we are using both HTML listsings of files and
`artifact-metadata.json` files that exist for more recent packages.

This way we can avoid having to add special edge cases that have been
found out when working on React Native 72 upgrade in:
https://github.com/status-im/status-mobile/pull/17062

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-09-04 09:57:53 +02:00
Mohamed Javid 162f02ea27
Implement `gradient cover` component (#16778)
This commit implements the "gradient cover" component which is needed for wallet screen development, and upgrades the "react-native-linear-gradient" library to "v2.8.0".

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-07-31 12:49:34 +05:30
Jakub Sokołowski 33b2e12e3b
android: fix Gradle deps, drop Flipper, upgrade Fresco
There are a few fixes here:

* Changes format of Gradle deps to `:buildEnvironment` and `:dependencies`:
    ```
    Cannot locate tasks that match '::buildEnvironment'. The path should not include an empty segment (try ':buildEnvironment' instead).
    ```
* Fix for GNU Parallel tool to use stdin for list of arguments:
    ```
    nix/deps/gradle/generate.sh: line 55: parallel: Argument list too long
    ```
* Update of Facebook Fresco dependencies from `2.2.0` to `2.5.0` to fix:
    ```
     > echo com.facebook.fresco:animated-gif:2.2.0 | ./go-maven-resolver > /dev/null
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:imagepipeline-native:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:memory-type-native:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:imagepipeline:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:drawee:2.2.0 O=false S=runtime >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:memory-type-java:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:fbcore:2.2.0 O=false S=runtime >
    ```
* Remove Flipper to avoid pulling in Fresco `2.2.0` versions:
    ```
    +--- com.facebook.flipper:flipper-fresco-plugin:0.54.0
    |    +--- com.facebook.fresco:fresco:2.2.0 -> 2.5.0
    |    +--- com.facebook.fresco🐬2.2.0
    |    \--- com.facebook.fresco:stetho:2.2.0
    ```

Thanks for help from Sidarth.

Resolves: https://github.com/status-im/status-mobile/issues/16367

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-23 12:02:18 +02:00
Mohamed Javid b397411daa
Upgrade `react-native-camera-kit` library to resolve camera issues in Sign In screen (#16248)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-06-20 18:50:05 +05:30
Jamie Caprani 2cbc94320d
feat: add parallax component (#16277) 2023-06-16 03:09:10 -07:00
Siddarth Kumar 350303256b
upgrade `react-native` from 0.67.5 to 0.69.10 (#16016) 2023-06-14 07:17:41 +05:30
Jakub Sokołowski ac3eb3e660
nix: use SRI hashes for Gradle dependencies
This way we will use the same format as Nix logs and errors when a hash
changes, which avoids confusion.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-10 15:45:32 +02:00
Ajay Sivan 1aff364595
fix: android blur view hash mismatch in some locations 2023-05-09 21:36:12 +02:00
Jakub Sokołowski b7a138118a
nix: update Gradle dependencies
Contains changes that should have been included in:
https://github.com/status-im/status-mobile/pull/15713

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-08 16:22:18 +02:00
Jakub Sokołowski f03e11c877
nix: fix handling POMs without JARs
Otherwise we can get a failure like this:
```
Regenerating Nix files...
Found 40 sub-projects...
Found 609 direct dependencies...
Found 889 dependency URLs...
 ! Failed to fetch: https://repo.maven.apache.org/maven2/org/ow2/asm/asm-bom/9.5/asm-bom-9.5.jar
```
When using `make nix-update-gradle`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-08 15:48:19 +02:00
Siddarth Kumar 3bd4038089
Upgrade `react-native` from 0.63.3 to 0.67.5 (#15486)
* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* make auto-complete prop for text-input compatible

* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* nix: drop unnecessary set -x from status-go build

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* add explicity implementation line for soloader

And add deleteDebugFilesForVariant fix for libhermes.

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* use fast-image for link previews

* fix extra line in message composer on android

This elevation prop is un-necessary and causes an extra line to appear which looks like a border but its actually a shadow.

* don't use `fast-image` for url preview favicon

* fix audio record button interfering cancel android

This fix was not needed in react-native 0.63.4 but is needed after we upgraded to 0.67.5

* get rid of unused platform import

---------
Co-authored-by: Jakub Sokołowski <jakub@status.im>
2023-04-12 15:25:19 +05:30
Jakub Sokołowski d71cfd12c1
nix: unpatched Node modules for Gradle deps update
Otherwise we can end up with Gradle failing to find the dependencies
because we've patched away all entries referencing external repos.

Also made the regex in AWS parser a but more strict.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-21 15:21:58 +01:00
Brian Sztamfater 74da82c61a
feat: implement new splash screen static version
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-03-16 12:57:32 -03:00
Jakub Sokołowski 20a0cc01f6
nix: refactor Gradle deps to be more generic
Refactoring the derivation that fetches all the POMs, JARs,
and AARs in order to make it more generic and easier to extend.
The main change is adding `files` key in `deps.json` which contains
a dict of all the files reletad to given package.

This way we can more easily include other files that might be available
for download, like AARs with ASC suffix, or `nodeps` JARs.

This is also necessary for the React Native upgrade:
https://github.com/status-im/status-mobile/pull/15203

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-04 12:41:29 +01:00
Jakub Sokołowski b72f0d4702
nix: fix Gradle nodeps JAR symlink filename
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-28 17:57:39 +01:00
Jakub Sokołowski 51276237f2
nix: include nodeps JARs in Gradle deps (#15212)
* nix: update gradle dependencies

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* nix: include nodeps JARs in Gradle deps

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* nix: include nodeps JAR for semver4j 0.16.4

Can cause failures like in some cases:
```
A problem occurred configuring project ':react-native-hole-view'.
> Could not resolve all files for configuration ':react-native-hole-view:classpath'.
   > Could not find semver4j-0.16.4-nodeps.jar (com.github.gundy:semver4j:0.16.4).
     Searched in the following locations:
         file:/nix/store/3n2pxsqa2izlx8c23s6jgqai0bqaklm1-status-mobile-maven-deps/com/github/gundy/semver4j/0.16.4/semver4j-0.16.4-nodeps.jar
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>

---------

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-28 17:13:44 +05:30
Michele Balistreri 6a58f9552d
update keycard native module
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2023-02-23 11:11:20 +01:00
Parvesh Monu 612c17a8db
Add blur overlay for bottom tabs and shell top nav (#14783) 2023-01-25 20:08:11 +05:30
Parvesh Monu 05219bd721
Implement react-native-hole-view (#13868) 2022-08-29 21:32:30 +05:30
yqrashawn 98ca311a97
feat: lottie splash screen (#13714)
[#13714] feat: lottie splash screen
2022-08-02 12:48:12 +02:00
Jakub Sokołowski c27a74e378
nix: quote path uses to avoid issues with spaces
This is most important on MacOS, but in general is a good idea.

Resolves:
https://github.com/status-im/status-mobile/issues/13715

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-27 16:11:28 +02:00
Jakub Sokołowski 1f7fd17ff1
rename status-react to status-mobile
This way the name of the repo makes at least some sense and
matches the `status-desktop` repo naming.

Also updated `status-jenkins-lib` since it also contained
references to `status-react` repo and job names.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-17 14:46:16 +02:00
Parvesh Monu 236bbff493
Implement react-native-blur for android (#13663) 2022-07-14 17:27:04 +05:30
Jakub Sokołowski 789b24e3a4
nix: add script for adding missing Gradle packages
This handles the usual case where a missing Gradle version causes the
call to `make nix-update-gradle` to fail since call to Gradle also fails.

This is simpler than getting a dev to run commands manually.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-06-09 13:07:51 +02:00
andrey f39b688e89
google free and metrics free
Signed-off-by: andrey <motor4ik@gmail.com>
2022-05-19 07:22:23 +02:00
Jakub Sokołowski 43f7aaf8b1
nix: limit jobs used by parallel to update Gradle
Otherwise on some devices with with good connecitons rate limiting might
cause failures to fetch POMs or JARs and in result failing the whole update.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-18 11:03:29 +02:00
Jakub Sokołowski 372942ba8a
nix: fortify the nix-update-gradle process
This fixes two issues with the `nix-update-gradle` target:

* It now fails when a JAR is missing which used to be ignored.
* It ignores dependencies that have no JARs, like Eclipse plugins.

This makes the process more robust, since we can see something is
missing right away, and a developer may re-run the process to take
account of possible temporary networking failures or rate limiting.

It also slims down the size of the `deps.json` by removing dependencies
which contribute no actual JARs or AARs to the build process.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-17 20:04:04 +02:00
andrey 09d393dabe
[#13331] Back button changes in chat view when scrolling (iOS)
[#13330] Wallet buttons are overlapped with tabs buttons in the individual wallet account view (iOS)

Signed-off-by: andrey <motor4ik@gmail.com>
2022-05-11 16:22:29 +02:00
Jakub Sokołowski d459f6c318
nix: upgrade Gems, Pods, and Gradle dependencies
This is done to help with debugging dependency issues in:
https://github.com/status-im/status-react/pull/13303

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-04-27 11:57:19 +04:00
andrey a2497c81e7
[#13116] Load audio messages from http server
Signed-off-by: andrey <motor4ik@gmail.com>
2022-03-01 17:07:40 +01:00
Parvesh Monu 36c7d8e4ca
Implementation of remote android notifications (#13028) 2022-02-14 17:27:33 +05:30
Michele Balistreri 52afbf46ee
get images over HTTPS with self-signed certificate
Co-Authored-By: andrey <motor4ik@gmail.com>
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2022-02-10 18:41:10 +01:00
Michele Balistreri 2c38c74c16
* update react-native-webview
* more robust send-to-bridge

Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2022-01-14 13:49:06 +03:00
andrey 437d58f827
use react-native-fast-image for stickers
Signed-off-by: andrey <motor4ik@gmail.com>
2021-11-17 15:44:27 +01:00
Jakub Sokołowski f448f014f6
nix: update gradle dependencies
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-16 11:25:07 +01:00
Jakub Sokołowski 43da5a60fe
nix: make url2json.sh parse POM content for packaging
Otherwise we can download a JAR when an AAR is necessary.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-16 11:12:06 +01:00
Jakub Sokołowski 3f7b985e1a
nix: update gradle dependencies
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-26 15:40:25 +02:00