Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 0af5311

Browse files
authored
Fix running locally temporary (#48)
* Fix pub get * Fix apk build * Fix running on ios * Update RUN.md
1 parent 7f08b8d commit 0af5311

File tree

10 files changed

+66
-13
lines changed

10 files changed

+66
-13
lines changed

RUN.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[2025-02-24]
2+
- Installed flutter 2.2.3 from https://docs.flutter.dev/release/archive
3+
4+
[2025-02-25]
5+
- Needed to change packages/flutter_tools/bin/podhelper.rb, replaced
6+
```diff
7+
-return [] unless File.exists? file_path
8+
+return [] unless File.exist? file_path
9+
```

android/build.gradle

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

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath 'com.android.tools.build:gradle:7.0.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

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-5.6.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

ios/Flutter/Debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"

ios/Flutter/Release.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"

ios/Podfile

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

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,4 +492,4 @@
492492
/* End XCConfigurationList section */
493493
};
494494
rootObject = 97C146E61CF9000F007C117D /* Project object */;
495-
}
495+
}

ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ packages:
479479
description:
480480
path: "plugins/window_size"
481481
ref: HEAD
482-
resolved-ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81
483-
url: "git://github.com/google/flutter-desktop-embedding.git"
482+
resolved-ref: eb3964990cf19629c89ff8cb4a37640c7b3d5601
483+
url: "https://github.com/google/flutter-desktop-embedding.git"
484484
source: git
485485
version: "0.1.0"
486486
xdg_directories:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies:
4343
flutter_advanced_avatar: ^1.0.0+1
4444
window_size:
4545
git:
46-
url: git://github.com/google/flutter-desktop-embedding.git
46+
url: https://github.com/google/flutter-desktop-embedding.git
4747
path: plugins/window_size
4848

4949
dev_dependencies:

0 commit comments

Comments
 (0)