Skip to content

Commit f37f39c

Browse files
authored
Revert "ramin/merge_dev_into_master (#260)"
This reverts commit b12c641.
1 parent b12c641 commit f37f39c

File tree

447 files changed

+1941
-27442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+1941
-27442
lines changed

.circleci/config.yml

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,43 @@ version: 2.1
22
executors:
33
flutter_executor:
44
docker:
5-
- image: cirrusci/flutter:2.10.5
5+
- image: cirrusci/flutter:stable
66
environment:
7-
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport"
7+
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
88

99
commands:
1010
prepare_enviroment:
1111
description: Fetch the repo, do flutter doctor and install deps
1212
steps:
1313
- add_ssh_keys:
1414
fingerprints:
15-
- 85:5e:13:f8:60:b2:55:a1:df:d1:8e:77:17:4c:3b:2d
15+
- 26:72:b1:08:0f:c1:3b:2b:2d:ea:61:7d:d6:11:63:fb
1616
- checkout
1717
- run:
1818
name: Run Flutter doctor
1919
command: flutter doctor
2020
- restore_cache:
2121
keys:
22-
- android-sdk-licenses
23-
- gradle
24-
- pub-cache
25-
- bin
22+
- android-sdk-licenses
23+
- gradle
24+
- pub-cache
25+
- bin
2626
- run:
2727
name: pub get
2828
command: flutter pub get
2929

30-
analyze_code:
31-
description: Do flutter analyze
32-
steps:
33-
- run:
34-
name: Code analysis
35-
command: flutter analyze --no-pub
36-
3730
code_coverage:
3831
description: Do prebuild stuff
3932
steps:
4033
- run:
4134
name: Run the application tests
4235
command: flutter test --coverage
36+
4337
- run:
4438
name: Upload coverage
4539
command: |
46-
sudo gem install coveralls-lcov
47-
coveralls-lcov -t $COVERALLS_REPO_TOKEN coverage/lcov.info
40+
sudo gem install coveralls-lcov
41+
coveralls-lcov -t $COVERALLS_REPO_TOKEN coverage/lcov.info
4842
4943
build_app:
5044
description: Build the app
@@ -68,38 +62,37 @@ commands:
6862
- run:
6963
name: Check that we can build for all Android platforms
7064
command: |
71-
flutter build -v << parameters.file_type >> << parameters.buildNumber >> --<< parameters.mode >> << parameters.target >>
65+
flutter build -v << parameters.file_type >> << parameters.buildNumber >> --<< parameters.mode >> << parameters.target >>
7266
working_directory: <<parameters.working_directory>>
7367

7468
save_env_cache:
75-
description: Save the caches
69+
description: Save the caches
7670
steps:
7771
- save_cache:
7872
key: android-sdk-licenses
7973
paths:
80-
- /opt/android-sdk-linux/licenses
74+
- /opt/android-sdk-linux/licenses
8175

8276
- save_cache:
8377
key: pub-cache
8478
paths:
85-
- /home/cirrus/.pub-cache
79+
- /home/cirrus/.pub-cache
8680

8781
- save_cache:
8882
key: gradle
8983
paths:
90-
- ~/.gradle
84+
- ~/.gradle
9185

9286
- save_cache:
9387
key: bin
9488
paths:
95-
- /usr/local/bin
89+
- /usr/local/bin
9690

9791
jobs:
9892
build_pr:
9993
executor: flutter_executor
10094
steps:
10195
- prepare_enviroment
102-
- analyze_code
10396
- code_coverage
10497
- build_app:
10598
target: "--target-platform android-arm,android-arm64,android-x86,android-x64"
@@ -108,25 +101,25 @@ jobs:
108101
- run:
109102
name: Copy APK
110103
command: |
111-
sudo mkdir -p /artifacts && sudo chown "$(whoami)" /artifacts && cp build/app/outputs/flutter-apk/app-debug.apk /artifacts/deriv-chart.apk
104+
sudo mkdir -p /artifacts && sudo chown "$(whoami)" /artifacts && cp build/app/outputs/apk/app.apk /artifacts/p2p-cashier.apk
112105
working_directory: ~/project/example
113106

