Skip to content

Commit 0fd8aaa

Browse files
Update project config
Update CI config
1 parent 43266ff commit 0fd8aaa

File tree

10 files changed

+260
-323
lines changed

10 files changed

+260
-323
lines changed

.circleci/config.yml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,30 @@ jobs:
33
android_tests:
44
working_directory: ~/project/example/android
55
macos:
6-
xcode: "9.4.0"
6+
xcode: "12.3.0"
77
environment:
88
JVM_OPTS: -Xmx3200m
99
steps:
1010
- checkout:
1111
path: ~/project
12+
- run:
13+
name: Install JAVA
14+
command: |
15+
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask homebrew/cask-versions/adoptopenjdk8
16+
- run:
17+
name: Install Android sdk
18+
command: |
19+
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask android-sdk
1220
- run:
1321
name: Setup environment variables
1422
command: |
1523
echo 'export PATH="$PATH:/usr/local/opt/node@8/bin:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin:/usr/local/share/android-sdk/tools/bin"' >> $BASH_ENV
24+
echo 'export JAVA_HOME=`/usr/libexec/java_home -v 1.8`' >> $BASH_ENV
1625
echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
1726
echo 'export ANDROID_SDK_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
1827
echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV
1928
echo 'export QEMU_AUDIO_DRV=none' >> $BASH_ENV
20-
echo 'export JAVA_HOME=/Library/Java/Home' >> $BASH_ENV
2129
echo 'export PATH="$PATH:`pwd`/flutter/bin"' >> $BASH_ENV
22-
- run:
23-
name: Install Android sdk
24-
command: |
25-
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask
26-
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-sdk
2730
- run:
2831
name: Install emulator dependencies
2932
command: (yes | sdkmanager "platform-tools" "platforms;android-26" "extras;intel;Hardware_Accelerated_Execution_Manager" "build-tools;26.0.0" "system-images;android-26;google_apis;x86" "emulator" --verbose) || true
@@ -37,7 +40,7 @@ jobs:
3740
background: true
3841
- run:
3942
name: download flutter SDK
40-
command: if ! test -f "flutter_sdk.zip"; then curl -o flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.5.4-hotfix.2-stable.zip; fi
43+
command: if ! test -f "flutter_sdk.zip"; then curl -o flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_1.20.4-stable.zip; fi
4144
- run:
4245
name: unzip flutter SDK
4346
command: unzip flutter_sdk.zip
@@ -70,38 +73,36 @@ jobs:
7073

7174
ios_tests:
7275
macos:
73-
xcode: "10.2.0"
74-
working_directory: ~/project/example/ios
76+
xcode: "12.3.0"
77+
working_directory: ~/project/example
7578
environment:
7679
FL_OUTPUT_DIR: output
7780
steps:
7881
- checkout:
7982
path: ~/project
83+
- run:
84+
name: Install CocoaPods
85+
command: sudo gem install cocoapods
8086
- run:
8187
name: download flutter SDK
82-
command: if ! test -f "flutter_sdk.zip"; then curl -o flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.5.4-hotfix.2-stable.zip; fi
88+
command: if ! test -f "~/Downloads/flutter_sdk.zip"; then curl -o ~/Downloads/flutter_sdk.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_1.20.4-stable.zip; fi
8389
- run:
8490
name: unzip flutter SDK
85-
command: unzip flutter_sdk.zip
91+
command: unzip ~/Downloads/flutter_sdk.zip -d ~/Library
8692
- run:
8793
name: export flutter path
88-
command: echo 'export PATH="$PATH:`pwd`/flutter/bin"' >> $BASH_ENV
89-
- run:
90-
name: Update Cocoapods
91-
command: sudo gem install cocoapods
94+
command: echo 'export PATH="$PATH:~/Library/flutter/bin"' >> $BASH_ENV
9295
- run: flutter doctor
96+
- run: flutter pub get
97+
- run:
98+
name: Install Pods
99+
command: cd ios && pod install --repo-update
93100
- run:
94101
name: Flutter build
95-
command: cd ..; flutter build aot
96-
- run:
97-
name: Update CocoaPods
98-
command: pod update
99-
- run:
100-
name: Install CocoaPods
101-
command: pod install --repo-update
102+
command: flutter build aot
102103
- run:
103104
name: Build and run tests
104-
command: xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.2' test | xcpretty
105+
command: cd ios && xcodebuild -allowProvisioningUpdates -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro Max,OS=14.3' test | xcpretty
105106

