Commit Graph

116 Commits

Author SHA1 Message Date
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 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 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 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
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 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 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 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
Jakub Sokołowski fedb7131a9
nix: fix maven deps shell
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-06 11:32:37 +02:00
Jakub Sokołowski e6005dd7c8
nix: use yarn2nix from nixpkgs, stop copying modules
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-05 20:00:47 +02:00
Jakub Sokołowski 954e677f0c
nix: use symlinks for maven dependencies derivation
This should reduce the size of the derivation by >50%.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-05 20:00:40 +02:00
Jakub Sokołowski 631339b314
nix: add missing STATUS_GO_ANDROID_LIBDIR env variable
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-05 12:46:06 +02:00
Jakub Sokołowski 42fb40476c
nix: reafactoring of status-go builds
Changes:
- Fixed `nix/status-go/desktop` builds
- Dropped nimbus wrapper for `status-go` for now
- Split `status-go` builds into subfolders: `mobile`, `desktop`
- Fixed shells for desktop builds: `linux`,`macos`,`windows`
- Added `make status-go-*` targets for building them
- Moved source management to `nix/status-go/source.nix`
- Moved `nix/status-go/build.nix` into `nix/status-go/mobile`
- Moved `nix/desktop/cmake/qtkeychain` to `nix/pkgs/qtkeychain-src`
- Moved `nix/desktop/linux/linuxdeployqt` to `nix/pkgs`
- Moved `nix/desktop/linux/appimagekit` to `nix/pkgs`
- Dropped `nix/tools/mkShell.nix` since it did almost nothing
- Dropped `nix/desktop/cmake/snorenotify` since it's broken
- Moved setup from `nix/tools/mkShell.nix` to `nix/shells.nix`
- Simplified `nix/mobile/ios/status-go-shell.nix`
- Simplified `nix/status-go/default.nix`
- Updated the `nix/DETAILS.md` and `nix/README.md`
- Moved known issues to `nix/KNOWN_ISSUES.md`
- Improved output of `nix/scripts/build.sh`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-04 20:55:07 +02:00
Jakub Sokołowski 149b37f75b
upgrade Kotlin: 1.3.11 > 1.3.50
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-03 18:44:15 +02:00
Jakub Sokołowski e5add7b400
nix: re-add maven-inputs2nix.sh script
Was mistakenly removed in: d5ef2185
https://github.com/status-im/status-react/pull/10217

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-01 19:01:29 +02:00
Jakub Sokołowski 7a058594de
fix maven deps shell by ajusting arguments
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-01 12:37:52 +02: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 7b6b620ceb
nix: use overlays instead of packageOverrides
Changes:
- Add `nix/DETAILS.md` for more in-depth info
- Rename some of `config.status-im` variables
- Drop `env` argument for Android build
- Use `overlays` instead of `packageOverrides`
- Move the `pkgs` overlay to `nix/overlay.nix`
- Move `nix/status-go/utils.nix` to `nix/tools`
- Make `shell.nix` use the `shells.default` only
- Use `default.nix` as target for `nix/scripts/shell.sh`
- Make `nix/scripts/shell.sh` use `--attr` instead of `target`
- Drop the `target` argument in favour of using `--attr`
- Drop unnecessary `src` from `nix/mobile/ios/default.nix`
- Move `mkShell` and `mergeSh` under `lib`
- Move `patched-go` package to `nix/pkgs` directory
- Move `gomobile` package to `nix/pkgs` directory
- Move `ANDROID_ABI_SPLIT` to `config.status-im.android.abi-split`
- Move `ANDROID_ABI_INCLUDE to `config.status-im.android.abi-include`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-29 11:53:33 +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 68b9b18cae
nix: refactor android sdk package
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-24 11:18:36 +02:00
Jakub Sokołowski 2a4641684f
fix Gradle plugin by upgrading to 3.5.3
We tried upgrading to 3.6.0 but it made app fail to start:
https://github.com/status-im/status-react/pull/10402

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-23 15:38:03 +02:00
Roman Volosovskyi 9d59d82869
Revert "gradle: upgrade plugin to 3.6.0"
This reverts commit 938f3df843.

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2020-04-22 14:11:05 +02:00
Jakub Sokołowski 938f3df843
gradle: upgrade plugin to 3.6.0
This is to fix incompatibility with new Gradle 5.6.4:
https://developer.android.com/studio/releases/gradle-plugin#updating-gradle

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-21 22:30:10 +02:00
Jakub Sokołowski 5380fcd68f
upgrade Nix packages, and a lot of dependencies
Notable version upgrades:

- Go: 1.13.4 > 1.14.0
- GoMobile: 20190806 > 20200329
- NodeJS: 10.17.0 > 12.0.0
- Yarn: 1.19.1 > 1.22.4
- Gradle: 5.1.1 > 5.6.4
- OpenJDK: 1.8.0-222 > 8u242-b08
- Clojure: 1.10.0.411 > 1.10.1.507

OpenSSL is still stuck on 1.0.2u due to Android SDK.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-20 11:52:44 +02:00
Jakub Sokołowski d68b757589
upgrade Xcode to 11.4.1
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-16 22:13:47 +02:00
Jakub Sokołowski 035e07f7be
upgrade to Xcode 11.4
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-16 12:56:03 +02:00
Jakub Sokołowski ae411a432f
fix Gradle permission errors during build
Specifically:
org.gradle.internal.service.ServiceCreationException: Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
Caused by: org.gradle.api.UncheckedIOException: Failed to create parent directory '/build/project/android/.gradle/5.6.4' when creating directory '/build/project/android/.gradle/5.6.4/fileHashes'

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-16 10:47:17 +02:00
Gheorghe Pinzaru c9e6f0aff7
Add animation to wallet header transition
Add reanimated lib

Wallet header animation

Animate android elevation

Move constants into styles

Ensure line width

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-04-15 17:41:15 +03:00
Jakub Sokołowski 0cc7ec92bd
fix displaying of version and build number in app
Changes:
- Includes `VERSION` file in source for `jsbundle` derivation
- Includes `BUILD_NUMBER` file and it's generation scripts
- Includes minimal `.git` files to make `git rev-parse --short HEAD` work
- Implements `ignoreVCS` for `mkFilter` to be able to include `.git` files
- Adds missing `git` and `bash` to `buildInputs` for `jsbundle` derivation
- Dropped `bash -c` from Clojure code calling `git`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-08 22:55:53 +02:00
Jakub Sokołowski 5ddd605328
fix missing asset images
jsbundle derivation needs to have images available because it stat's
them to verify they exist. They are actually included by Gradle.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-07 09:24:45 +02:00
Jakub Sokołowski f75cb14588
refactor and simplify mkFilter, use more restrictive rules
This should reduce rebuilds of status-react-npm-gradle-modules

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-31 17:03:39 +02:00
Gheorghe Pinzaru a2b2f55996
Use react native screens on ios and android
Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-03-17 19:56:26 +03: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 2f412d95ee
nix: rename adb target to android-env
Makes more sense since it contains entire Android SDK and NDK.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-16 12:11:08 +01:00