From 3bb22f1c597d17cca848318c4dd3de00368952c2 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 19 Feb 2020 17:23:03 +0100 Subject: [PATCH] [Android] Add and build olm module Switch to famedly flutter images Took 4 minutes --- .gitignore | 3 ++- .gitlab-ci.yml | 10 ++++------ .gitmodules | 3 +++ android/app/build.gradle | 14 ++++++++++++++ ios/olm | 1 + 5 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 .gitmodules create mode 160000 ios/olm diff --git a/.gitignore b/.gitignore index b0c43e29..95d659f8 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,5 @@ lib/generated_plugin_registrant.dart /key.jks -/android/key.properties \ No newline at end of file +/android/key.properties +**/android/app/.cxx \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d167aeec..bc9c5a63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ image: - name: cirrusci/flutter + name: registry.gitlab.com/famedly/container/flutter-dockerimages:stable stages: - coverage @@ -19,16 +19,14 @@ test: build_web: stage: coverage - image: cirrusci/flutter:beta-web + image: registry.gitlab.com/famedly/container/flutter-dockerimages:beta script: + - sudo apt update + - sudo apt install curl -y - rm -r assets/js/package - cd assets/js/ && curl -O 'https://janian.de/index.php/s/ZKpQi4xFkGWPMHQ/download' && cd ../../ - cd assets/js/ && mv download olm.tar.gz && cd ../../ - cd assets/js/ && tar xaf olm.tar.gz && cd ../../ - - flutter channel beta - - flutter upgrade - - flutter doctor --verbose - - flutter config --enable-web - flutter pub get - flutter clean - flutter build web --release --verbose diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..f6514837 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ios/olm"] + path = ios/olm + url = https://gitlab.matrix.org/matrix-org/olm.git diff --git a/android/app/build.gradle b/android/app/build.gradle index 916bd436..3d9326d5 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -49,6 +49,11 @@ android { versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + externalNativeBuild { + cmake { + arguments "-DOLM_TESTS=NO" + } + } } signingConfigs { @@ -73,6 +78,15 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + + externalNativeBuild { + // Encapsulates your CMake build configurations. + cmake { + // Provides a relative path to your CMake build script. + path "../../ios/olm/CMakeLists.txt" + version "3.10.2" + } + } } flutter { diff --git a/ios/olm b/ios/olm new file mode 160000 index 00000000..930c4677 --- /dev/null +++ b/ios/olm @@ -0,0 +1 @@ +Subproject commit 930c4677547ebb3058680a9c3ad88186bb2030da