-
Notifications
You must be signed in to change notification settings - Fork 25
/
.travis.yml
85 lines (85 loc) · 2.83 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
matrix:
include:
- os: linux
language: android
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
android:
components:
- tools
- platform-tools
- build-tools-25.0.3
- android-25
- sys-img-armeabi-v7a-google_apis-25
- extra-android-m2repository
- extra-google-m2repository
- extra-google-android-support
jdk: oraclejdk8
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++6
- fonts-droid
before_script:
- chmod +x deploy_script_android.sh
- wget http://services.gradle.org/distributions/gradle-4.10.2-bin.zip
- unzip -qq gradle-4.10.2-bin.zip
- export GRADLE_HOME=$PWD/gradle-4.10.2
- export PATH=$GRADLE_HOME/bin:$PATH
- git clone https://github.com/flutter/flutter.git -b stable --depth 1
- touch lib/keys.dart
- echo '' > lib/keys.dart
- echo "const MAPBOX_ACCESS_TOKEN = '$MAPBOX_ACCESS_TOKEN';" >> lib/keys.dart
- echo "const MAPBOX_URL_TEMPLATE = '$MAPBOX_URL_TEMPLATE';" >> lib/keys.dart
before_install:
- yes | sdkmanager "platforms;android-28"
- openssl aes-256-cbc -K $encrypted_1dfbb62697e5_key -iv $encrypted_1dfbb62697e5_iv -in file.keystore.enc -out ./android/file.keystore -d
- openssl aes-256-cbc -k "$IOS_DEPLOY_CERT_PASS" -in ./android/app/google-services.json.enc -d -a -out ./android/app/google-services.json
script:
- "./flutter/bin/flutter build apk"
- flutter/bin/flutter test test
deploy:
skip_cleanup: true
provider: script
script: ./deploy_script_android.sh
on:
branch: beta
- os: osx
osx_image: xcode11.2
language: generic
before_script:
- chmod +x deploy_script_ios.sh
- brew update
- brew install --HEAD usbmuxd
- brew unlink usbmuxd
- brew link usbmuxd
- brew install --HEAD libimobiledevice
- brew install ideviceinstaller
- brew install ios-deploy
- git clone https://github.com/flutter/flutter.git -b stable --depth 1
- touch lib/keys.dart
- echo '' > lib/keys.dart
- echo "const MAPBOX_ACCESS_TOKEN = '$MAPBOX_ACCESS_TOKEN';" >> lib/keys.dart
- echo "const MAPBOX_URL_TEMPLATE = '$MAPBOX_URL_TEMPLATE';" >> lib/keys.dart
before_install:
- openssl aes-256-cbc -k "$IOS_DEPLOY_CERT_PASS" -in ./ios/Runner/GoogleService-Info.plist.enc -d -a -out ./ios/Runner/GoogleService-Info.plist
script:
- flutter/bin/flutter pub get
- gem install cocoapods
- (cd ios; rm -rf Pods; rm Podfile.lock)
- flutter/bin/flutter build ios --debug --no-codesign
- flutter/bin/flutter test test
deploy:
skip_cleanup: true
provider: script
script: ./deploy_script_ios.sh
on:
branch: beta
cache:
directories:
- "$HOME/.pub-cache"