diff --git a/android/gradle.properties b/android/gradle.properties index c07dbc5c4e..91038e559b 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -22,9 +22,9 @@ # Version requirements used throughout the Gradle scripts minSdkVersion=23 -compileSdkVersion=28 -targetSdkVersion=28 -buildToolsVersion=28.0.3 +compileSdkVersion=29 +targetSdkVersion=29 +buildToolsVersion=29.0.2 supportLibVersion=28.0.0 gradlePluginVersion=3.4.1 diff --git a/ci/android.groovy b/ci/android.groovy index 9f1c64ab5d..2edc5f04c5 100644 --- a/ci/android.groovy +++ b/ci/android.groovy @@ -93,7 +93,7 @@ def renameAPKs() { /* rename each for upload & archiving */ for (apk in found) { def arch = extractArchFromAPK(apk) - def pkg = utils.pkgFilename(btype, 'apk', arch) + def pkg = utils.pkgFilename(env.BUILD_TYPE, 'apk', arch) def newApk = "result/${pkg}" renamed += newApk sh "cp ${apk.path} ${newApk}" @@ -118,7 +118,7 @@ def uploadToSauceLabs() { if (changeId != null) { env.SAUCE_LABS_NAME = "${changeId}.apk" } else { - def pkg = utils.pkgFilename(utils.getBuildType(), 'apk', 'x86') + def pkg = utils.pkgFilename(env.BUILD_TYPE, 'apk', 'x86') env.SAUCE_LABS_NAME = "${pkg}" } withCredentials([ @@ -134,7 +134,8 @@ def uploadToSauceLabs() { keep: [ 'FASTLANE_DISABLE_COLORS', 'APK_PATHS', 'SAUCE_ACCESS_KEY', 'SAUCE_USERNAME', 'SAUCE_LABS_NAME' - ] + ], + pure: false ) } return env.SAUCE_LABS_NAME diff --git a/fastlane/default.nix b/fastlane/default.nix index 2c33cea907..533108e6bb 100644 --- a/fastlane/default.nix +++ b/fastlane/default.nix @@ -40,23 +40,3 @@ let }; in fastlane - -## This nix file cannot currently be used for iOS due to an error in BUILD TARGET ReactNativeConfig OF PROJECT ReactNativeConfig WITH CONFIGURATION Release -## The log shows: -## PhaseScriptExecution Run\ Script /Users/jenkins/Library/Developer/Xcode/DerivedData/StatusIm-gzbepwnrlqbukxbmmpfskimspfch/Build/Intermediates.noindex/ArchiveIntermediates/StatusIm/IntermediateBuildFilesPath/ReactNativeConfig.build/Release-iphoneos/ReactNativeConfig.build/Script-EBE4E8281C7BF689000F8875.sh -## /bin/sh -c /Users/jenkins/Library/Developer/Xcode/DerivedData/StatusIm-gzbepwnrlqbukxbmmpfskimspfch/Build/Intermediates.noindex/ArchiveIntermediates/StatusIm/IntermediateBuildFilesPath/ReactNativeConfig.build/Release-iphoneos/ReactNativeConfig.build/Script-EBE4E8281C7BF689000F8875.sh -## which calls node_modules/react-native-config/ios/ReactNativeConfig/BuildDotenvConfig.ruby. The log further shows: -## Ignoring json-2.2.0 because its extensions are not built. Try: gem pristine json --version 2.2.0 -## Ignoring unf_ext-0.0.7.6 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.6 -## /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:91:in `block in materialize': Could not find unf_ext-0.0.7.6 in any of the sources (Bundler::GemNotFound) -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:85:in `map!' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/spec_set.rb:85:in `materialize' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/definition.rb:170:in `specs' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/definition.rb:237:in `specs_for' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/definition.rb:226:in `requested_specs' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/runtime.rb:108:in `block in definition_method' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/runtime.rb:20:in `setup' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler.rb:107:in `setup' -## from /nix/store/w7rysr83rd8jga24mp3a2m3vx50n4nva-bundler-1.17.2/lib/ruby/gems/2.5.0/gems/bundler-1.17.2/lib/bundler/setup.rb:20:in `' -## from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' -## from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' diff --git a/modules/react-native-status/android/build.gradle b/modules/react-native-status/android/build.gradle index 4d7c2cac8c..fd4dba70ab 100644 --- a/modules/react-native-status/android/build.gradle +++ b/modules/react-native-status/android/build.gradle @@ -2,8 +2,8 @@ apply plugin: 'com.android.library' def getStatusGoSHA1 = { -> def statusgoOverridePath = System.getenv("STATUS_GO_SRC_OVERRIDE") - if (statusgoOverridePath != null) { - printf "build.gradle: Using local version of status-go from ${statusgoOverridePath}" + if (statusgoOverridePath != null && statusgoOverridePath != "") { + logger.info("build.gradle: Using local version of status-go from ${statusgoOverridePath}") return "unknown" // This value is defined in https://github.com/status-im/status-react/blob/develop/nix/status-go/default.nix, in `srcData.shortRev` } diff --git a/nix/bootstrapped-shell.nix b/nix/bootstrapped-shell.nix index 8fca6bfd74..88450dd8b5 100644 --- a/nix/bootstrapped-shell.nix +++ b/nix/bootstrapped-shell.nix @@ -1,5 +1,5 @@ # -# This Nix expression appends/modifies an existing attribute set in order to run scripts/setup if needed, +# This Nix expression appends/modifies an existing attribute set in order to run scripts/setup if needed, # as well as define STATUS_REACT_HOME # diff --git a/nix/derivation.nix b/nix/derivation.nix index 7d26ca4fe9..442874e44f 100644 --- a/nix/derivation.nix +++ b/nix/derivation.nix @@ -17,7 +17,7 @@ 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; maven = pkgs.maven; - baseGo = pkgs.go_1_12; + baseGo = pkgs.go_1_13; go = pkgs.callPackage ./patched-go { inherit baseGo; }; buildGoPackage = pkgs.buildGoPackage.override { inherit go; }; desktop = pkgs.callPackage ./desktop { inherit target-os stdenv status-go pkgs go nodejs; inherit (pkgs) darwin; }; @@ -37,7 +37,9 @@ let # TARGETS leiningen-shell = mkShell { - buildInputs = with pkgs; [ clojure leiningen flock maven nodejs openjdk ]; + buildInputs = with pkgs; [ + clojure leiningen flock maven nodejs openjdk + ] ++ optional isDarwin pkgs.cocoapods; shellHook = if target-os == "android" then mobile.android.shellHook else if target-os == "ios" then mobile.ios.shellHook else ""; @@ -60,9 +62,9 @@ in { shell = { buildInputs = unique ([ + yarn nodejs pkgs.python27 # for e.g. gyp - yarn ] ++ optional isDarwin pkgs.cocoapods ++ optional (isDarwin && !platform.targetIOS) pkgs.clang ++ optional (!isDarwin) pkgs.gcc8 diff --git a/nix/mobile/android/android-env.nix b/nix/mobile/android/android-env.nix index b73afb30c8..f6e4931520 100644 --- a/nix/mobile/android/android-env.nix +++ b/nix/mobile/android/android-env.nix @@ -10,18 +10,18 @@ let androidComposition = androidenv.composeAndroidPackages { toolsVersion = "26.1.1"; - platformToolsVersion = "28.0.2"; - buildToolsVersions = [ "28.0.3" ]; + platformToolsVersion = "29.0.5"; + buildToolsVersions = [ "29.0.2" ]; includeEmulator = false; - platformVersions = [ "28" ]; + platformVersions = [ "29" ]; includeSources = false; includeDocs = false; includeSystemImages = false; systemImageTypes = [ "default" ]; - lldbVersions = [ "2.0.2558144" ]; - cmakeVersions = [ "3.6.4111459" ]; + lldbVersions = [ "3.1.4508709" ]; + cmakeVersions = [ "3.10.2" ]; includeNDK = true; - ndkVersion = "19.2.5345600"; + ndkVersion = "21.0.5935234"; useGoogleAPIs = false; useGoogleTVAddOns = false; includeExtras = [ "extras;android;m2repository" "extras;google;m2repository" ]; @@ -59,4 +59,4 @@ let in { inherit androidComposition licensedAndroidEnv shellHook; -} \ No newline at end of file +} diff --git a/nix/mobile/android/default.nix b/nix/mobile/android/default.nix index ca780f53b7..de14015f76 100644 --- a/nix/mobile/android/default.nix +++ b/nix/mobile/android/default.nix @@ -38,7 +38,6 @@ in { ${concatStrings (catAttrs "shellHook" [ mavenAndNpmDeps androidEnv ])} $STATUS_REACT_HOME/scripts/generate-keystore.sh - $STATUS_REACT_HOME/nix/mobile/reset-node_modules.sh "${mavenAndNpmDeps.deriv}/project" || exit ''; diff --git a/nix/mobile/fastlane/default.nix b/nix/mobile/fastlane/default.nix index 0848d11aaf..6de28f95ec 100644 --- a/nix/mobile/fastlane/default.nix +++ b/nix/mobile/fastlane/default.nix @@ -5,7 +5,6 @@ let inherit (stdenv.lib) optionals optionalString unique; platform = callPackage ../../platform.nix { inherit target-os; }; - useFastlanePkg = platform.targetAndroid && !stdenv.isDarwin; fastlane = callPackage ../../../fastlane { bundlerEnv = _: bundlerEnv { @@ -17,17 +16,17 @@ let bundler ruby ]; # bundler/ruby used for fastlane on macOS - shellHook = optionalString useFastlanePkg fastlane.shellHook; + inherit (fastlane) shellHook; # TARGETS shell = mkShell { - buildInputs = if useFastlanePkg then [ fastlane curl ] else bundlerDeps; + buildInputs = [ fastlane curl ] ++ bundlerDeps; inherit shellHook; }; in { - # We only include bundler in regular shell if targetting iOS, because that's how the CI builds the whole project - buildInputs = unique (optionals (!useFastlanePkg && platform.targetIOS) bundlerDeps); + # We only include bundler in regular shell if targetting iOS, because that's how the CI builds the whole project + buildInputs = unique (optionals platform.targetIOS bundlerDeps); inherit shellHook; # TARGETS diff --git a/nix/nix.conf b/nix/nix.conf index f6820c0307..a4e2f9930c 100644 --- a/nix/nix.conf +++ b/nix/nix.conf @@ -2,3 +2,4 @@ substituters = https://nix-cache.status.im/ https://cache.nixos.org/ trusted-public-keys = nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-cache-cn.status.im:WUiOoTQQurm+rEL/yuAuU/a3TViDtMM9DCMgMx/KkOw= connect-timeout = 10 +max-jobs = auto diff --git a/nix/nixpkgs-bootstrap.nix b/nix/nixpkgs-bootstrap.nix index 10eb94e414..04c89d5142 100644 --- a/nix/nixpkgs-bootstrap.nix +++ b/nix/nixpkgs-bootstrap.nix @@ -6,8 +6,8 @@ let name = "nixpkgs-source"; owner = "status-im"; repo = "nixpkgs"; - rev = "f54e1c6441868450e947f6171b129dfb90a91653"; - sha256 = "13cf3pi277ifg57l11kmjk08vrpv6km2jfxq7sp63zxw5bgkiqpd"; + rev = "d9b2c6b8add87098adb8ee34042e39d15f3658c4"; + sha256 = "19wnp97nlkyd825pjd9vm9rngy3gcil9bwqncwscivsmaz5c7l37"; # To get the compressed Nix sha256, use: # nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz # The last line will be the hash. diff --git a/nix/status-go/build-desktop-status-go.nix b/nix/status-go/build-desktop-status-go.nix index 3029996942..5c4428b198 100644 --- a/nix/status-go/build-desktop-status-go.nix +++ b/nix/status-go/build-desktop-status-go.nix @@ -28,6 +28,8 @@ let in '' pushd "$NIX_BUILD_TOP/go/src/${goPackagePath}" >/dev/null + export GO111MODULE=off + go build -o $out/${outputFileName} \ ${goBuildFlags} \ -buildmode=c-archive \ diff --git a/nix/status-go/build-mobile-status-go.nix b/nix/status-go/build-mobile-status-go.nix index c7009fa551..9e03c32f4b 100644 --- a/nix/status-go/build-mobile-status-go.nix +++ b/nix/status-go/build-mobile-status-go.nix @@ -31,10 +31,11 @@ let in with targetConfig; '' mkdir ${NIX_GOWORKDIR} - GOPATH=${gomobile.dev}:$GOPATH \ - PATH=${makeBinPath [ gomobile.bin ]}:$PATH \ - NIX_GOWORKDIR=${NIX_GOWORKDIR} \ - ${concatStringsSep " " envVars} \ + export GO111MODULE=off + export GOPATH=${gomobile.dev}:$GOPATH + export PATH=${makeBinPath [ gomobile.bin ]}:$PATH + export NIX_GOWORKDIR=${NIX_GOWORKDIR} + export ${concatStringsSep " " envVars} gomobile bind \ -target=${name} \ -ldflags='${CGO_LDFLAGS}' \ diff --git a/nix/status-go/build-status-go.nix b/nix/status-go/build-status-go.nix index 51a76dd1f3..66d74fc1e0 100644 --- a/nix/status-go/build-status-go.nix +++ b/nix/status-go/build-status-go.nix @@ -21,7 +21,7 @@ let pname = repo; version = "${version}-${strings.substring 0 7 rev}-${host}"; - nativeBuildInputs = + nativeBuildInputs = nativeBuildInputs ++ lib.optional isDarwin xcodeWrapper; @@ -53,11 +53,9 @@ let ''; # replace hardcoded paths to go package in /nix/store, otherwise Nix will fail the build - preFixup = '' - ${preFixup} - + preFixup = preFixup + '' find $out -type f -exec ${removeExpr removeReferences} '{}' + || true - return + return # make sure we stop fixup so as to not allow the host preFixup script to proceed ''; passthru = { inherit owner version rev; }; diff --git a/shell.nix b/shell.nix index d4874c37bf..d2b7c6f418 100644 --- a/shell.nix +++ b/shell.nix @@ -17,24 +17,15 @@ let stdenv = pkgs.stdenvNoCC; # those should always be present in a shell coreInputs = with pkgs; [ - # utilities - bash - curl - file - flock - git - gnumake - jq - wget + bash curl file flock git gnumake jq wget ]; in mkShell { name = "status-react-shell"; # none means we shouldn't include project specific deps - buildInputs = if target-os == "none" then - coreInputs - else - with pkgs; [ + buildInputs = + coreInputs ++ + stdenv.lib.optionals (target-os != "none") (with pkgs; [ unzip ncurses lsof # used in scripts/start-react-native.sh @@ -43,12 +34,6 @@ in mkShell { leiningen maven watchman - ] ++ coreInputs; - - inputsFrom = if target-os == "none" then - [] - else - [ project.shell ]; - - shellHook = project.shell.shellHook; + ]); + inputsFrom = stdenv.lib.optional (target-os != "none") project.shell; } diff --git a/status-go-version.json b/status-go-version.json index d3b569d8f9..9652291837 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -2,7 +2,7 @@ "_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh ' instead", "owner": "status-im", "repo": "status-go", - "version": "v0.34.0-beta.8", - "commit-sha1": "9d7c570593b1f88e9688204d8e1041d57b98da1f", - "src-sha256": "1kwxf0h80vdj493c7s3lpmdjpbc72plbll0rj1vv7kzf8a84ff2k" + "version": "v0.35.0", + "commit-sha1": "2dd74da23d9fcca116e02a2a35d964172c98ffdf", + "src-sha256": "16zb6a5svh7hqm77jnsf5dyrl173mvddd6rxhmvcs6prblg4j7f8" }