diff --git a/android/gradle.properties b/android/gradle.properties index 0be4dc61b0..b48218288e 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -25,7 +25,7 @@ kotlinVersion=1.3.50 minSdkVersion=23 compileSdkVersion=29 targetSdkVersion=29 -buildToolsVersion=29.0.2 +buildToolsVersion=30.0.3 supportLibVersion=28.0.0 # This should match version from nix/mobile/android/maven-and-npm-deps/maven/default.nix gradlePluginVersion=3.5.3 diff --git a/nix/deps/gradle/deps.json b/nix/deps/gradle/deps.json index 5df0de8157..7c3340497c 100644 --- a/nix/deps/gradle/deps.json +++ b/nix/deps/gradle/deps.json @@ -6195,6 +6195,20 @@ } }, + { + "path": "com/squareup/okio/okio/3.0.0-alpha.1/okio-3.0.0-alpha.1", + "host": "https://repo.maven.apache.org/maven2", + "type": "jar", + "pom": { + "sha1": "ede5499134cc85b31b26bb11fd92f37956ffdd03", + "sha256": "1sb0pjwdj8lkq3k7fjwyxhsr22vbv8kzkp82dc4w6mmyxg8nlc91" + }, + "jar": { + "sha1": "8eb3bf1d692377b986f15c80de567d3440aba6ff", + "sha256": "0i3xf2scrzvszmfzxdsbspxqni2dr8yizdws4islxwyn9i9vfn0x" + } + }, + { "path": "com/sun/activation/all/1.2.0/all-1.2.0", "host": "https://repo.maven.apache.org/maven2", @@ -6424,16 +6438,16 @@ }, { - "path": "com/tunnelvisionlabs/antlr4-annotations/4.7.4/antlr4-annotations-4.7.4", + "path": "com/tunnelvisionlabs/antlr4-annotations/4.9.0/antlr4-annotations-4.9.0", "host": "https://repo.maven.apache.org/maven2", "type": "jar", "pom": { - "sha1": "899946ae1e442ce96717ba29324bb1e1cfabbd75", - "sha256": "08v9xp1jnfbiwxmi9yzngfd8c1hd8k3jwxlw145blvmsaa277hjf" + "sha1": "a14e662f4a9928d9242c9bc9fbbe512bb561121e", + "sha256": "0kdimdpbyw06jzzfqirib0zinl7bf3vi2xjid0aqlid866vln4gx" }, "jar": { - "sha1": "ef4fd3e3b21391e450cb770646a63342b7a3731b", - "sha256": "115m5xmn23n41pi0chxa6sqn4crc3b35daw2df8yvs6gkdmrhj6r" + "sha1": "ef4a4a6528a74cc24b6f7f0f1711876e32ab54b7", + "sha256": "0y6bicws9kmihq0zhjz8cqv4fcgjbbzbya3jnw3b92qpqga57l07" } }, @@ -6448,12 +6462,12 @@ }, { - "path": "com/tunnelvisionlabs/antlr4-master/4.7.4/antlr4-master-4.7.4", + "path": "com/tunnelvisionlabs/antlr4-master/4.9.0/antlr4-master-4.9.0", "host": "https://repo.maven.apache.org/maven2", "type": "pom", "pom": { - "sha1": "c43e8aaf8dfcdb32214659b0eafe3c637ca027f6", - "sha256": "1jgg3fjvi4gjjax3y5m3cwkx1ls3pyfgv2hsiwawji4x686v7ni2" + "sha1": "97a80ecc34d75a66b47753108406a0a1ef00a192", + "sha256": "108c4hbihlwvc8i18xznn72kr49xh8ibnl162rqiv7q5bgixcq1w" } }, @@ -6472,16 +6486,16 @@ }, { - "path": "com/tunnelvisionlabs/antlr4-runtime/4.7.4/antlr4-runtime-4.7.4", + "path": "com/tunnelvisionlabs/antlr4-runtime/4.9.0/antlr4-runtime-4.9.0", "host": "https://repo.maven.apache.org/maven2", "type": "jar", "pom": { - "sha1": "cf99a72f48caad2a9a738ba9d510ab169f8d60e5", - "sha256": "0s4ix238162i7z8zy84k5pl1cdb33sydvcnsdd68lw480d33i9vm" + "sha1": "97e6da6d8bc827b5d9f6590fbfa8565511a8da5e", + "sha256": "07vgcbrfplqg50zsn206ri39bzlpfv0arbdab77np24zp57svddf" }, "jar": { - "sha1": "ef96595a5467782f16a8cc638d73007325e92cca", - "sha256": "1vh2hhgp0xl1gazna2wbyxww5jjhim2yl153x56npampncg6wqf0" + "sha1": "17e19535a875a2a1014197d2bb35faeecf4e50f4", + "sha256": "1azzydlxx622galppy4rz5kxg5shia5k3nsvj0hgkvac0fl3n6g4" } }, @@ -7798,16 +7812,16 @@ }, { - "path": "org/checkerframework/checker-qual/3.8.0/checker-qual-3.8.0", + "path": "org/checkerframework/checker-qual/3.9.0/checker-qual-3.9.0", "host": "https://repo.maven.apache.org/maven2", "type": "jar", "pom": { - "sha1": "3436c1d07252b6eefe053d8ef380ab251813f359", - "sha256": "19rr49hgfsz3m2km7fjgn6ch25ylls9p2rm39zqb20dwsgi5jvby" + "sha1": "94ab20b57c0499eff800599a1f01255951fe053d", + "sha256": "0f21dv7qphlw2n0zc9x8gc6xcdnr8yijpsk6g1lc9ywxmnf27dj9" }, "jar": { - "sha1": "6b83e4a33220272c3a08991498ba9dc09519f190", - "sha256": "19nx8kxbrapy71w4gqknsglrx2ny8902cygqzhk9zsysbxm2x368" + "sha1": "1ec919767a94db1572d2f2077b693a4275fa711a", + "sha256": "1rrsp84mrybzm2a7i01xlfrd4vqpab0nbnwhlphbjzxpqdg44j1i" } }, @@ -8731,6 +8745,20 @@ } }, + { + "path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.4.20/kotlin-stdlib-common-1.4.20", + "host": "https://repo.maven.apache.org/maven2", + "type": "jar", + "pom": { + "sha1": "ae20e1aa54cb2713d1c43f227c8c290a136be427", + "sha256": "0agl1xsrlw5mqaa35h4n17m6nf2978qqjhh2r7149m2ppbmhcmvw" + }, + "jar": { + "sha1": "c6761d7805b5312302f2bbd78cda68c976ce0c70", + "sha256": "0843xkdkdjv05zar21h3dqgbv4prg8pkgjf9hs143vpg7jdjq4d7" + } + }, + { "path": "org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71", "host": "https://repo.maven.apache.org/maven2", @@ -8983,6 +9011,20 @@ } }, + { + "path": "org/jetbrains/kotlin/kotlin-stdlib/1.4.20/kotlin-stdlib-1.4.20", + "host": "https://repo.maven.apache.org/maven2", + "type": "jar", + "pom": { + "sha1": "4009b36445a3299714e6401489b04f467ad77f90", + "sha256": "0ji3pjccr662xcv32pahw47jwx164vdwxjff8cm5i3c2j8gyz19r" + }, + "jar": { + "sha1": "9be77b243a362b745e365f286627b8724337009c", + "sha256": "0mp6lczsxgrbqm0mfak470al7ga21br2h7qysj2b1768rnjivaxq" + } + }, + { "path": "org/jetbrains/kotlin/kotlin-util-io/1.3.50/kotlin-util-io-1.3.50", "host": "https://repo.maven.apache.org/maven2", diff --git a/nix/deps/gradle/deps.urls b/nix/deps/gradle/deps.urls index da5c30f113..c4356df43f 100644 --- a/nix/deps/gradle/deps.urls +++ b/nix/deps/gradle/deps.urls @@ -448,6 +448,7 @@ https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.1/parent-3 https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.15.0/okio-parent-1.15.0.pom https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.9.0/okio-2.9.0.pom +https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.0.0-alpha.1/okio-3.0.0-alpha.1.pom https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.0/all-1.2.0.pom https://repo.maven.apache.org/maven2/com/sun/activation/all/2.0.0/all-2.0.0.pom https://repo.maven.apache.org/maven2/com/sun/activation/jakarta.activation/2.0.0/jakarta.activation-2.0.0.pom @@ -468,11 +469,11 @@ https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/2.0.0/F https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/1.2.13/fastinfoset-project-1.2.13.pom https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/2.0.0/fastinfoset-project-2.0.0.pom https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-annotations/4.5/antlr4-annotations-4.5.pom -https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-annotations/4.7.4/antlr4-annotations-4.7.4.pom +https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-annotations/4.9.0/antlr4-annotations-4.9.0.pom https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-master/4.5/antlr4-master-4.5.pom -https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-master/4.7.4/antlr4-master-4.7.4.pom +https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-master/4.9.0/antlr4-master-4.9.0.pom https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-runtime/4.5/antlr4-runtime-4.5.pom -https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-runtime/4.7.4/antlr4-runtime-4.7.4.pom +https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-runtime/4.9.0/antlr4-runtime-4.9.0.pom https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4/4.5/antlr4-4.5.pom https://repo.maven.apache.org/maven2/de/undercouch/gradle-download-task/3.4.3/gradle-download-task-3.4.3.pom https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom @@ -581,7 +582,7 @@ https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.48/bcprov https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.60/bcprov-jdk15on-1.60.pom https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.pom -https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.8.0/checker-qual-3.8.0.pom +https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.9.0/checker-qual-3.9.0.pom https://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.pom https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.pom @@ -652,6 +653,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1 https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.31/kotlin-stdlib-common-1.3.31.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.4.10/kotlin-stdlib-common-1.4.10.pom +https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.4.20/kotlin-stdlib-common-1.4.20.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.20/kotlin-stdlib-jdk7-1.3.20.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.21/kotlin-stdlib-jdk7-1.3.21.pom @@ -670,6 +672,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.21/k https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.31/kotlin-stdlib-1.3.31.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.50/kotlin-stdlib-1.3.50.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.10/kotlin-stdlib-1.4.10.pom +https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.20/kotlin-stdlib-1.4.20.pom https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.3.50/kotlin-util-io-1.3.50.pom https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-api/5.5.2/junit-jupiter-api-5.5.2.pom https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-commons/1.5.2/junit-platform-commons-1.5.2.pom diff --git a/nix/overlay.nix b/nix/overlay.nix index 6293534b9c..abea519aca 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -43,7 +43,7 @@ in { # Android environement androidEnvCustom = callPackage ./pkgs/android-sdk { }; - androidPkgs = self.androidEnvCustom.licensedPkgs; + androidPkgs = self.androidEnvCustom.pkgs; androidShell = self.androidEnvCustom.shell; # Custom packages diff --git a/nix/pkgs.nix b/nix/pkgs.nix index 63f3425113..b7c9163eda 100644 --- a/nix/pkgs.nix +++ b/nix/pkgs.nix @@ -8,13 +8,13 @@ let # For testing local version of nixpkgs #nixpkgsSrc = (import { }).lib.cleanSource "/home/jakubgs/work/nixpkgs"; - # Our own nixpkgs fork with custom fixes + # We follow the master branch of official nixpkgs. nixpkgsSrc = fetchFromGitHub { name = "nixpkgs-source"; - owner = "status-im"; + owner = "NixOS"; repo = "nixpkgs"; - rev = "3355743cfd8d89cfa8d3b8e6d40c48e62e72d36a"; - sha256 = "1l7559m3xkzwkm202rkjq3a8cz52k7z9vxn9y2adc30cp197wc82"; + rev = "51894963cbdc41f0cd8f571b7bcf79437d940355"; + sha256 = "13nfghpnhnr5hbbibsrq172g1rdibd8lycis7ncvf9yxd4rdlf7b"; # To get the compressed Nix sha256, use: # nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz }; diff --git a/nix/pkgs/android-sdk/compose.nix b/nix/pkgs/android-sdk/compose.nix new file mode 100644 index 0000000000..8207bd0b61 --- /dev/null +++ b/nix/pkgs/android-sdk/compose.nix @@ -0,0 +1,29 @@ +# +# This Nix expression centralizes the configuration +# for the Android development environment. +# + +{ stdenv, config, callPackage, androidenv, openjdk, mkShell }: + +androidenv.composeAndroidPackages { + toolsVersion = "26.1.1"; + platformToolsVersion = "30.0.5"; + buildToolsVersions = [ "30.0.3" ]; + includeEmulator = false; + includeSources = false; + platformVersions = [ "29" ]; + includeSystemImages = false; + systemImageTypes = [ "default" ]; + cmakeVersions = [ "3.10.2" ]; + includeNDK = true; + ndkVersion = "21.3.6528147"; + useGoogleAPIs = false; + useGoogleTVAddOns = false; + includeExtras = [ + "extras;android;m2repository" + "extras;google;m2repository" + ]; + # The "android-sdk-license" license is accepted + # by setting android_sdk.accept_license = true. + extraLicenses = []; +} diff --git a/nix/pkgs/android-sdk/default.nix b/nix/pkgs/android-sdk/default.nix index a20ef64293..7c7233d658 100644 --- a/nix/pkgs/android-sdk/default.nix +++ b/nix/pkgs/android-sdk/default.nix @@ -3,12 +3,12 @@ # for the Android development environment. # -{ callPackage }: +{ callPackage, stdenv, writeScript }: let - pkgs = callPackage ./pkgs.nix { }; - shell = callPackage ./shell.nix { }; - licensedPkgs = callPackage ./licensed.nix { }; + compose = callPackage ./compose.nix { }; + pkgs = callPackage ./pkgs.nix { inherit compose; }; + shell = callPackage ./shell.nix { androidPkgs = pkgs; }; in { - inherit pkgs licensedPkgs shell; + inherit compose pkgs shell; } diff --git a/nix/pkgs/android-sdk/licensed.nix b/nix/pkgs/android-sdk/licensed.nix deleted file mode 100644 index 0c01f8da58..0000000000 --- a/nix/pkgs/android-sdk/licensed.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, stdenv, callPackage }: - -let - androidPkgs = callPackage ./pkgs.nix { }; -in - # Licensed Android Environment as a separate derivation - stdenv.mkDerivation rec { - name = "licensed-android-sdk"; - version = "licensed"; - phases = [ "installPhase" "licensePhase" ]; - installPhase = '' - mkdir -p $out/libexec/android-sdk - ln -s "${androidPkgs.androidsdk}/bin" $out/bin - for d in ${androidPkgs.androidsdk}/libexec/android-sdk/*; do - ln -s $d $out/$(basename $d) - done - ''; - licensePhase = stdenv.lib.optionalString config.android_sdk.accept_license '' - mkdir -p $out/licenses - echo -e "\n601085b94cd77f0b54ff86406957099ebe79c4d6" > "$out/licenses/android-googletv-license" - echo -e "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$out/licenses/android-sdk-license" - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$out/licenses/android-sdk-preview-license" - echo -e "\nd975f751698a77b662f1254ddbeed3901e976f5a" > "$out/licenses/intel-android-extra-license" - echo -e "\n33b6a2b64607f11b759f320ef9dff4ae5c47d97a" > "$out/licenses/google-gdk-license" - ''; - } diff --git a/nix/pkgs/android-sdk/pkgs.nix b/nix/pkgs/android-sdk/pkgs.nix index d51a4ffcc4..78dfdd7ce5 100644 --- a/nix/pkgs/android-sdk/pkgs.nix +++ b/nix/pkgs/android-sdk/pkgs.nix @@ -1,28 +1,17 @@ -# -# This Nix expression centralizes the configuration -# for the Android development environment. -# +{ stdenv, compose }: -{ stdenv, config, callPackage, androidenv, openjdk, mkShell }: - -androidenv.composeAndroidPackages { - toolsVersion = "26.1.1"; - platformToolsVersion = "29.0.6"; - buildToolsVersions = [ "29.0.2" ]; - includeEmulator = false; - platformVersions = [ "29" ]; - includeSources = false; - includeDocs = false; - includeSystemImages = false; - systemImageTypes = [ "default" ]; - lldbVersions = [ "3.1.4508709" ]; - cmakeVersions = [ "3.10.2" ]; - includeNDK = true; - ndkVersion = "21.0.6113669"; - useGoogleAPIs = false; - useGoogleTVAddOns = false; - includeExtras = [ - "extras;android;m2repository" - "extras;google;m2repository" - ]; +# +# This derivation simply symlinks some stuff to get +# shorter paths as libexec/android-sdk is quite the mouthful. +# +stdenv.mkDerivation { + name = "${compose.androidsdk.name}-mod"; + phases = [ "symlinkPhase" ]; + symlinkPhase = '' + mkdir -p $out + ln -s "${compose.androidsdk}/bin" $out/bin + for d in ${compose.androidsdk}/libexec/android-sdk/*; do + ln -s $d $out/$(basename $d) + done + ''; } diff --git a/nix/pkgs/android-sdk/shell.nix b/nix/pkgs/android-sdk/shell.nix index 76129a2867..b204623a78 100644 --- a/nix/pkgs/android-sdk/shell.nix +++ b/nix/pkgs/android-sdk/shell.nix @@ -1,21 +1,19 @@ -{ mkShell, callPackage, openjdk }: +{ mkShell, openjdk, androidPkgs }: -let - licensedPkgs = callPackage ./licensed.nix { }; -in - mkShell { - shellHook = '' - export JAVA_HOME="${openjdk}" +mkShell { + name = "android-env-shell"; + shellHook = '' + export JAVA_HOME="${openjdk}" - export ANDROID_HOME="${licensedPkgs}" - export ANDROID_SDK_ROOT="${licensedPkgs}" - export ANDROID_NDK_ROOT="${licensedPkgs}/ndk-bundle" + export ANDROID_HOME="${androidPkgs}" + export ANDROID_SDK_ROOT="${androidPkgs}" + export ANDROID_NDK_ROOT="${androidPkgs}/ndk-bundle" - export PATH="$ANDROID_HOME/bin:$PATH" - export PATH="$ANDROID_NDK_ROOT:$PATH" - export PATH="$ANDROID_SDK_ROOT/tools:$PATH" - export PATH="$ANDROID_SDK_ROOT/tools/bin:$PATH" - export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH" - export PATH="$ANDROID_SDK_ROOT/build-tools:$PATH" - ''; - } + export PATH="$ANDROID_HOME/bin:$PATH" + export PATH="$ANDROID_NDK_ROOT:$PATH" + export PATH="$ANDROID_SDK_ROOT/tools:$PATH" + export PATH="$ANDROID_SDK_ROOT/tools/bin:$PATH" + export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH" + export PATH="$ANDROID_SDK_ROOT/build-tools:$PATH" + ''; +} diff --git a/nix/pkgs/go-maven-resolver/default.nix b/nix/pkgs/go-maven-resolver/default.nix index 4eb790b01a..c8922d920f 100644 --- a/nix/pkgs/go-maven-resolver/default.nix +++ b/nix/pkgs/go-maven-resolver/default.nix @@ -1,8 +1,8 @@ -{ lib, buildGoPackage, fetchFromGitHub }: +{ lib, buildGo114Package, fetchFromGitHub }: let inherit (lib) strings; -in buildGoPackage rec { +in buildGo114Package rec { pname = "go-maven-resolver"; version = strings.substring 0 7 rev; owner = "status-im";