Skip to content

Commit d4ee292

Browse files
Added steps to build macos application
Co-authored-by: SrinivasanTarget <[email protected]>
1 parent ac8a42e commit d4ee292

37 files changed

+1731
-58
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,37 @@ jobs:
6969
with:
7070
name: ios-build
7171
path: ${{ github.workspace }}/server/demo-app/build/ios/iphonesimulator/ios.zip
72+
macOS:
73+
runs-on: macos-latest
74+
steps:
75+
- name: Check out my other private repo
76+
uses: actions/checkout@master
77+
with:
78+
path: 'server'
79+
repository: AppiumTestDistribution/appium-flutter-server
80+
- name: Set up JDK 17
81+
uses: actions/setup-java@v3
82+
with:
83+
java-version: '17'
84+
distribution: 'adopt'
85+
- uses: subosito/flutter-action@v2
86+
with:
87+
flutter-version: 3.22.1
88+
channel: 'stable'
89+
- run: |
90+
ls
91+
cd server/demo-app
92+
flutter build macos --release integration_test/appium.dart
93+
- name: "List files"
94+
continue-on-error: true
95+
run: |
96+
ls -l ${{ github.workspace }}/server/demo-app/build/macos/Build/Products/Release/
97+
- name: "Zip files"
98+
run: |
99+
cd ${{ github.workspace }}/server/demo-app/build/macos/Build/Products/Release/
100+
zip -r macos.zip appium_testing_app.app
101+
- name: Upload artifacts
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: macos-build
105+
path: ${{ github.workspace }}/server/demo-app/build/macos/Build/Products/Release/macos.zip

demo-app/.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.build/
9+
.buildlog/
10+
.history
11+
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# The .vscode folder contains launch configuration and tasks you configure in
22+
# VS Code which you may wish to be included in version control, so this line
23+
# is commented out by default.
24+
#.vscode/
25+
26+
# Flutter/Dart/Pub related
27+
**/doc/api/
28+
**/ios/Flutter/.last_build_id
29+
.dart_tool/
30+
.flutter-plugins
31+
.flutter-plugins-dependencies
32+
.pub-cache/
33+
.pub/
34+
/build/
35+
36+
# Symbolication related
37+
app.*.symbols
38+
39+
# Obfuscation related
40+
app.*.map.json
41+
42+
# Android Studio will place build artifacts here
43+
/android/app/debug
44+
/android/app/profile
45+
/android/app/release

demo-app/.metadata

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "2524052335ec76bb03e04ede244b071f1b86d190"
7+
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
88
channel: "stable"
99

1010
project_type: app
@@ -13,14 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
17-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
18-
- platform: android
19-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
20-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
21-
- platform: ios
22-
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
23-
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
16+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
17+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
18+
- platform: macos
19+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
20+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
2421

2522
# User provided section
2623

demo-app/macos/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/dgph
7+
**/xcuserdata/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
import FlutterMacOS
6+
import Foundation
7+
8+
import a_bridge
9+
import device_info_plus
10+
import file_selector_macos
11+
import package_info_plus
12+
import path_provider_foundation
13+
import url_launcher_macos
14+
import video_player_avfoundation
15+
16+
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
17+
ABridgePlugin.register(with: registry.registrar(forPlugin: "ABridgePlugin"))
18+
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
19+
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
20+
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
21+
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
22+
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
23+
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
24+
}

demo-app/macos/Podfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
platform :osx, '10.14'
2+
3+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5+
6+
project 'Runner', {
7+
'Debug' => :debug,
8+
'Profile' => :release,
9+
'Release' => :release,
10+
}
11+
12+
def flutter_root
13+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14+
unless File.exist?(generated_xcode_build_settings_path)
15+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16+
end
17+
18+
File.foreach(generated_xcode_build_settings_path) do |line|
19+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
20+
return matches[1].strip if matches
21+
end
22+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23+
end
24+
25+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26+
27+
flutter_macos_podfile_setup
28+
29+
target 'Runner' do
30+
use_frameworks!
31+
use_modular_headers!
32+
33+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34+
target 'RunnerTests' do
35+
inherit! :search_paths
36+
end
37+
end
38+
39+
post_install do |installer|
40+
installer.pods_project.targets.each do |target|
41+
flutter_additional_macos_build_settings(target)
42+
end
43+
end

demo-app/macos/Podfile.lock

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
PODS:
2+
- a_bridge (0.0.1):
3+
- FlutterMacOS
4+
- device_info_plus (0.0.1):
5+
- FlutterMacOS
6+
- file_selector_macos (0.0.1):
7+
- FlutterMacOS
8+
- FlutterMacOS (1.0.0)
9+
- package_info_plus (0.0.1):
10+
- FlutterMacOS
11+
- path_provider_foundation (0.0.1):
12+
- Flutter
13+
- FlutterMacOS
14+
- url_launcher_macos (0.0.1):
15+
- FlutterMacOS
16+
- video_player_avfoundation (0.0.1):
17+
- Flutter
18+
- FlutterMacOS
19+
20+
DEPENDENCIES:
21+
- a_bridge (from `Flutter/ephemeral/.symlinks/plugins/a_bridge/macos`)
22+
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
23+
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
24+
- FlutterMacOS (from `Flutter/ephemeral`)
25+
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
26+
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
27+
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
28+
- video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`)
29+
30+
EXTERNAL SOURCES:
31+
a_bridge:
32+
:path: Flutter/ephemeral/.symlinks/plugins/a_bridge/macos
33+
device_info_plus:
34+
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
35+
file_selector_macos:
36+
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
37+
FlutterMacOS:
38+
:path: Flutter/ephemeral
39+
package_info_plus:
40+
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
41+
path_provider_foundation:
42+
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
43+
url_launcher_macos:
44+
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
45+
video_player_avfoundation:
46+
:path: Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin
47+
48+
SPEC CHECKSUMS:
49+
a_bridge: daba7052d0276a1723b1a12d54e3165184d84883
50+
device_info_plus: a56e6e74dbbd2bb92f2da12c64ddd4f67a749041
51+
file_selector_macos: 585232b688707857504f9cb5f985a7c97fe4dd30
52+
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
53+
package_info_plus: a8a591e70e87ce97ce5d21b2594f69cea9e0312f
54+
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
55+
url_launcher_macos: de10e46d8d8b9e3a7b8a133e8de92b104379f05e
56+
video_player_avfoundation: 2cef49524dd1f16c5300b9cd6efd9611ce03639b
57+
58+
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
59+
60+
COCOAPODS: 1.16.2

0 commit comments

Comments
 (0)