Commit Graph

184 Commits

Author SHA1 Message Date
Siddarth Kumar 399da799a6
speed up android debug builds (#19335)
fixes #19081

## Summary
This PR aims to improve android build step for debug variants by ensuring we do not rebuild the android derivation for any change made to `clojurescript` code. 

We also do the following things : 
-  enable `JVM` parallel garbage collector.
-  get rid of `dexOptions` which was deprecated in `gradle 8`.
-  add additional `parallel` flag to `gradle` to speed up builds.

## Review notes
- `make run-clojure`
- `make run-android`
- ctrl + C on android terminal and edit any `cljs` file
- `make run-android`  ( should build almost instantly )
2024-03-23 15:12:05 +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 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
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
Anton Iakimov d5c1ecc104
nix: switch status-im config to env vars, cleanup
To help with #15595 changes, refactoring is required.
In this PR we switch from config to env vars.
Doing some cleanup meanwhile.
2023-08-07 14:50:36 +02:00
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
Siddarth Kumar 350303256b
upgrade `react-native` from 0.67.5 to 0.69.10 (#16016) 2023-06-14 07:17:41 +05:30
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
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 41f2c08736
android: use projectDir for VERSION file path
Otherwise Android Studio can't find the relative path because it uses
`/` as it's working directory. Which makes no sense.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-10-21 10:20:28 +02:00
Parvesh Monu 147958dd13
Allow disabling Hermes engine by passing flag while building app (#14041) 2022-09-21 14:56:26 +05:30
Parvesh Monu 236bbff493
Implement react-native-blur for android (#13663) 2022-07-14 17:27:04 +05:30
Jakub Sokołowski acfa73ab43
nix: build unsigned Android APK, sign separately
This has several benefits:

* Less abuse of `extra-sandbox-paths` Nix option
* Less inputs to the Android release build derivation
* Easier for users to sign the build themselves
* Simplification of `scripts/release-android.sh`
* Preparation for building using Nix Flakes

The only two remaining credentials passed via `extra-sandbox-paths` is
the Infura and OpenSea API keys, and there is no way around that other
than passing them via Nix arguments, but that would cause them to end up
in `/nix/store` as part of `.drv` files.

I'm also renaming `release-fdroid` to `build-fdroid` to be consistent.

Depends on: https://github.com/status-im/status-jenkins-lib/pull/42

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-21 11:10:11 +02:00
andrey f39b688e89
google free and metrics free
Signed-off-by: andrey <motor4ik@gmail.com>
2022-05-19 07:22:23 +02: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
Parvesh Monu fd894dc339
fix gradle google free variable (#13064) 2022-01-31 16:12:46 +05:30
Jakub Sokołowski e2c18ea151
add commit hash to app metadata for Android and iOS
This will make identifying installed software easier.
It can also be used to generate F-Droid RPs more easily.

Depends on:
https://github.com/status-im/status-jenkins-lib/pull/35

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-21 11:48:45 +02:00
Michele Balistreri 5246617c69
target SDK 30
support scoped storage from Android 10

better permission handling on iOS 14

Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2021-09-13 10:17:51 +03:00
Jakub Sokołowski aff335b305
gradle: Exclude Google libraries when GOOGLE_FREE=1
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-02 16:29:37 +01:00
Gheorghe Pinzaru 40e2839793
Exclude google deps based on env
Export all vars from .env

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-11-13 11:05:28 +03:00
Jakub Sokołowski 788d0d5cc5
add ANDROID_APK_SIGNED to make unsigned builds for F-Droid
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:38 +02:00
Vitaliy Vlasov ddbf7bc066
Temporarily fix Flipper dev-mode webview crashes
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
2020-05-25 15:09:59 +03:00
Gheorghe Pinzaru 0ff6579fa3
Add animated buttons to Quo
Move haptic

Upgrade redash

Add button component

lint

Add button icon type

Add disabled theme

Add accessibility-label

Fix android color

Fix preview modal

Remove android ripple effect

test android

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-05-20 17:51:38 +03:00
Jakub Sokołowski 3e20616471
disable hermes warnings that dump translations to stdout
These kinds of warnings dump minified translation files to stdout:
```
/build/android/app/build/generated/assets/react/pr/index.android.bundle:943:1256: warning: The first definition was here.
__d(function(e,t,a,n,o,r,s){o.exports={"about-app":"About","about-key-storage-content":"Status will never access your private key. Be sure to backup your seed phrase. If you lose your phone it is the only way to access your keys.","about-key-storage-title":"About key storage","about-names-content":"No one can pretend to be you! You\u2019re anonymous by default and never have to reveal your real name. You can register a custom name for a small fee."
```

Details: https://github.com/facebook/hermes/issues/216

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-18 13:33:39 +02:00
Gheorghe Pinzaru d133f57678
Remove source-map android debug
Update flipper version android

Disable source maps ios

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-05-14 15:43:06 +03:00
Gheorghe Pinzaru 2140a9867b
Upgrade react native to 0.62.2
Xcode updates

Localization

Pods upgrade

Update package.json

Upgrade android

Fix gitignore

Add flipper

Do not enable flipper by default on ios

maven update

Remove outdated hermes

idk what it is, but it's outdated

show warning on build

gradle update

rebase

Update deprecated clipboard

nix

align e2e to rn upgrade

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-05-06 17:35:13 +03:00
yenda d5ef218584
use shadow-cljs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: yenda <eric@status.im>
2020-04-30 15:43:46 +02:00
Jakub Sokołowski 439643daa4
undo removing of preBuild gradle stop
This partially reverts commit 548fe04f54.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-24 20:15:02 +02:00
Jakub Sokołowski 548fe04f54
gradle: remove unused buck configuration
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-24 11:18:36 +02:00
Jakub Sokołowski 5c8a8e83ac
show proper error if nkd-build is missing
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-14 18:31:36 +02:00
Vitaliy Vlasov dd7b3c21ae
Unlink webview
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
2020-03-25 14:34:18 +02:00
Vitaliy Vlasov 85d0022b26
Use community WebView
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
2020-03-24 18:07:03 +02:00
Gheorghe Pinzaru d823a2082a
Update react navigation and rework wrapper
Get rid of navigation wrapper

Use new API to declare navigation

Update tabbar component

Update to use new navigation events

Add ios presentation modal

Navigation cleanups

Android specific updates

Use letsubs for stack subscriptions

Keycard did load event backward compatibility

Fix tabbar and wallet on-focus bad rebase

Do not keep welcome screen into the stack

Comment outdated test

Fix rebase on home PR

Cancel back button on screens which can't be popped

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-03-17 11:52:31 +03:00
Jakub Sokołowski de53581ef4
nix: don't generate keystore inside of Nix build
changes:
- Stops scripts/generate-keystore.sh runnig for every new TARGET=android shell
- Moves running scripts/generate-keystore.sh to keystore Makefile target
- Makes generate-keystore.sh accept STATUS_RELEASE_STORE_FILE as env variable
- Fixes error about missing lsof from start-react-native.sh
- Fixes error about unknown -keystore command in scripts/generate-keystore.sh
- Fixes getting OS_NAME without calling Nix shell
- Fixes getting TMP_BUILD_NUMBER without calling Nix shell
- Adds lsof used in start-react-native.sh to Android release Nix derivation
- Simplified how nix/scripts/build.sh appends the --keep flag
- Made use of colors.sh in more scripts

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-05 10:56:54 +01:00
Jakub Sokołowski cb78293db7
use Android keystore from Jenkins credentials
This way we don't have to store it on individual CI hosts.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-27 06:54:28 +01:00
Jakub Sokołowski 13c7f06317
don't multiply version codes by 1048576, could mess up upgrades
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-12 14:20:00 +01:00
Jakub Sokołowski e8b4ed4ca8
fixes for RN upgrade
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-12-04 17:10:14 +01:00
Roman Volosovskyi 907b35cedd
Migrate to RN 0.61.5
This change allows to fix status bar on iOS in dark mode #9470
2019-12-04 08:52:02 +02:00
Andrey Shovkoplyas acdad6d598
fixes animated gifs on Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: yenda <eric@status.im>
2019-11-01 13:05:03 +01:00
yenda 7bb45fdd8f
remove firebase
Signed-off-by: yenda <eric@status.im>
2019-10-29 15:03:58 +01:00
Jakub Sokołowski 973623f4c8
build multiple APKs for different architectures
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-09-30 13:59:42 +02:00
Pedro Pombeiro 4f7cb549d9
Upgrade from hermesvm@0.1.1 to hermes-engine@0.2.1
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-09-16 17:07:52 +03:00
Pedro Pombeiro cc79cf3b3a
Enable Hermes in Android. Fixes #8952
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-09-12 16:15:11 +02:00
Pedro Pombeiro e4eabd2810
Migrate to use AndroidX 2019-09-12 16:13:43 +02:00
Pedro Pombeiro 9feb31bd3b
Upgrade react-native to 0.60.5
- Use community net-info, react-native-webview instead of deprecated react-native classes
- Remove react-native-tcp
- Upgrade react-native libs (react-native-camera, react-native-firebase, react-native-mail, react-native-udp, react-native-webview-bridge)
- Do not include `:react-native-android` module explicitly
- Take advantage of RN AutoLinking
- nix: Update Gradle dependencies
2019-09-12 16:13:42 +02:00
yenda 5db0a58ab8
remove unused deps and document the others
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-09-12 16:12:46 +02:00
Pedro Pombeiro 0ae1e7c8bd
Fix strip warning on release Android builds 2019-09-10 19:03:13 +02:00
yenda c3dd950286
remove realm
Signed-off-by: yenda <eric@status.im>
2019-09-09 18:40:15 +02:00