diff --git a/Makefile b/Makefile index 6b22c1c458..d379813125 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ release: release-android release-ios ##@build Build release for Android and iOS build-fdroid: export BUILD_ENV = prod build-fdroid: export BUILD_TYPE = release build-fdroid: export ANDROID_ABI_SPLIT = false -build-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64 +build-fdroid: export ANDROID_ABI_INCLUDE = arm64-v8a;x86_64 build-fdroid: ##@build Build release for F-Droid @scripts/build-android.sh diff --git a/android/app/build.gradle b/android/app/build.gradle index c086b3a560..42536c8e3c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -253,7 +253,7 @@ android { // For each separate APK per architecture, set a unique version code as described here: // https://developer.android.com/studio/build/configure-apk-splits.html - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] + def versionCodes = ["arm64-v8a": 1, "x86_64": 2] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = versionCodes.get(abi) + defaultConfig.versionCode @@ -269,7 +269,9 @@ android { } sourceSets { - main { jniLibs.srcDirs 'libs' } + main { + jniLibs.srcDirs = ['libs', 'src/main/jniLibs'] + } } } diff --git a/android/app/jni/Application.mk b/android/app/jni/Application.mk index df97d66fba..eab936d3c9 100644 --- a/android/app/jni/Application.mk +++ b/android/app/jni/Application.mk @@ -1,4 +1,4 @@ -APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 +APP_ABI := arm64-v8a x86_64 APP_LDFLAGS := -Wl,--build-id=none APP_PLATFORM := android-18 APP_STL := c++_static diff --git a/android/app/src/main/java/im/status/ethereum/MainActivity.kt b/android/app/src/main/java/im/status/ethereum/MainActivity.kt index c77da8d41c..6945511e66 100644 --- a/android/app/src/main/java/im/status/ethereum/MainActivity.kt +++ b/android/app/src/main/java/im/status/ethereum/MainActivity.kt @@ -116,6 +116,9 @@ class MainActivity : NavigationActivity(), ActivityCompat.OnRequestPermissionsRe } override fun onCreate(savedInstanceState: Bundle?) { + System.loadLibrary("rln") + System.loadLibrary("waku") + val splashScreen = installSplashScreen(); setTheme(R.style.DarkTheme) // Make sure we get an Alert for every uncaught exceptions diff --git a/nix/status-go/mobile/build.nix b/nix/status-go/mobile/build.nix index 6f3872f73c..e3263b9d48 100644 --- a/nix/status-go/mobile/build.nix +++ b/nix/status-go/mobile/build.nix @@ -1,6 +1,6 @@ { callPackage, lib, buildGoPackage , androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo -, go-bindata, mockgen, protobuf3_20, protoc-gen-go +, go-bindata, mockgen, protobuf3_20, protoc-gen-go, git, cargo, which , meta , source , platform ? "android" @@ -29,7 +29,7 @@ in buildGoPackage rec { extraSrcPaths = [ gomobile ]; nativeBuildInputs = [ - gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 + gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 cargo git which ] ++ optional isAndroid openjdk ++ optional isIOS xcodeWrapper; @@ -50,6 +50,12 @@ in buildGoPackage rec { echo 'Generate static files' pushd go/src/$goPackagePath make generate SHELL=$SHELL GO111MODULE=on GO_GENERATE_CMD='go generate' + cd third_party/nwaku + make clean + make V=1 + ls ${androidPkgs.ndk} + export ANDROID_NDK_HOME="${androidPkgs.ndk}" + make libwaku-android SHELL=$SHELL popd ''; @@ -62,7 +68,7 @@ in buildGoPackage rec { -target=${concatStringsSep "," targets} \ ${optionalString isAndroid "-androidapi=${platformVersion}" } \ ${optionalString isIOS "-iosversion=${platformVersion}" } \ - -tags='${optionalString isIOS "nowatchdog"} gowaku_skip_migrations gowaku_no_rln' \ + -tags='${optionalString isIOS "nowatchdog"} use_nwaku gowaku_skip_migrations gowaku_no_rln' \ -o ${outputFileName} \ ${source.goPackagePath}/mobile diff --git a/nix/status-go/source.nix b/nix/status-go/source.nix index 2bcf68ee90..6134b8946f 100644 --- a/nix/status-go/source.nix +++ b/nix/status-go/source.nix @@ -27,8 +27,8 @@ let root = path; include = [ ".*" ]; exclude = [ - ".*/[.]git.*" ".*[.]md" ".*[.]yml" ".*/.*_test.go$" - "VERSION" "_assets/.*" "build/.*" + ".*[.]md" ".*[.]yml" ".*/.*_test.go$" + "VERSION" "build/.*" ".*/.*LICENSE.*" ".*/CONTRIB.*" ".*/AUTHOR.*" ]; }; @@ -50,6 +50,7 @@ let src = fetchFromGitHub { inherit rev owner repo sha256; name = "${repo}-${shortRev}-source"; + fetchSubmodules = true; }; }; in diff --git a/status-go-version.json b/status-go-version.json index 8103e1a749..aead94a1a1 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v7.0.0", - "commit-sha1": "84493728d9ac41553297e8084943c1429cdfe59a", - "src-sha256": "11dwdlk9svmc6f8wmya43fis9jfigvh5idxpiwmia9gkad1zal6y" + "version": "fe63d6c7b485b6c760c2a545172b637dca27ff3a", + "commit-sha1": "fe63d6c7b485b6c760c2a545172b637dca27ff3a", + "src-sha256": "1r8jrkmr72ppx3y9p8m8vdypsiqxmhpd9aw4xdcsqn6vbapvdbdc" }