diff --git a/deps.edn b/deps.edn index 3cc53f840a51..aeba3a493f74 100644 --- a/deps.edn +++ b/deps.edn @@ -1,6 +1,6 @@ {:paths ["components/src" "src" "react-native/src/cljsjs" "resources"] - :deps {org.clojure/clojure {:mvn/version "1.9.0"} ;; Keep in sync with version from Nix - org.clojure/clojurescript {:mvn/version "1.10.238"} + :deps {org.clojure/clojure {:mvn/version "1.10.0"} ;; Keep in sync with version from Nix + org.clojure/clojurescript {:mvn/version "1.10.520"} org.clojure/core.async {:mvn/version "0.4.474"} reagent {:mvn/version "0.7.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server cljsjs/create-react-class]} diff --git a/derivation.nix b/derivation.nix index c7580380fab1..bdd80584e8f9 100644 --- a/derivation.nix +++ b/derivation.nix @@ -8,9 +8,11 @@ let # TODO: Try to use stdenv for iOS. The problem is with building iOS as the build is trying to pass parameters to Apple's ld that are meant for GNU's ld (e.g. -dynamiclib) stdenv' = pkgs.stdenvNoCC; gradle = pkgs.gradle_4_10; + go = pkgs.go_1_11; + buildGoPackage = pkgs.buildGoPackage.override { inherit go; }; statusDesktop = pkgs.callPackage ./nix/desktop { inherit target-os status-go pkgs; inherit (pkgs) darwin; stdenv = stdenv'; nodejs = nodejs'; }; statusMobile = pkgs.callPackage ./nix/mobile { inherit target-os config pkgs status-go gradle; inherit (pkgs.xcodeenv) composeXcodeWrapper; stdenv = stdenv'; nodejs = nodejs'; }; - status-go = pkgs.callPackage ./nix/status-go { inherit target-os; inherit (pkgs.xcodeenv) composeXcodeWrapper; inherit (statusMobile) xcodewrapperArgs; androidPkgs = statusMobile.androidComposition; }; + status-go = pkgs.callPackage ./nix/status-go { inherit target-os go buildGoPackage; inherit (pkgs.xcodeenv) composeXcodeWrapper; inherit (statusMobile) xcodewrapperArgs; androidPkgs = statusMobile.androidComposition; }; nodejs' = pkgs.nodejs-10_x; yarn' = pkgs.yarn.override { nodejs = nodejs'; }; nodePkgBuildInputs = [ diff --git a/nix/status-go/default.nix b/nix/status-go/default.nix index 455686ca8758..77340d1e699e 100644 --- a/nix/status-go/default.nix +++ b/nix/status-go/default.nix @@ -7,7 +7,7 @@ with stdenv; let platform = callPackage ../platform.nix { inherit target-os; }; utils = callPackage ../utils.nix { inherit xcodeWrapper; }; - gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit composeXcodeWrapper xcodewrapperArgs utils; }; + gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit buildGoPackage composeXcodeWrapper xcodewrapperArgs utils; }; buildStatusGoDesktopLib = callPackage ./build-desktop-status-go.nix { inherit buildGoPackage go xcodeWrapper utils; }; buildStatusGoMobileLib = callPackage ./build-mobile-status-go.nix { inherit buildGoPackage go gomobile xcodeWrapper utils; }; extractStatusGoConfig = f: lib.last (lib.splitString "\n" (lib.fileContents f)); diff --git a/scripts/build-android.sh b/scripts/build-android.sh deleted file mode 100755 index 16615741f985..000000000000 --- a/scripts/build-android.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -set -euf - -TARGET=${1:-debug} - -CURRENT_DIR="$( cd "$( dirname "$0" )" && pwd )" -. "$CURRENT_DIR/lib/setup/path-support.sh" -source_lib "output.sh" -source_lib "properties.sh" - -cecho "Building @b@green[[${TARGET}]] environment" -echo - -GRADLE_PROPERTIES="--daemon --parallel -q -b android/build.gradle" - -yarn install - -case $TARGET in - debug) - lein do clean, cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleDebug - echo "Generated android/app/build/outputs/apk/debug/app-debug.apk" - exit 1 - ;; - release) - STORE_FILE=$(property_gradle 'STATUS_RELEASE_STORE_FILE') - [[ ! -e "${STORE_FILE/#\~/$HOME}" ]] && echo "Please generate keystore first using ./generate-keystore.sh" && exit 0 - lein do clean, with-profile prod cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleRelease - cecho "Generated @b@blueandroid/app/build/outputs/apk/release/app-release.apk" - echo - exit - ;; - *) - echo "Only debug and release targets are supported" - exit 1 -esac diff --git a/scripts/start-react-native.sh b/scripts/start-react-native.sh index bc25c03ad2a6..f20956871da9 100755 --- a/scripts/start-react-native.sh +++ b/scripts/start-react-native.sh @@ -15,4 +15,8 @@ if [ ! -z "$METRO_PID" ]; then [[ $term == 'y' ]] && kill $METRO_PID fi -react-native start --config packager/config.js +if [ $TARGET_OS == 'ios' ] || [ $TARGET_OS == 'android' ]; then + react-native start --config packager/config.js +else + react-native start +fi