Skip to content

Commit

Permalink
first jab at finishing flutter update
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed Aug 31, 2024
1 parent 644a27c commit 9876698
Show file tree
Hide file tree
Showing 18 changed files with 173 additions and 178 deletions.
12 changes: 6 additions & 6 deletions app-android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.8.0'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand All @@ -30,12 +30,12 @@ apply plugin: 'kotlin-android'
def flutter = files(orcFlutter)

android {
compileSdkVersion 33
compileSdkVersion 34

defaultConfig {
applicationId orcUnique
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode orcMonotonic.toInteger() - 946684800
versionName orcVersion
manifestPlaceholders = [orcUnique: orcUnique, orcName: orcName]
Expand Down
11 changes: 8 additions & 3 deletions app-flutter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ $(call include,shared/target-all.mk)

$(foreach fork,$(forks),$(shell ln -sf $(patsubst %/pubspec.yaml,%,$(fork)) >/dev/null))

sed := $(shell which gsed sed | head -n1)

.PHONY: create
create: $(pwd/flutter)/packages/flutter/pubspec.lock
$(flutter) create -i objc -a java --no-pub --project-name orchid .
$(flutter) pub get
sed -ie 's/flutter\.compileSdkVersion/33/g;s/flutter.minSdkVersion/21/g' android/app/build.gradle
sed -ie "/^platform :osx/{s/,.*/, '10.15'/g;}" macos/Podfile
sed -ie "/MACOSX_DEPLOYMENT_TARGET =/{s/=.*/= 10.15;/g;}" macos/Runner.xcodeproj/project.pbxproj
$(sed) -ie 's/flutter\.compileSdkVersion/34/g;s/flutter.minSdkVersion/21/g' android/app/build.gradle
$(sed) -ie '0,/subprojects {/s//\0 afterEvaluate { android { compileSdkVersion 34 } }/' android/build.gradle
$(sed) -ie '/org\.jetbrains\.kotlin\.android/s/\(version "\)[^"]*/\11.8.0/' android/settings.gradle
$(sed) -ie "/^# platform :ios/{s/^# //;}" ios/Podfile
$(sed) -ie "/^platform :osx/{s/,.*/, '10.15'/;}" macos/Podfile
$(sed) -ie "/MACOSX_DEPLOYMENT_TARGET =/{s/=.*/= 10.15;/g;}" macos/Runner.xcodeproj/project.pbxproj

builds :=
builds += apk
Expand Down
8 changes: 6 additions & 2 deletions app-ios/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ $(call include,shared/target-ios.mk)
local :=
local += app.mm.o

local += $(subst %,.,$(word 1,$(generated))).o
temp := $(subst %,.,$(word 1,$(generated)))
local += $(temp).o

$(call depend,$(temp).o,$(output)/XCBuildData/build.db)
cflags/$(temp) += -fmodules $(patsubst %,-fmodule-map-file=%,$(wildcard $(output)/Release-$(sdk)/*/*.modulemap)) -Wno-ignored-attributes

include env/output.mk

Expand Down Expand Up @@ -139,7 +143,7 @@ $(bundle)/Assets.car: $(wildcard Assets.xcassets/*/*)
@mkdir -p $(output)/info
# XXX: --launch-image LaunchImage
actool --output-format human-readable-text --errors --warnings --notices \
--target-device iphone --target-device ipad --minimum-deployment-target 11.0 \
--target-device iphone --target-device ipad --minimum-deployment-target 12.0 \
--platform iphoneos \
--app-icon AppIcon \
--compress-pngs \
Expand Down
2 changes: 1 addition & 1 deletion app-shared/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ install! 'cocoapods',
:integrate_targets => false

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
8 changes: 6 additions & 2 deletions app-shared/target-all.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ flutter := $(CURDIR)/$(pwd/flutter)/bin/flutter --suppress-analytics --verbose -

# -a is needed as flutter (incorrectly) only installs files for windows *target* on windows *host*
# https://github.com/flutter/flutter/issues/58379
precache := --android --ios --linux --macos --windows -a

# XXX: ugh. now I had to disable all the windows support due to Failed to download https://storage.googleapis.com/flutter_infra_release/flutter/b8800d88be4866db1b15f8b954ab2573bba9960f/windows-arm64/artifacts.zip. Ensure you have network connectivity and then try again. Exception: 404
# I actually think I can get them to fix this, as this breaks precache -a even without --windows and even without --enable-windows-desktop

precache := --android --ios --linux --macos #--windows

$(pwd/flutter)/packages/flutter/pubspec.lock: $(pwd/flutter)/packages/flutter/pubspec.yaml $(call head,$(pwd/flutter))
cd $(pwd/flutter) && git clean -fxd
cd $(pwd/flutter) && bin/flutter config --enable-linux-desktop
cd $(pwd/flutter) && bin/flutter config --enable-macos-desktop
cd $(pwd/flutter) && bin/flutter config --enable-windows-desktop
#cd $(pwd/flutter) && bin/flutter config --enable-windows-desktop
cd $(pwd/flutter) && bin/flutter precache $(precache)
cd $(pwd/flutter) && bin/flutter update-packages

Expand Down
3 changes: 2 additions & 1 deletion app-shared/target-and.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

assemble := android
platform := android
capped := Android

generated := $(pwd/gui)/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant%java

include $(pwd)/target-all.mk

jni := armeabi-v7a arm64-v8a
#jnis := $(subst $(space),$(comma),$(foreach arch,$(jni),android-$(flutter/$(arch))))

assembled := $(output)/flutter/flutter_assets/AssetManifest%json $(if $(filter noaot,$(debug)),,$(foreach arch,$(jni),$(output)/flutter/$(arch)/app%so))
$(assembled): $(dart)
Expand All @@ -35,6 +35,7 @@ $(assembled): $(dart)
-dTargetPlatform="$(platform)" \
-dTargetFile="lib/main.dart" \
-dBuildMode="$(mode)" \
-d$(capped)Archs="$(foreach arch,$(jni),$(flutter/$(arch)))" \
-dTreeShakeIcons="true" \
-dTrackWidgetCreation="true" \
--output="$(CURDIR)/$(output)/flutter" \
Expand Down
5 changes: 0 additions & 5 deletions app-shared/target-apl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,8 @@ endif

codesign += && touch $(3)

ifeq ($(target),mac)
cflags += -F$(engine)
lflags += -F$(engine)
else
cflags += -F$(engine)/$(framework).xcframework/$(xcframework)
lflags += -F$(engine)/$(framework).xcframework/$(xcframework)
endif

app := $(bundle)$(contents)/Frameworks/App.framework
embed := $(bundle)$(contents)/Frameworks/$(framework).framework
Expand Down
2 changes: 1 addition & 1 deletion env/lnx-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

pacman -Sy \
ubuntu-keyring \
bc tcl vim \
bc sed tcl vim \
curl git rsync wget \
fakeroot talloc \
cpio rpm-tools unzip zstd \
Expand Down
2 changes: 1 addition & 1 deletion env/lnx-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apt-get update

apt-get -y install \
ubuntu-keyring \
bc tcl xxd \
bc sed tcl xxd \
curl git-core rsync wget \
fakeroot libtalloc-dev \
cpio rpm unzip zstd \
Expand Down
1 change: 1 addition & 0 deletions env/setup-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ which brew &>/dev/null || /bin/bash -c "$(curl -fsSL https://raw.githubuserconte

# XXX: duplicate linux setup as much as possible
brew install \
gnu-sed \
fakeroot \
rpm2cpio zstd \
binutils \
Expand Down
3 changes: 0 additions & 3 deletions env/target-apl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ signature := /_CodeSignature/CodeResources

isysroot := $(shell xcrun --sdk $(sdk) --show-sdk-path)
more += -isysroot $(isysroot)
ifneq ($(sdk),macosx)
more += -idirafter $(shell xcrun --sdk macosx --show-sdk-path)/usr/include
endif

define _
more/$(1) := -arch $(1)
Expand Down
2 changes: 2 additions & 0 deletions env/target-mac.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ runtime := osx
more := -mmacosx-version-min=10.15
include $(pwd)/target-apl.mk

xcframework := macos-arm64_x86_64

contents := /Contents
resources := /Resources
versions := /Versions/A
144 changes: 69 additions & 75 deletions gui-orchid/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,74 +2,70 @@ PODS:
- Flutter (1.0.0)
- flutter_js (0.1.0):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- GoogleDataTransport (9.2.0):
- FMDB (2.7.12):
- FMDB/standard (= 2.7.12)
- FMDB/Core (2.7.12)
- FMDB/standard (2.7.12):
- FMDB/Core
- GoogleDataTransport (9.4.1):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- nanopb (< 2.30911.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleMLKit/BarcodeScanning (3.2.0):
- GoogleMLKit/BarcodeScanning (6.0.0):
- GoogleMLKit/MLKitCore
- MLKitBarcodeScanning (~> 2.2.0)
- GoogleMLKit/MLKitCore (3.2.0):
- MLKitCommon (~> 8.0.0)
- GoogleToolboxForMac/DebugUtils (2.3.2):
- GoogleToolboxForMac/Defines (= 2.3.2)
- GoogleToolboxForMac/Defines (2.3.2)
- GoogleToolboxForMac/Logger (2.3.2):
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSData+zlib (2.3.2)":
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.3.2)":
- GoogleToolboxForMac/DebugUtils (= 2.3.2)
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSString+URLArguments (= 2.3.2)"
- "GoogleToolboxForMac/NSString+URLArguments (2.3.2)"
- GoogleUtilities/Environment (7.10.0):
- MLKitBarcodeScanning (~> 5.0.0)
- GoogleMLKit/MLKitCore (6.0.0):
- MLKitCommon (~> 11.0.0)
- GoogleToolboxForMac/Defines (4.2.1)
- GoogleToolboxForMac/Logger (4.2.1):
- GoogleToolboxForMac/Defines (= 4.2.1)
- "GoogleToolboxForMac/NSData+zlib (4.2.1)":
- GoogleToolboxForMac/Defines (= 4.2.1)
- GoogleUtilities/Environment (7.13.3):
- GoogleUtilities/Privacy
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.10.0):
- GoogleUtilities/Logger (7.13.3):
- GoogleUtilities/Environment
- GoogleUtilities/UserDefaults (7.10.0):
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (7.13.3)
- GoogleUtilities/UserDefaults (7.13.3):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilitiesComponents (1.1.0):
- GoogleUtilities/Logger
- GTMSessionFetcher/Core (1.7.2)
- GTMSessionFetcher/Core (3.5.0)
- in_app_purchase_storekit (0.0.1):
- Flutter
- FlutterMacOS
- MLImage (1.0.0-beta3)
- MLKitBarcodeScanning (2.2.0):
- MLKitCommon (~> 8.0)
- MLKitVision (~> 4.2)
- MLKitCommon (8.0.0):
- GoogleDataTransport (~> 9.0)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
- GoogleUtilities/UserDefaults (~> 7.0)
- MLImage (1.0.0-beta5)
- MLKitBarcodeScanning (5.0.0):
- MLKitCommon (~> 11.0)
- MLKitVision (~> 7.0)
- MLKitCommon (11.0.0):
- GoogleDataTransport (< 10.0, >= 9.4.1)
- GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1)
- "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)"
- GoogleUtilities/UserDefaults (< 8.0, >= 7.13.0)
- GoogleUtilitiesComponents (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.12)
- MLKitVision (4.2.0):
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GTMSessionFetcher/Core (~> 1.1)
- MLImage (= 1.0.0-beta3)
- MLKitCommon (~> 8.0)
- Protobuf (~> 3.12)
- mobile_scanner (3.0.0):
- GTMSessionFetcher/Core (< 4.0, >= 3.3.2)
- MLKitVision (7.0.0):
- GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1)
- "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)"
- GTMSessionFetcher/Core (< 4.0, >= 3.3.2)
- MLImage (= 1.0.0-beta5)
- MLKitCommon (~> 11.0)
- mobile_scanner (5.2.1):
- Flutter
- GoogleMLKit/BarcodeScanning (~> 3.2.0)
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- PromisesObjC (2.1.1)
- Protobuf (3.21.12)
- shared_preferences_ios (0.0.1):
- GoogleMLKit/BarcodeScanning (~> 6.0.0)
- nanopb (2.30910.0):
- nanopb/decode (= 2.30910.0)
- nanopb/encode (= 2.30910.0)
- nanopb/decode (2.30910.0)
- nanopb/encode (2.30910.0)
- PromisesObjC (2.4.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
Expand All @@ -81,7 +77,7 @@ DEPENDENCIES:
- flutter_js (from `.symlinks/plugins/flutter_js/ios`)
- in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/darwin`)
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)

Expand All @@ -100,7 +96,6 @@ SPEC REPOS:
- MLKitVision
- nanopb
- PromisesObjC
- Protobuf

EXTERNAL SOURCES:
Flutter:
Expand All @@ -111,36 +106,35 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/in_app_purchase_storekit/darwin"
mobile_scanner:
:path: ".symlinks/plugins/mobile_scanner/ios"
shared_preferences_ios:
:path: ".symlinks/plugins/shared_preferences_ios/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_js: 95929d4e146e8ceb1c8e1889d8c2065c5d840076
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
GoogleMLKit: 0017a6a8372e1a182139b9def4d89be5d87ca5a7
GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34
GoogleUtilities: bad72cb363809015b1f7f19beb1f1cd23c589f95
FMDB: 728731dd336af3936ce00f91d9d8495f5718a0e6
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
GoogleMLKit: 97ac7af399057e99182ee8edfa8249e3226a4065
GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe
GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
in_app_purchase_storekit: 6b297e2b5eab9fa3251a492d57301722e4132a71
MLImage: 489dfec109f21da8621b28d476401aaf7a0d4ff4
MLKitBarcodeScanning: d92fe1911001ec36870162c5a0eb206f612b7169
MLKitCommon: f6da6c5659618c070b50a80db01248ebe2964175
MLKitVision: 96c96571190b7f63eddf4a12068ce8a8689e0d2c
mobile_scanner: 004f7ad2fe4e2b5a3e6ed0bc4b83ca9c5b5dd975
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
Protobuf: 120350fc38646e2dedc26f49ecba778184ea1de2
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
MLImage: 1824212150da33ef225fbd3dc49f184cf611046c
MLKitBarcodeScanning: 10ca0845a6d15f2f6e911f682a1998b68b973e8b
MLKitCommon: afec63980417d29ffbb4790529a1b0a2291699e1
MLKitVision: e858c5f125ecc288e4a31127928301eaba9ae0c1
mobile_scanner: 131a34df36b024cc53457809fb991700f16f72d7
nanopb: 438bc412db1928dac798aa6fd75726007be04262
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef

PODFILE CHECKSUM: 21e78760fee629465f00ee6e1b0ca78764f69ff7
PODFILE CHECKSUM: 7f1e4acaf8036ffd17b53cc1bccdd9d11d323dbd

COCOAPODS: 1.15.2
Loading

0 comments on commit 9876698

Please sign in to comment.