Skip to content

Commit 0dc44a4

Browse files
Merge pull request #62 from flutter-form-builder-ecosystem/macos-support
Macos support
2 parents 2b075f7 + fd691bc commit 0dc44a4

39 files changed

+1370
-82
lines changed

.github/workflows/base.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ on:
1414
jobs:
1515
build:
1616
runs-on: macos-latest
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
channel: [stable]
2117

2218
steps:
2319
- uses: actions/checkout@v3
@@ -27,10 +23,16 @@ jobs:
2723
with:
2824
paths: "**/*.md"
2925

26+
- name: Setup Java
27+
uses: actions/setup-java@v2
28+
with:
29+
distribution: 'zulu'
30+
java-version: '11'
31+
3032
- name: Flutter action
3133
uses: subosito/flutter-action@v2
3234
with:
33-
channel: ${{ matrix.channel }}
35+
channel: 'stable'
3436

3537
- name: Install dependencies
3638
run: flutter pub get

example/.metadata

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

66
version:
7-
revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
7+
revision: f72efea43c3013323d1b95cff571f3c1caa37583
88
channel: stable
99

1010
project_type: app
@@ -13,23 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
17-
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
18-
- platform: android
19-
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
20-
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
21-
- platform: ios
22-
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
23-
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
24-
- platform: linux
25-
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
26-
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
27-
- platform: web
28-
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
29-
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
30-
- platform: windows
31-
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
32-
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
16+
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
17+
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
18+
- platform: macos
19+
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
20+
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
3321

3422
# User provided section
3523

example/android/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
9+
classpath 'com.android.tools.build:gradle:7.1.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -21,8 +21,6 @@ allprojects {
2121
rootProject.buildDir = '../build'
2222
subprojects {
2323
project.buildDir = "${rootProject.buildDir}/${project.name}"
24-
}
25-
subprojects {
2624
project.evaluationDependsOn(':app')
2725
}
2826

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

example/ios/Podfile.lock

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ PODS:
3434
- DKImagePickerController/PhotoGallery
3535
- Flutter
3636
- Flutter (1.0.0)
37-
- permission_handler_apple (9.0.4):
38-
- Flutter
3937
- SDWebImage (5.15.4):
4038
- SDWebImage/Core (= 5.15.4)
4139
- SDWebImage/Core (5.15.4)
@@ -44,7 +42,6 @@ PODS:
4442
DEPENDENCIES:
4543
- file_picker (from `.symlinks/plugins/file_picker/ios`)
4644
- Flutter (from `Flutter`)
47-
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
4845

4946
SPEC REPOS:
5047
trunk:
@@ -58,15 +55,12 @@ EXTERNAL SOURCES:
5855
:path: ".symlinks/plugins/file_picker/ios"
5956
Flutter:
6057
:path: Flutter
61-
permission_handler_apple:
62-
:path: ".symlinks/plugins/permission_handler_apple/ios"
6358

6459
SPEC CHECKSUMS:
6560
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
6661
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
6762
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
6863
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
69-
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
7064
SDWebImage: 1c39de67663e5eebb2f41324d5d580eeea12dd4c
7165
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
7266

example/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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
import FlutterMacOS
6+
import Foundation
7+
8+
9+
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
10+
}

example/macos/Podfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
end
35+
36+
post_install do |installer|
37+
installer.pods_project.targets.each do |target|
38+
flutter_additional_macos_build_settings(target)
39+
end
40+
end

0 commit comments

Comments
 (0)