Commit Graph

321 Commits

Author SHA1 Message Date
Roman Volosovskyi aa72ac5747
[#13016] Pass opensea key from env
Signed-off-by: andrey <motor4ik@gmail.com>
2022-03-21 13:59:35 +01: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
Jakub Sokołowski 89d42b9ef4
nix: fix gomobile builds requiring Android SDK
This works fine on `x86_64`, but will fail when used on `aarch64`.

Issue: https://github.com/status-im/status-react/issues/12794

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-26 16:22:57 +01:00
Jakub Sokołowski d0f76c5412
nix: upgrade nixpkgs to current master
Notable package upgrades:

| Software  | Old          | New           |
|-----------|--------------|---------------|
| Glibc     | `2.32`       | `2.33`        |
| BinUtils  | `2.35.1`     | `2.35.2`      |
| CoreUtils | `8.32`       | `9.0`         |
| OpenSSL   | `1.1.1k`     | `1.1.1l`      |
| Git       | `2.31.1`     | `2.33.1`      |
| GCC       | `8.4.0`      | `8.5.0`       |
| Clojure   | `1.10.3.855` | `1.10.3.1029` |
| Node.js   | `12.22.1`    | `12.22.7`     |
| Yarn      | `1.22.10`    | `1.22.17`     |

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-26 16:22:45 +01: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 179f1d26ae
nix: remove obsolete references to Nimbus sources
This used to be a project to integrate Nimbus with mobile, but it was abandoned.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-15 13:17:30 +01:00
Jakub Sokołowski bdfb7e296b
nix: fix status-go override not passing to Nix build
Incorrect reference to `nimbus.src-override` causes Gradle builds to fail with:
```
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve status-im:status-go:e940434.
```
Due to this `if` clause not triggering:
a573ae70e5/modules/react-native-status/android/build.gradle (L4-L8)

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-15 12:11:11 +01:00
Jakub 9b5cbf8258
nix: avoid nesting of Nix shells, show errors (#12796)
Nesting of Nix shells does not work, since we have no way to safely do
that without starting an infinite loop of nested Nix shells.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-05 12:59:33 +00: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
Jakub Sokołowski edb3ed4ed2
nix: upgrade go-maven-resolver to 1.1.2
Fixes and issue with HTML entity characters in POMs.

https://github.com/status-im/go-maven-resolver/pull/6
https://github.com/status-im/go-maven-resolver/releases/tag/v1.1.2

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-26 15:39:55 +02:00
Jakub Sokołowski 200eb189ea
nix: fix use of androidPkgs in gradle shell
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-26 15:39:54 +02:00
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
Jakub Sokołowski a1ede3528f
nix: drop our gomobile in favor of one from nixpkgs
I've created PRs to include gomobile in official nixpkgs:

* https://github.com/NixOS/nixpkgs/pull/116747
* https://github.com/NixOS/nixpkgs/pull/131042

Hence I'm removing our own implementation to use that one.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-14 11:31:17 +02:00
Jakub Sokołowski 5e9c7da96c
nix: upgrade nixpkgs, clean up android sdk config
Notable upgrades:

| Package        | Previous    | Current     |
|----------------|-------------|-------------|
| `glibc`        | `2.32`      | `2.33`      |
| `git`          | `2.31.1`    | `2.32.0`    |
| `clojure`      | `1.10.3.855`| `1.10.3.943`|
| `nodejs`       | `12.22.1`   | `12.22.6`   |
| `yarn`         | `1.22.10`   | `1.22.11`   |
| Platform Tools | `31.0.2`    | `31.0.3`    |
| Build Tools    | `30.0.3`    | `31.0.0`    |

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-14 10:53:36 +02:00
Jakub Sokołowski 88dc152e73
nix: rafactor android-sdk to provide sdk/ndk outputs
This makes path shorter.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-14 10:52:41 +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 625866e50b
nix: upgrade Go 1.14 to 1.16, gomobile to 2021-02-20
With upgrade to Go above `1.15` and Gomobile we now drop support for darwin/arm32 builds.
This means all devices like iPhone 5 or older.

For more details see:
https://tip.golang.org/doc/go1.15#darwin

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-07-20 11:17:45 +02:00
Jakub Sokołowski ec54de8f63
nix: refactor gomobile to be built with buildGo114Module
This simplifies the package, and also drops the need for `deps.nix` file.
It also slims down the #11986 Go upgrade PR for easier debugging.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-30 18:50:05 +02:00
Jakub Sokołowski 0d403739f9
nix: upgrade go-maven-resolver to 1.1.1, add more repos
I've noticed issues with the https://repository.sonatype.org/ Maven repository we were using.
They appear to have purged their storage of a lot of packages, including our own for example:
https://repository.sonatype.org/content/groups/sonatype-public-grid/com/github/status-im/

For this reason I've release a new version of `go-maven-resolver` that includes two more Maven repos:
- https://plugins.gradle.org/m2
- https://jitpack.io

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-30 18:49:55 +02:00
Jakub Sokołowski 0652d18653
nix: upgrade nixpkgs, keep Go at 1.14.15
Notable software upgrades:

- Go `1.14.13` to `1.14.15`
- Clojure `1.10.1.763` to `1.10.3.855`
- NodeJS `12.20.1` to `12.22.1`
- Git `2.29.2` to `2.31.1`
- CMake `3.10.2` to `3.18.1`
- Curl `7.74.0` to `7.76.1`
- Android NDK `21.3.6528147` to `22.1.7171670`
- Android Platform Tools `30.0.5` to `31.0.2`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-15 17:49:33 +02:00
Jakub Sokołowski f9d697dd2e
nix: upgrade Nix 2.3.6 to 2.3.12
This should also fix issues with MacOS sandboxing:
```
sandbox-exec: execvp() of '/nix/store/...-bash-4.4-p23/bin/bash' failed: Operation not permitted
```
https://github.com/cachix/install-nix-action/issues/15

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-15 17:49:27 +02:00
andrey 5f719ac95b
react native navigation
Signed-off-by: andrey <motor4ik@gmail.com>
2021-06-14 20:03:49 +02:00
Jakub Sokołowski e30ca97184
nix: drop references to nix-cache-cn.status.im
See:
https://github.com/status-im/infra-ci/commit/faaf051b

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-05-25 17:53:47 +02:00
Jakub Sokołowski 6d43f34cf8
nix/deps/gradle: include Gradle targets with numbers in names
This fixes an issue first detected in:
https://github.com/status-im/status-react/pull/12141

Which resulted in dependencies being ignored for `react-native-nagivation`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-05-25 14:33:41 +02:00
Jakub Sokołowski b27a53bdee
nix: fix order of starting iOS shell hooks
Fixes the `'Statusgo.h' file not found` error.

Resolves: https://github.com/status-im/status-react/issues/11951

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-04-09 09:50:13 +02:00
Jakub Sokołowski 4cc99c6bb8
nix: fix name fo config value for unsigned build
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-02 18:26:42 +01:00
andrey 93ed7c15bd
[#11809] Upgrade react-native-device-info to 7.4.0
Also update gradle dependencies with transitive deps.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-02 16:29:20 +01:00
Jakub Sokołowski c57974d9ff
nix: upgrade go-maven-resolver to v1.1.0
This release adds support for resolving transitive dependencies.
https://github.com/status-im/go-maven-resolver/releases/tag/v1.1.0
https://github.com/status-im/go-maven-resolver/pull/5

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-02 16:29:19 +01:00
Jakub Sokołowski 293fd5fae1
nix: add missing cljfmt dependencies to nix/deps/clojure
It seems like this worked before purely because the `cljfmt` library was
already in the `~/.m2` cache folder. This issue was noticed when I
cleaned up the `~/.m2` folder on one Jenkins slave host and the Lint stage
started randomly failing.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: andrey <motor4ik@gmail.com>
2021-03-01 16:42:38 +01:00
Jakub Sokołowski 37cf8ffe72
nix: update clojure dependencies
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: andrey <motor4ik@gmail.com>
2021-03-01 13:23:35 +01:00
andrey 9648f741b4
cleaning 3
Signed-off-by: andrey <motor4ik@gmail.com>
2021-02-17 16:16:54 +01:00
andrey fa4521d2e7
react native config latest version with pods, fixes react-native-config compiling issue by moving it to pods [#11657]
Signed-off-by: andrey <motor4ik@gmail.com>
2021-01-19 17:14:06 +01:00
Jakub Sokołowski b33c086966
nix: set ANDROID_SDK_HOME to a tmp directory
This fixes issues with Gradle complaining about lack of `~/.android`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-01-19 14:08:59 +01:00
andrey abac5247bf
RN 63 and xcode12
Signed-off-by: andrey <motor4ik@gmail.com>
2021-01-14 09:41:38 +01:00
Jakub Sokołowski 939ce8bef5
nix: Upgrade Android SDK, use nixpkgs master
This makes use of the refactoring of Android SDK done in:
https://github.com/NixOS/nixpkgs/pull/89775

Which allows us to drop the use of our own fork of `nixpkgs`.

Android Upgrades:
* Build Tools - `29.0.2` to `30.0.3`
* Platform Tools - `29.0.6` to `30.0.5`
* NDK Bundle - `21.0.6113669` to `21.3.6528147`

Other Upgrades:
* Git - `2.28.0` to `2.29.2`
* Go - `1.14.7` to `1.14.13`
* Clojure - `1.10.1.645` to `1.10.1.763`
* NodeJS - `12.18.3` to `12.20.1`
* Yarn - `1.22.4` to `1.22.10`
* OpenJDK - `8u265-ga` to `8u272-b10`
* PatchElf - `0.11` to `0.12`
* CoreUtils - `8.31` to `8.32`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-01-13 15:35:59 +01:00
Jakub Sokołowski eb1f1bf587
nix: fix building of status-go forks with different GH owner
Resolves: https://github.com/status-im/status-react/issues/11637

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-01-13 15:16:07 +01:00
Gheorghe Pinzaru 6342163152
Add react-native-fast-image for external assets
Use fast image in link previews

Mock fast image in tests

Update nix android deps

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-12-25 15:03:59 +03:00
Jakub Sokołowski c62abf10c1
nix: add docs about NodeJS modules, small refactor
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-12-02 20:47:23 +01:00
Jakub Sokołowski 32efcb06a0
nix: make status-go version regex even more lax
In release `1.7.0` we had an issue with `status-go` version `v0.62.3.hotfix.3`
not matching [Semantic Versionig](https://semver.org/#spec-item-11) so a fix was
introduced in https://github.com/status-im/status-react/pull/11331 that made the regex a bit more lax.

Again in `1.9.0` we had the same issue and the release not appears as `develop`
instead of the actual `status-go` version, which this time was `0.63.8+hotfix.2`.
Notice the `+` instead of `-` or `.` before `hotfix.2`.

I've added `+` to allowed characters after the 3 digit standard version format.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-12-01 20:18:03 +01:00
Jakub Sokołowski f0d9f2ac54
nix: add a way to deal with new gradle version to docs
Also adjusted the `generate.sh` script and split stuff into separate function
to make it easier to run specific stages of the generation process.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-11-27 14:56:42 +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
Michele Balistreri 4384d979e7
update Keycard SDK, remove workaround
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2020-11-09 20:10:58 +01:00
Jakub Sokołowski 973bdb61b3
nix: make status-go matching regex more lax
We had an issue where the `1.7.0` release was using the `v0.62.3.hotfix.3`
version of `status-go` which didn't match the regex we use to verify
if the specified version is a valid version according to [Semantic Versioning](https://semver.org/).

You can check the current regex here: https://regex101.com/r/OeTQCv/3

I also added a trace message to show when we mark a build as `develop`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-26 13:02:50 +01:00
Jakub Sokołowski 466d279e2a
nix: Increase stalled-download-timeout to 1 hour
Might help with issues described in: https://github.com/status-im/infra-ci/issues/17.

Details: https://github.com/NixOS/nixpkgs/issues/65015#issuecomment-662675716

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-22 12:43:01 +02:00
Jakub Sokołowski 81cfc83ed3
nix: add info about NDK bundle download issues
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-19 12:07:00 +02:00
Jakub Sokołowski 908b5f723c
nix: add support for INFURA_TOKEN var for Android build
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-08 17:55:24 +02:00
Jakub Sokołowski c4cac2cef7
fix availability of INFURA_TOKEN for Android build
The env variable `INFURA_TOKEN` is used at build time of JS bundle, not
the final APK file. We never passed the `secretsFile` to the
derivation for JS bundle so it never saw the `INFURA_TOKEN`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-05 16:36:05 +02:00
Gheorghe Pinzaru 00ec94b73c
Bump navigation libs
Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-10-01 10:18:12 +03:00
Jakub Sokołowski eac77f84c2
nix: upgrade nixpkgs
Significant updates:
- Git: `2.25.1` to `2.28.0`
- Make: `4.2.1` to `4.3`
- Glibc: `2.30` to `2.31`
- PatchElf: `0.9` to `0.11`
- GoLang: `1.14.0` to `1.14.7`
- NodeJS: `v12.16.2` to `v12.18.3`
- Clojure: `1.10.1.507` to `1.10.1.645`
- OpenJDK: `8u242-b08` to `8u265-ga`
- GoMobile: `20200329` to `20200622`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-02 18:06:23 +02:00
Gheorghe Pinzaru 793579885a
Add universal QR scanner via common router
Rename events

Add router to handle all links

Use router in add new chat

Unify universal link and universal qr with router

Add icon for universal scanner

Update tests

Now routing is tested in routing PR

lint

Cleanup

QA fixes

Scan own profile

Handle more EIP

Fix wallet scanner

Fix stack for view profile in UL

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-08-11 10:24:15 +03:00
andrey 2d8b0107e3
replace camera library
Signed-off-by: andrey <motor4ik@gmail.com>
2020-08-10 17:54:14 +02:00
Jakub Sokołowski 68722340c9
nix: add missing args to gcroots.sh script
This should fix the following error showing up on MacOS:
```
error: assertion ((__lessThan  0)  ((builtins).stringLength  watchmanSockPath))
failed at /Users/jenkins/repos/status-react/nix/mobile/android/watchman.nix:8:9
```
Which was caused by flags like `--argstr` not being passed.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 15:12:37 +02:00
Jakub Sokołowski f904d7b543
nix: add --console=plain to gradle call
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 14:34:07 +02:00
Jakub Sokołowski 2161192e76
nix: simplify build of gomobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 14:28:15 +02:00
Gheorghe Pinzaru 3c42360b30
Add referral program under feature flag
Add acquisition backend methods

Init referrals sharing UI

Add invite on home screen

Use i18n for strings

Lint

Update status go

Pull acquisition contract to get SNT amount

Use new invite component

f pulling

go

Use screen instead of bottom sheet

Handle android install referrer

Post referrer to backend if present

go go

Add async storage for referral decisions

Update with the stage backend

Update contract methods

Modal

UI

Full handling of advertiser type

UI

test

UI

Handle with universal link

Allow multiple acquisition per installation

Fix android bottom sheet

Do not call service if no click-id received

Disable invite in release

Parse query params for referrer

Adapt UI changes

Add push notification

update deps

Mock react-native-push-notification

Request push notifications permission on press accept

Store transaction to local storage and load it back on login

Separate acquisition into smaller ns

Add chat invite

Get referrer only on first install

fix string

Fix firebase crash

Handle outdate click-id

Cleanup business logic

Update contract

Revert pn

Minor update to advertiser modal copy

OLD -  Welcome to Status! Here is some crypto to get you started
NEW - Here’s some crypto to get you started! Use it to get stickers, an ENS name and try dapps

OLD - By accepting you agree to the starter pack
NEW - By accepting you agree to the referral program

upgrade status-go

Add mainnet

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-08-03 15:25:34 +03:00
Jakub Sokołowski 933c0f8f8c
nix: allow XCode versions 11.5 and higher
This is kinda hacky, but is simple enough since the version check uses grep.

For details see:
https://github.com/status-im/nixpkgs/blob/status-mods/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-31 13:04:47 +02: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
Jakub Sokołowski 517a1be27c
nix: disable Gradle daemon for builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:31 +02:00
Jakub Sokołowski 8bb99743a7
nix: set GRADLE_USER_HOME to a temp dir
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:31 +02:00
Jakub Sokołowski 0be5f5d8d0
nix: enable build-use-sandbox for Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:30 +02:00
tbenr 86700f2b5c
audio messages
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2020-07-29 10:09:31 +02:00
Gheorghe Pinzaru 0f07f3eecb
Update image resizer
Do not resize images in camera roll

request permission on camera roll

fix images e2e

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-07-20 11:54:31 +03:00
Jakub Sokołowski 9ce786c9fb
nix: fix conditional that selects .env.e2e for ABI=x86 builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-15 16:37:45 +02:00
Jakub Sokołowski 84286782f6
bump status-react-jenkins to 1.2.0
This updates a bunch of things in the Jenkins logic.
For details of that see:
https://github.com/status-im/status-react-jenkins/pull/12

It grew out of the changes I made to make PR builds available in Desktop client:
https://github.com/status-im/nim-status-client/pull/507

Changes:
- Bump `status-react-jenkins` library to newer version, probably `1.2.0`
- Update use of `utils.pkgFilename()` in `ci/Jenkinsfile.combined`
- Make all iOS builds go into the same folder: `status-ios`
- Drop e2e build type, infer it from Android ABIs set to `x86` only
- Simplify logic in `nix/mobile/android/release.nix.`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-13 12:13:47 +02:00
Jakub Sokołowski 112132aa94
drop all desktop related files and references
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-08 10:26:51 +02:00
Jakub Sokołowski c943f5f283
nix: upgrade xcode 11.4.1 to 11.5
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-29 10:00:00 +02:00
Jakub Sokołowski de7ce0493b
nix: optimize garbage collection
In order to prevent `nix-store --gc` from removing too much I've:

- Added the `keep-outputs = true` setting to `nix/nix.conf`
- Fixed `nix/scripts/gcroots.sh` to make symlinks in `/nix/var/nix/gcroots`
- Made `nix/scripts/build.sh` and `nix/scripts/shell.sh` use it

This way when running `make nix-gc` most recently used shells and built
derivations won't be removed along with their dependencies.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-22 16:34:27 +02:00
Jakub Sokołowski 2862f4c772
nix: upgrade 2.3.4 > 2.3.6
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-22 16:33:55 +02:00
Jakub Sokołowski 98280dc45b
make go-maven-resolver fail when any resolution fails
Before errors like this:
```
finder.go:91: error: 'no pom data' for: <Dep ID=com.afollestad.material-dialogs:commons:0.9.6.0 O=false S= >
```
Would be printed to `stderr` but exit code would not be non-zero.

Now the whole `make nix-update-gradle` target should fail if any
dependency resolution fails.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-18 12:10:08 +02:00
Jakub Sokołowski dbe3e0a3f9
nix: minor cleanup and documentation updates
Changes:
- Simplified `default.nix` and `shell.nix`
- Moved the default shell to `nix/shell.nix`
- Dropped unnecessary merge from  `nix/shells.nix`
- Fixed `nix/lib/getConfig.nix` to return default on `null`
- Expanded `nix/DETAILS.md` with more info
- Added links to presentations in `nix/README.md`
- Fixed a few typos

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-05 14:49:34 +02:00
Jakub Sokołowski f2c96dcd3b
nix: add config defaults and temp keystore generation
Changes:
* Create `nix/config.nix` with `config` defaults
* Add `nix/tools/gradlePropParser.nix` for reading `gradle.properties`
* Add `nix/mobile/android/keystore.nix` for generating a keystore
* Load keystore generation in `nix/mobile/android/default.nix`
* Use generated keystore if it's not provided via `config`
* Add `-deststoretype pkcs12` in `scripts/generate-keystore.sh`
* Add `nix/lib/assertEnvVarSet.nix` for checking if env var is set

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-04 11:10:48 +02:00
Jakub Sokołowski 12e67ad6d2
nix: improve nix/scripts/node_modules.sh
Changes:
- MOAR functions so it's easier to follow
- Don't use /tmp, put the copied node_modules in repo root first
- Ignore more node_modules sub folders when checking for modifications
  - */unpacked_bin/clj-kondo
  - */scripts/.packager.env

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-02 16:26:19 +02:00
Andrey Shovkoplyas f659cbf242
camera roll 2020-06-01 11:34:13 +02:00
Jakub Sokołowski 2f65cedd2d
nix: replace grep and sed with AWK for parsing Gradle deps
The mess with regexes is hard to read and think about which is why it
had bugs with handling some Gradle formats.

It also lowers further the number of dependencies pulled from 785 to 744.

Changes:
- Added `gradle_parser.awk` script for getting dependencies from Gradle
- Changed the `deps.urls` file to contain full URLs to POMs
- Dropped the `deps.urls.old` part since `get_urls.sh` no longer exists
- Added `CLR` for learing line to `scripts/colors.sh`
- Wrote a new `nix/deps/gradle/README.md`
- Re-generated `nix/pkgs/go-maven-resolver/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-25 19:34:56 +02:00
Jakub Sokołowski d0216674da
nix: use go-maven-resolver to fix nix-update-gradle
This Go package was implemented by me to avoid having to use Mavan or
Gradle to resolve all the dependencies for Nix:
https://github.com/status-im/go-maven-resolver

The Go tool is essentially a slightly smarter and more efficient version
of the `get_urls.sh` script, which was mostly slow due to the `mvn
dependency:list` calls and slow HTTP requests.

This takes down the `make nix-update-gradle` target to under 2 minutes
on my machine.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-24 18:08:05 +02:00
Jakub Sokołowski 883af7b57a
nix: add missing Gradle repo path in gradle shell
Also rename STATUSREACT_NIX_MAVEN_REPO to STATUS_NIX_MAVEN_REPO.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-20 13:59:49 +02:00
Jakub Sokołowski 0bec573eb3
nix: don't use gradle to patch node modules
Before in order to create `deps.nodejs-patched` the `deps.gradle` would
also have to be downloaded in order to patch `build.gradle` files with
path to the Gradle dependencies in Nix store.

It turns out just replacting lines referencing `mavenCentral()`,
`google()`, and `jcenter()` in `repositories` block is enough to make
Gradle properly fetch dependencies from repo provided via the command
line `-Dmaven.repo.local='${deps.gradle}` option.

This should reduce the required size for shells that don't use Gradle.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-20 10:50:29 +02:00
Jakub Sokołowski d494f3b267
nix: enforce xcode only for status-go for ios
According to gomobile docs Xcode is only necessary for iOS:

>For -target ios, gomobile must be run on an OS X machine with Xcode installed.

https://godoc.org/golang.org/x/mobile/cmd/gomobile

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-19 19:58:19 +02:00
Jakub Sokołowski 8a1704a064
nix: fix ios shell to use patched nodejs modules
This was missed in 604362958b

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-19 12:22:22 +02:00
Jakub Sokołowski 604362958b
nix: always use patched node_modules in shells
Becuase `clojure` shell used unpatched `node_modules` while the
`android` shell used the patched version when starting these shells
the `node_modules` would keep being switched between them wasting time.

Changes:
- Move `nix/tools/patchNodeModules.nix` to `nix/deps/nodejs-patched`
- Make `nix/deps/nodejs-patched` a normal derivation without extra arguments
- Use `deps.nodejs-patched` in `nix/mobile/android` shell
- Use `deps.nodejs-patched` in `nix/shells.nix` node shell
- Use `with pkgs` to reduce arguments in `nix/mobile/android/release.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-18 13:54:26 +02:00
Jakub Sokołowski 559a79b3d5
nix: move jetify-ing Java files to patchNodeModules
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 22:44:40 +02:00
Jakub Sokołowski 2f9593a7d2
unify multiple Makefile targets
Changes:
- Drop a bunch of `watch-{android,ios}-*` tagets
- Replace them with one `run-clojure`
- Drop a bunch of `react-native-*` targets
- Replace them with one `run-metro`
- Replace `run-{android,ios}` with `run-{android,ios}`
- Drop `startdev-{android,ios,desktop}*` targets
- Drop `prod-build-{android,ios}` as deprecated
- Drop `src/status_im/android/core.cljs`
- Drop `src/status_im/ios/core.cljs`
- Move `lsof` tool to `default` shell
- Replace them with one `init` `src/status_im/core.cljs`
- Use `init` in one `shadow-cljs.edn` target `mobile`
- Use `mobile` target in `nix/mobile/android/jsbundle`
- Update instructions in `STARTING_GUIDE.md`
- Use `gradle` shell for `android-clean` target

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 18:29:31 +02:00
Jakub Sokołowski 707a9b7095
nix: add status-go shell
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 16:19:34 +02:00
Jakub Sokołowski 64b8b9f170
nix: add support for more build inputs in mergeSh
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 16:19:27 +02:00
Jakub Sokołowski 73a8992db7
nix: refactor loading of node.js modules
Changes:
- Drop `nix/mobile/android/maven-and-npm-deps/default.nix`
- Replace it with much simpler `nix/tools/patchNodeModules`
- Move Gradle patching tool to `nix/pkgs/patch-maven-srcs`
- Simplify it by using `gradle.deps` and patched node modules separately
- Change `TARGET` for `release-android` to `default`
- Move `mobile/reset-node_modules.sh` to `scripts/node_modules.sh`
- Move `nix/mobile/android/targets/release-android.nix` to `nix/mobile/android/release.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 16:19:27 +02:00
Jakub Sokołowski 5607540ac1
nix: data in nix/deps/gradle should be JSON
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 17:24:59 +02:00
Jakub Sokołowski 6746b7d932
nix: data in nix/deps/clojure should be JSON
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 16:02:17 +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
Jakub Sokołowski ed4d0a1ed9
nix: refactor updating Gradle dependencies
changes:
- Moved Gradle deps setup to `nix/deps/gradle`
- Dropped `nix/mobile/android/maven-and-npm-deps/maven`
- Used GNU Parallel to optimize `nix/deps/gradle/generate.sh`
- Move Maven+Node shell setup from `release-android.nix` to Android shell
- Moved AAPT2 patching to `nix/pkgs/aapt2`
- Drop `patchPhase` and `gradlew` use from `release-android.nix`
- Simplify symlinking `{mobile,desktop}/js_files/*`
- Add new `nodejs` shell and merge it with `clojure` and `gradle`
- Re-created Gradle deps files with new scripts:
  - `nix/deps/gradle/proj.list`
  - `nix/deps/gradle/deps.list`
  - `nix/deps/gradle/deps.urls`
  - `nix/deps/gradle/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:30 +02:00
Jakub Sokołowski 45f1d58832
nix: simplify android release build
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:23 +02:00
Jakub Sokołowski df25f09159
nix: move yarn2nix setup to nix/deps/nodejs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:23 +02:00
Jakub Sokołowski 381b2462a4
nix: put clojure deps under pkgs.deps.clojure
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:23 +02:00
Jakub Sokołowski a96b35996f
drop scripts/copy-translations.sh as useless
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:22 +02:00
yenda abfe0869f3
requiring translations inline
Signed-off-by: yenda <eric@status.im>
2020-05-12 16:11:37 +02: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