106107
release:
107108
docker:
@@ -113,7 +114,7 @@ jobs:
113114

114115
publish:
115116
macos:
116-
xcode: "10.1.0"
117+
xcode: "12.3.0"
117118
steps:
118119
- checkout
119120
- run: git clone https://InstabugCI:[email protected]/Instabug/Escape.git

example/.flutter-plugins-dependencies

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"instabug_flutter","path":"/Users/aliabdelfattah/Documents/Dev/Instabug/Dev_Apps/Instabug-Flutter/","dependencies":[]}],"android":[{"name":"instabug_flutter","path":"/Users/aliabdelfattah/Documents/Dev/Instabug/Dev_Apps/Instabug-Flutter/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"instabug_flutter","dependencies":[]}],"date_created":"2021-02-05 23:43:02.556588","version":"1.20.4"}

example/ios/Flutter/.last_build_id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
383d0aa192e5769e24f82a9d3297e0f3

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>8.0</string>
24+
<string>9.0</string>
2525
</dict>
2626
</plist>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
# This is a generated file; do not edit or check into version control.
3+
export "FLUTTER_ROOT=/Users/aliabdelfattah/Library/flutter"
4+
export "FLUTTER_APPLICATION_PATH=/Users/aliabdelfattah/Documents/Dev/Instabug/Dev_Apps/Instabug-Flutter/example"
5+
export "FLUTTER_TARGET=lib/main.dart"
6+
export "FLUTTER_BUILD_DIR=build"
7+
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8+
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
9+
export "FLUTTER_FRAMEWORK_DIR=/Users/aliabdelfattah/Library/flutter/bin/cache/artifacts/engine/ios-release"
10+
export "FLUTTER_BUILD_NAME=1.0.0"
11+
export "FLUTTER_BUILD_NUMBER=1"
12+
export "DART_OBFUSCATION=false"
13+
export "TRACK_WIDGET_CREATION=false"
14+
export "TREE_SHAKE_ICONS=true"
15+
export "PACKAGE_CONFIG=.packages"

example/ios/Podfile

Lines changed: 16 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
source 'https://cdn.cocoapods.org/'
22

3+
# Uncomment this line to define a global platform for your project
34
platform :ios, '10.0'
45

56
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
@@ -11,90 +12,29 @@ project 'Runner', {
1112
'Release' => :release,
1213
}
1314

14-
def parse_KV_file(file, separator='=')
15-
file_abs_path = File.expand_path(file)
16-
if !File.exists? file_abs_path
17-
return [];
15+
def flutter_root
16+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
17+
unless File.exist?(generated_xcode_build_settings_path)
18+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
1819
end
19-
pods_ary = []
20-
skip_line_start_symbols = ["#", "/"]
21-
File.foreach(file_abs_path) { |line|
22-
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
23-
plugin = line.split(pattern=separator)
24-
if plugin.length == 2
25-
podname = plugin[0].strip()
26-
path = plugin[1].strip()
27-
podpath = File.expand_path("#{path}", file_abs_path)
28-
pods_ary.push({:name => podname, :path => podpath});
29-
else
30-
puts "Invalid plugin specification: #{line}"
31-
end
32-
}
33-
return pods_ary
34-
end
3520

36-
target 'Runner' do
37-
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
38-
# referring to absolute paths on developers' machines.
39-
system('rm -rf .symlinks')
40-
system('mkdir -p .symlinks/plugins')
41-
42-
# Flutter Pods
43-
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
44-
if generated_xcode_build_settings.empty?
45-
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
21+
File.foreach(generated_xcode_build_settings_path) do |line|
22+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
23+
return matches[1].strip if matches
4624
end
47-
generated_xcode_build_settings.map { |p|
48-
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
49-
symlink = File.join('.symlinks', 'flutter')
50-
File.symlink(File.dirname(p[:path]), symlink)
51-
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
52-
end
53-
}
54-
55-
# Plugin Pods
56-
plugin_pods = parse_KV_file('../.flutter-plugins')
57-
plugin_pods.map { |p|
58-
symlink = File.join('.symlinks', 'plugins', p[:name])
59-
File.symlink(p[:path], symlink)
60-
pod p[:name], :path => File.join(symlink, 'ios')
61-
}
25+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
6226
end
6327

64-
target 'instabug_flutter_exampleUITests' do
65-
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
66-
# referring to absolute paths on developers' machines.
67-
system('rm -rf .symlinks')
68-
system('mkdir -p .symlinks/plugins')
69-
70-
# Flutter Pods
71-
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
72-
if generated_xcode_build_settings.empty?
73-
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
74-
end
75-
generated_xcode_build_settings.map { |p|
76-
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
77-
symlink = File.join('.symlinks', 'flutter')
78-
File.symlink(File.dirname(p[:path]), symlink)
79-
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
80-
end
81-
}
82-
83-
# Plugin Pods
84-
plugin_pods = parse_KV_file('../.flutter-plugins')
85-
plugin_pods.map { |p|
86-
symlink = File.join('.symlinks', 'plugins', p[:name])
87-
File.symlink(p[:path], symlink)
88-
pod p[:name], :path => File.join(symlink, 'ios')
89-
}
28+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
29+
30+
flutter_ios_podfile_setup
31+
32+
target 'Runner' do
33+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
9034
end
9135

9236
post_install do |installer|
9337
installer.pods_project.targets.each do |target|
94-
target.build_configurations.each do |config|
95-
config.build_settings['ENABLE_BITCODE'] = 'NO'
96-
end
38+
flutter_additional_ios_build_settings(target)
9739
end
9840
end
99-
100-
pod 'OCMock', '~> 3.4'

example/ios/Podfile.lock

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- Instabug (9.1.4)
3+
- Instabug (9.1.7)
44
- instabug_flutter (0.0.1):
55
- Flutter
66
- Instabug (= 9.1.7)
7-
- OCMock (3.8.1)
87

98
DEPENDENCIES:
10-
- Flutter (from `.symlinks/flutter/ios`)
9+
- Flutter (from `Flutter`)
1110
- instabug_flutter (from `.symlinks/plugins/instabug_flutter/ios`)
12-
- OCMock (~> 3.4)
1311

1412
SPEC REPOS:
1513
trunk:
1614
- Instabug
17-
- OCMock
1815

1916
EXTERNAL SOURCES:
2017
Flutter:
21-
:path: ".symlinks/flutter/ios"
18+
:path: Flutter
2219
instabug_flutter:
2320
:path: ".symlinks/plugins/instabug_flutter/ios"
2421

2522
SPEC CHECKSUMS:
26-
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
23+
Flutter: 446b87ace8a3747a167979213b4aef59a0b5e5fa
2724
Instabug: 28838c071edc50e4f13800e6877645d3b328aab9
2825
instabug_flutter: 65794e9f82acebde599e56cc6a2e74a17b69410e
29-
OCMock: 29f6e52085b4e7d9b075cbf03ed7c3112f82f934
3026

31-
PODFILE CHECKSUM: 8a47551d4cb50d1be73b4b5bed8629d9a9468757
27+
PODFILE CHECKSUM: b9ee4d9f65f90936bba6f43025d3b134f174463e
3228

3329
COCOAPODS: 1.10.1

0 commit comments

Comments
 (0)