114107
- store_artifacts:
115108
path: /artifacts
116-
# - run:
117-
# name: Upload to Slack
118-
# command: |
119-
# export GIT_COMMIT_DESC=$(git log --format=oneline -n 1 | sed -E 's/^[^ ]+ (.*)$/\1/g')
120-
# echo $CIRCLE_BUILD_URL
121-
# # If we wanted to upload the APK rather than providing a link, we can do that via
122-
# # something like this, but it requires an API token:
123-
# # curl -F file=@/artifacts/otc-cashier.apk -F channels=$SLACK_CHANNEL -F token=$SLACK_API_TOKEN -F title="${CIRCLE_PROJECT_REPONAME} | branch -> ${CIRCLE_BRANCH} | commit -> ${GIT_COMMIT_DESC}" https://slack.com/api/files.upload
124-
# # See https://medium.com/major-league/delivering-builds-through-slack-with-circle-ci-3d9e685e08f2 for an example
125-
# if [ "$CIRCLE_BRANCH" = "master" ]; then
126-
# # That 221348483 magic number is the internal CircleCI repository ID.
127-
# # Since it's not easily accessible from the environment or API, it's hardcoded for now.
128-
# curl -X POST --data-urlencode "payload={\"channel\": \"#mobile_flutter_chart\", \"username\": \"CircleCI\", \"text\": \"Latest Android build for Deriv Chart:\\nhttps://${CIRCLE_BUILD_NUM}-221348483-gh.circle-artifacts.com/0/artifacts/deriv-chart.apk\\n> $GIT_COMMIT_DESC\", \"icon_emoji\": \":autobot:\"}" $SLACK_URL
129-
# fi
109+
- run:
110+
name: Upload to Slack
111+
command: |
112+
export GIT_COMMIT_DESC=$(git log --format=oneline -n 1 | sed -E 's/^[^ ]+ (.*)$/\1/g')
113+
echo $CIRCLE_BUILD_URL
114+
# If we wanted to upload the APK rather than providing a link, we can do that via
115+
# something like this, but it requires an API token:
116+
# curl -F file=@/artifacts/otc-cashier.apk -F channels=$SLACK_CHANNEL -F token=$SLACK_API_TOKEN -F title="${CIRCLE_PROJECT_REPONAME} | branch -> ${CIRCLE_BRANCH} | commit -> ${GIT_COMMIT_DESC}" https://slack.com/api/files.upload
117+
# See https://medium.com/major-league/delivering-builds-through-slack-with-circle-ci-3d9e685e08f2 for an example
118+
if [ "$CIRCLE_BRANCH" = "master" ]; then
119+
# That 221348483 magic number is the internal CircleCI repository ID.
120+
# Since it's not easily accessible from the environment or API, it's hardcoded for now.
121+
curl -X POST --data-urlencode "payload={\"channel\": \"#project_p2p_cashier\", \"username\": \"CircleCI\", \"text\": \"Latest Android build for P2P cashier:\\nhttps://${CIRCLE_BUILD_NUM}-221348483-gh.circle-artifacts.com/0/artifacts/p2p-cashier.apk\\n> $GIT_COMMIT_DESC\", \"icon_emoji\": \":autobot:\"}" $SLACK_URL
122+
fi
130123
- save_env_cache
131124

132125
workflows:

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ build/
55
pubspec.lock
66
.flutter-plugins
77
.flutter-plugins-dependencies
8-
.last_build_id
98

109
# Mac
1110
.DS_Store
@@ -48,9 +47,6 @@ proguard/
4847
# Android Studio captures folder
4948
captures/
5049

51-
# Visual Studio code
52-
launch.json
53-
5450
# IntelliJ
5551
*.iml
5652
.idea/workspace.xml
@@ -64,8 +60,6 @@ launch.json
6460
.idea/modules.xml
6561
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
6662
.idea/navEditor.xml
67-
.idea/codeStyles
68-
.idea/misc.xml
6963

7064
# Keystore files
7165
# Uncomment the following lines if you do not want to check your keystore files in.
@@ -101,4 +95,3 @@ lint/outputs/
10195
lint/tmp/
10296
# lint/reports/
10397
coverage
104-
.fvm/

0 commit comments

Comments
 (0)