From c4dd509e3210847c0ddba4c7982f38099228a2d6 Mon Sep 17 00:00:00 2001 From: Jagandeep Brar Date: Tue, 14 Jun 2022 17:51:06 -0400 Subject: [PATCH] refactor(environment): load environment using environment_config --- .github/workflows/prepare.yml | 9 +- .gitignore | 1 + .vscode/launch.json | 34 ++-- .vscode/settings.json | 5 - environment_config.yaml | 17 ++ ios/Podfile.lock | 8 +- ios/Runner.xcodeproj/project.pbxproj | 188 +++++++++--------- lib/main.dart | 2 +- .../routes/system/widgets/build_details.dart | 2 +- lib/system/build.dart | 2 +- lib/system/environment.dart | 13 +- lib/{widgets => utils}/changelog/change.dart | 0 .../changelog/changelog.dart | 2 +- lib/{widgets => utils}/changelog/sheet.dart | 4 +- macos/Podfile.lock | 6 + macos/Runner.xcodeproj/project.pbxproj | 68 +++---- package.json | 7 +- pubspec.lock | 20 +- pubspec.yaml | 3 +- 19 files changed, 201 insertions(+), 190 deletions(-) delete mode 100644 .vscode/settings.json create mode 100644 environment_config.yaml rename lib/{widgets => utils}/changelog/change.dart (100%) rename lib/{widgets => utils}/changelog/changelog.dart (91%) rename lib/{widgets => utils}/changelog/sheet.dart (95%) diff --git a/.github/workflows/prepare.yml b/.github/workflows/prepare.yml index 9874e3f7..903ca419 100644 --- a/.github/workflows/prepare.yml +++ b/.github/workflows/prepare.yml @@ -216,9 +216,10 @@ jobs: - name: Generate Environment Configuration run: | - echo FLAVOR=${{ inputs.flavor }} > .env - echo COMMIT=${{ github.sha }} >> .env - echo BUILD=${{ needs.build-details.outputs.build-number }} >> .env + export FLAVOR=${{ inputs.flavor }} + export COMMIT=${{ github.sha }} + export BUILD=${{ needs.build-details.outputs.build-number }} + flutter packages pub run environment_config:generate - name: Generate Localization run: dart ${{github.workspace }}/scripts/generate_localization.dart @@ -231,6 +232,6 @@ jobs: with: name: core-files path: | - ${{ github.workspace }}/.env ${{ github.workspace }}/assets/localization ${{ github.workspace }}/lib/**/*.g.dart + ${{ github.workspace }}/lib/system/environment.dart diff --git a/.gitignore b/.gitignore index ee761004..b7169596 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ ios/Flutter/.last_build_id output/ *.packages coverage/ +lib/system/environment.dart # XCode Build Artifacts ios/build/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 9e9bd9e4..95e677de 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,13 +1,23 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Debug", - "request": "launch", - "type": "dart" - } - ] -} \ No newline at end of file + "version": "0.2.0", + "configurations": [ + { + "name": "Debug", + "request": "launch", + "type": "dart", + "flutterMode": "debug" + }, + { + "name": "Profile", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "Release", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 76fd734a..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "yaml.schemas": { - "https://json.schemastore.org/github-workflow.json": "file:///Users/jagandeepbrar/Git/LunaSea/.github/workflows/deploy.yml" - } -} diff --git a/environment_config.yaml b/environment_config.yaml new file mode 100644 index 00000000..f5ff7b02 --- /dev/null +++ b/environment_config.yaml @@ -0,0 +1,17 @@ +environment_config: + path: system/environment.dart + class: LunaEnvironment + + fields: + build: + type: int + default: 9999999999 + env_var: BUILD + commit: + type: String + default: master + env_var: COMMIT + flavor: + type: String + default: edge + env_var: FLAVOR diff --git a/ios/Podfile.lock b/ios/Podfile.lock index f3b063d0..2afa8515 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -147,9 +147,9 @@ PODS: - PromisesObjC (2.1.0) - quick_actions_ios (0.0.1): - Flutter - - SDWebImage (5.12.5): - - SDWebImage/Core (= 5.12.5) - - SDWebImage/Core (5.12.5) + - SDWebImage (5.12.6): + - SDWebImage/Core (= 5.12.6) + - SDWebImage/Core (5.12.6) - share_plus (0.0.1): - Flutter - shared_preferences_ios (0.0.1): @@ -272,7 +272,7 @@ SPEC CHECKSUMS: path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 PromisesObjC: 99b6f43f9e1044bd87a95a60beff28c2c44ddb72 quick_actions_ios: 622e9076602c57f1f937f1c13e5c59c3379347e9 - SDWebImage: 0905f1b7760fc8ac4198cae0036600d67478751e + SDWebImage: a47aea9e3d8816015db4e523daff50cfd294499d share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 11209016..96ed4f31 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -9,9 +9,9 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 424B7ABEB5E8977E2C9348C9 /* Pods_ImageNotification.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBE50693502CA51C5722409A /* Pods_ImageNotification.framework */; }; + 5434A887647ABEC6103EB104 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35E1EAA92F3E916E1902F78E /* Pods_Runner.framework */; }; + 5C293806CCB6F15071152903 /* Pods_ImageNotification.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64FC0DCF70F3C5B7335D0E53 /* Pods_ImageNotification.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 7CC186B9F7C97544AB5A3652 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E77E818ADBC103F6D1C4AFB /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -57,14 +57,13 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 1BCD1F1FE3F6ADC35307EFFA /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 1DC3657D308C3947A9F2F611 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 35E1EAA92F3E916E1902F78E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 4138476BBE83653B0BA39DBD /* Pods-ImageNotification.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageNotification.debug.xcconfig"; path = "Target Support Files/Pods-ImageNotification/Pods-ImageNotification.debug.xcconfig"; sourceTree = ""; }; - 5E77E818ADBC103F6D1C4AFB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 64FC0DCF70F3C5B7335D0E53 /* Pods_ImageNotification.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ImageNotification.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6CB81CDF7F1BB5EDBF98783A /* Pods-ImageNotification.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageNotification.release.xcconfig"; path = "Target Support Files/Pods-ImageNotification/Pods-ImageNotification.release.xcconfig"; sourceTree = ""; }; + 6D991D6C82D25F7558C8FEB6 /* Pods-ImageNotification.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageNotification.debug.xcconfig"; path = "Target Support Files/Pods-ImageNotification/Pods-ImageNotification.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 790CC1D00BE20DFE7C2083D2 /* Pods-ImageNotification.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageNotification.release.xcconfig"; path = "Target Support Files/Pods-ImageNotification/Pods-ImageNotification.release.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; @@ -73,17 +72,18 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9AAB37E27DC6F093F0868143 /* Pods-ImageNotification.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageNotification.profile.xcconfig"; path = "Target Support Files/Pods-ImageNotification/Pods-ImageNotification.profile.xcconfig"; sourceTree = ""; }; 9C0A396F23E0F00900EC8127 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 9C2991232453FE3100B93AB2 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; + 9C5390CF01F16F725CB284EB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 9C63379625F08BCB00C44AF3 /* Release-ImageNotification.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Release-ImageNotification.xcconfig"; path = "Flutter/Release-ImageNotification.xcconfig"; sourceTree = ""; }; 9C63379725F08BCB00C44AF3 /* Debug-ImageNotification.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Debug-ImageNotification.xcconfig"; path = "Flutter/Debug-ImageNotification.xcconfig"; sourceTree = ""; }; 9C7092AF25E77E470056AE0B /* ImageNotification.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ImageNotification.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 9C7092B125E77E470056AE0B /* NotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationService.h; sourceTree = ""; }; 9C7092B225E77E470056AE0B /* NotificationService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationService.m; sourceTree = ""; }; 9C7092B425E77E470056AE0B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B81386416199320075C0A6F7 /* Pods-ImageNotification.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageNotification.profile.xcconfig"; path = "Target Support Files/Pods-ImageNotification/Pods-ImageNotification.profile.xcconfig"; sourceTree = ""; }; - DBE50693502CA51C5722409A /* Pods_ImageNotification.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ImageNotification.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F661F08997AF1C71DD925940 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + E7A92D2090B76162634652BF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + F7D025102ECEEC1A45D328AC /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -92,7 +92,7 @@ buildActionMask = 2147483647; files = ( 9C2991242453FE3100B93AB2 /* StoreKit.framework in Frameworks */, - 7CC186B9F7C97544AB5A3652 /* Pods_Runner.framework in Frameworks */, + 5434A887647ABEC6103EB104 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -100,7 +100,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 424B7ABEB5E8977E2C9348C9 /* Pods_ImageNotification.framework in Frameworks */, + 5C293806CCB6F15071152903 /* Pods_ImageNotification.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -179,8 +179,8 @@ isa = PBXGroup; children = ( 9C2991232453FE3100B93AB2 /* StoreKit.framework */, - DBE50693502CA51C5722409A /* Pods_ImageNotification.framework */, - 5E77E818ADBC103F6D1C4AFB /* Pods_Runner.framework */, + 64FC0DCF70F3C5B7335D0E53 /* Pods_ImageNotification.framework */, + 35E1EAA92F3E916E1902F78E /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -188,12 +188,12 @@ F5D05D221249C73674C5DB0D /* Pods */ = { isa = PBXGroup; children = ( - 4138476BBE83653B0BA39DBD /* Pods-ImageNotification.debug.xcconfig */, - 790CC1D00BE20DFE7C2083D2 /* Pods-ImageNotification.release.xcconfig */, - B81386416199320075C0A6F7 /* Pods-ImageNotification.profile.xcconfig */, - 1BCD1F1FE3F6ADC35307EFFA /* Pods-Runner.debug.xcconfig */, - 1DC3657D308C3947A9F2F611 /* Pods-Runner.release.xcconfig */, - F661F08997AF1C71DD925940 /* Pods-Runner.profile.xcconfig */, + 6D991D6C82D25F7558C8FEB6 /* Pods-ImageNotification.debug.xcconfig */, + 6CB81CDF7F1BB5EDBF98783A /* Pods-ImageNotification.release.xcconfig */, + 9AAB37E27DC6F093F0868143 /* Pods-ImageNotification.profile.xcconfig */, + 9C5390CF01F16F725CB284EB /* Pods-Runner.debug.xcconfig */, + F7D025102ECEEC1A45D328AC /* Pods-Runner.release.xcconfig */, + E7A92D2090B76162634652BF /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -205,7 +205,7 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 7C0016EE04018FCDF93CC641 /* [CP] Check Pods Manifest.lock */, + C7E8D8A20D3D5129012BF0ED /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, @@ -213,8 +213,8 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 9C7092B825E77E470056AE0B /* Embed App Extensions */, - 913957052D339C057C94DD82 /* [CP] Embed Pods Frameworks */, - 4E567F66AD2DF12CB40B820B /* [CP] Copy Pods Resources */, + 221C2974D2CE9FB71CB82ED2 /* [CP] Embed Pods Frameworks */, + 3499A10A2CE5DC3CB6866B41 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -230,7 +230,7 @@ isa = PBXNativeTarget; buildConfigurationList = 9C7092BC25E77E470056AE0B /* Build configuration list for PBXNativeTarget "ImageNotification" */; buildPhases = ( - D66928A8628A516248435A06 /* [CP] Check Pods Manifest.lock */, + 246FBA830739A192DB0EA916 /* [CP] Check Pods Manifest.lock */, 9C7092AB25E77E470056AE0B /* Sources */, 9C7092AC25E77E470056AE0B /* Frameworks */, 9C7092AD25E77E470056AE0B /* Resources */, @@ -308,61 +308,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 4E567F66AD2DF12CB40B820B /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", - "${PODS_ROOT}/FirebaseFirestore/FirebaseFirestore/Resources/gRPCCertificates-Cpp.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 7C0016EE04018FCDF93CC641 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 913957052D339C057C94DD82 /* [CP] Embed Pods Frameworks */ = { + 221C2974D2CE9FB71CB82ED2 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -430,21 +376,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; - }; - D66928A8628A516248435A06 /* [CP] Check Pods Manifest.lock */ = { + 246FBA830739A192DB0EA916 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -466,6 +398,74 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 3499A10A2CE5DC3CB6866B41 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_ROOT}/FirebaseFirestore/FirebaseFirestore/Resources/gRPCCertificates-Cpp.bundle", + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; + }; + C7E8D8A20D3D5129012BF0ED /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/lib/main.dart b/lib/main.dart index 79368fd0..34dcd823 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,7 +19,7 @@ import 'package:lunasea/system/network/network.dart'; import 'package:lunasea/system/quick_actions/quick_actions.dart'; import 'package:lunasea/system/window_manager/window_manager.dart'; import 'package:lunasea/system/platform.dart'; -import 'package:lunasea/widgets/changelog/sheet.dart'; +import 'package:lunasea/utils/changelog/sheet.dart'; /// LunaSea Entry Point: Initialize & Run Application /// diff --git a/lib/modules/settings/routes/system/widgets/build_details.dart b/lib/modules/settings/routes/system/widgets/build_details.dart index 427ec0f0..a1c74fc4 100644 --- a/lib/modules/settings/routes/system/widgets/build_details.dart +++ b/lib/modules/settings/routes/system/widgets/build_details.dart @@ -5,7 +5,7 @@ import 'package:lunasea/system/environment.dart'; import 'package:lunasea/system/flavor.dart'; import 'package:lunasea/system/platform.dart'; import 'package:lunasea/vendor.dart'; -import 'package:lunasea/widgets/changelog/sheet.dart'; +import 'package:lunasea/utils/changelog/sheet.dart'; import 'package:lunasea/widgets/ui.dart'; class BuildDetails extends ConsumerStatefulWidget { diff --git a/lib/system/build.dart b/lib/system/build.dart index 1f23cfd8..ee29889d 100644 --- a/lib/system/build.dart +++ b/lib/system/build.dart @@ -21,7 +21,7 @@ class LunaBuild { Future> isLatestBuildNumber() async { try { final latest = await LunaPlatform.current.getLatestBuildNumber(); - final current = int.parse(LunaEnvironment.build); + const current = LunaEnvironment.build; return Tuple2(latest > current, latest); } catch (error, stack) { LunaLogger().error( diff --git a/lib/system/environment.dart b/lib/system/environment.dart index cec3d56a..43b3e656 100644 --- a/lib/system/environment.dart +++ b/lib/system/environment.dart @@ -1,10 +1,7 @@ -import 'package:envify/envify.dart'; - -part 'environment.g.dart'; - -@Envify(path: '.env') class LunaEnvironment { - static const flavor = _LunaEnvironment.flavor; - static const commit = _LunaEnvironment.commit; - static const build = _LunaEnvironment.build; + static const int build = 9999999999; + + static const String commit = 'master'; + + static const String flavor = 'stable'; } diff --git a/lib/widgets/changelog/change.dart b/lib/utils/changelog/change.dart similarity index 100% rename from lib/widgets/changelog/change.dart rename to lib/utils/changelog/change.dart diff --git a/lib/widgets/changelog/changelog.dart b/lib/utils/changelog/changelog.dart similarity index 91% rename from lib/widgets/changelog/changelog.dart rename to lib/utils/changelog/changelog.dart index 349328ad..74871f99 100644 --- a/lib/widgets/changelog/changelog.dart +++ b/lib/utils/changelog/changelog.dart @@ -1,5 +1,5 @@ import 'package:lunasea/vendor.dart'; -import 'package:lunasea/widgets/changelog/change.dart'; +import 'package:lunasea/utils/changelog/change.dart'; part 'changelog.g.dart'; diff --git a/lib/widgets/changelog/sheet.dart b/lib/utils/changelog/sheet.dart similarity index 95% rename from lib/widgets/changelog/sheet.dart rename to lib/utils/changelog/sheet.dart index c9f89426..b386846a 100644 --- a/lib/widgets/changelog/sheet.dart +++ b/lib/utils/changelog/sheet.dart @@ -4,8 +4,8 @@ import 'package:lunasea/extensions/string/string.dart'; import 'package:lunasea/system/logger.dart'; import 'package:lunasea/utils/links.dart'; import 'package:lunasea/vendor.dart'; -import 'package:lunasea/widgets/changelog/change.dart'; -import 'package:lunasea/widgets/changelog/changelog.dart'; +import 'package:lunasea/utils/changelog/change.dart'; +import 'package:lunasea/utils/changelog/changelog.dart'; import 'package:lunasea/widgets/ui.dart'; class ChangelogSheet extends LunaBottomModalSheet { diff --git a/macos/Podfile.lock b/macos/Podfile.lock index fe2badbc..c19d9b49 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -111,6 +111,8 @@ PODS: - path_provider_macos (0.0.1): - FlutterMacOS - PromisesObjC (2.1.0) + - screen_retriever (0.0.1): + - FlutterMacOS - share_plus_macos (0.0.1): - FlutterMacOS - shared_preferences_macos (0.0.1): @@ -133,6 +135,7 @@ DEPENDENCIES: - FlutterMacOS (from `Flutter/ephemeral`) - package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`) - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) + - screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`) - share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`) - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`) @@ -175,6 +178,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos path_provider_macos: :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos + screen_retriever: + :path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos share_plus_macos: :path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos shared_preferences_macos: @@ -214,6 +219,7 @@ SPEC CHECKSUMS: package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 PromisesObjC: 99b6f43f9e1044bd87a95a60beff28c2c44ddb72 + screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38 share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727 sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 53138c90..4e743b0c 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -21,12 +21,12 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 2F600FE3F62402782192436B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DB48EBCA5A47F2E6F79DDFF /* Pods_Runner.framework */; }; 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 55FFADED2933301E97B1BABB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A30F9665A09254A75E06F9FF /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -53,7 +53,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 1097536DBD513F9C322FD573 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 187DB9BA0B8AAA6BED9BF820 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; 33CC10ED2044A3C60003C045 /* LunaSea.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LunaSea.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -69,10 +69,10 @@ 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 7DB48EBCA5A47F2E6F79DDFF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 840D2EFF54BB8BA5C48160C9 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - A30F9665A09254A75E06F9FF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBC15298573357D95D4D0A99 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - E6DC3F27087615BE6F68C8AF /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + ECCFC5F4CC999172FEEF8738 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -80,7 +80,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 55FFADED2933301E97B1BABB /* Pods_Runner.framework in Frameworks */, + 2F600FE3F62402782192436B /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -105,7 +105,7 @@ 33CEB47122A05771004F2AC0 /* Flutter */, 33CC10EE2044A3C60003C045 /* Products */, C16DBC6D5885D252E3ED5BAD /* Pods */, - 8F5EB1A4A52EE9E8FC5A9A78 /* Frameworks */, + 9981D0ECE95A3641B5BDD4CB /* Frameworks */, ); sourceTree = ""; }; @@ -152,10 +152,10 @@ path = Runner; sourceTree = ""; }; - 8F5EB1A4A52EE9E8FC5A9A78 /* Frameworks */ = { + 9981D0ECE95A3641B5BDD4CB /* Frameworks */ = { isa = PBXGroup; children = ( - A30F9665A09254A75E06F9FF /* Pods_Runner.framework */, + 7DB48EBCA5A47F2E6F79DDFF /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -163,9 +163,9 @@ C16DBC6D5885D252E3ED5BAD /* Pods */ = { isa = PBXGroup; children = ( - E6DC3F27087615BE6F68C8AF /* Pods-Runner.debug.xcconfig */, - BBC15298573357D95D4D0A99 /* Pods-Runner.release.xcconfig */, - 1097536DBD513F9C322FD573 /* Pods-Runner.profile.xcconfig */, + ECCFC5F4CC999172FEEF8738 /* Pods-Runner.debug.xcconfig */, + 187DB9BA0B8AAA6BED9BF820 /* Pods-Runner.release.xcconfig */, + 840D2EFF54BB8BA5C48160C9 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -177,14 +177,14 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - A5593BAE096AEA0201DAAB81 /* [CP] Check Pods Manifest.lock */, + B8F3EB307248E7051FBCDFB5 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, - 17DFD4E1D82334F1A6A6FCFC /* [CP] Embed Pods Frameworks */, - F6073140124ACCDD312AEF35 /* [CP] Copy Pods Resources */, + 2C421D662824C5B857818933 /* [CP] Embed Pods Frameworks */, + 55ADDF159E358E6038CD610E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -253,7 +253,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 17DFD4E1D82334F1A6A6FCFC /* [CP] Embed Pods Frameworks */ = { + 2C421D662824C5B857818933 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -307,7 +307,24 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - A5593BAE096AEA0201DAAB81 /* [CP] Check Pods Manifest.lock */ = { + 55ADDF159E358E6038CD610E /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + B8F3EB307248E7051FBCDFB5 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -329,23 +346,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - F6073140124ACCDD312AEF35 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/package.json b/package.json index 391a8c71..3d9ad6c6 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,12 @@ "fastlane:update:android": "cd android && bundle update", "fastlane:update:ios": "cd ios && bundle update", "fastlane:update:macos": "cd macos && bundle update", - "generate": "npm run generate:assets && npm run generate:build_runner && npm run generate:localization", + "generate": "npm run generate:environment && npm run generate:assets && npm run generate:build_runner && npm run generate:localization", "generate:assets": "dart pub global activate spider && spider build", "generate:build_runner": "flutter packages pub run build_runner build", + "generate:environment": "flutter pub run environment_config:generate", "generate:localization": "dart ./scripts/generate_localization.dart", - "git:ignore": "npm run git:ignore:environment && npm run git:ignore:firebase", - "git:ignore:environment": "git update-index --skip-worktree .env", - "git:ignore:firebase": "git update-index --skip-worktree lib/firebase/options.dart", + "git:ignore": "git update-index --skip-worktree lib/firebase/options.dart", "prepare": "husky install && npm run git:ignore && flutter pub get", "prepare:keychain": "npm run prepare:keychain:ios && npm run prepare:keychain:macos", "prepare:keychain:ios": "cd ios && bundle exec fastlane keychain_create && bundle exec fastlane keychain_setup", diff --git a/pubspec.lock b/pubspec.lock index a6ea99b7..ab5f0600 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -246,13 +246,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.6" - dotenv: - dependency: transitive - description: - name: dotenv - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" easy_localization: dependency: "direct main" description: @@ -281,20 +274,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.0.1" - envify: - dependency: "direct main" - description: - name: envify - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - envify_generator: + environment_config: dependency: "direct dev" description: - name: envify_generator + name: environment_config url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.1.0" equatable: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9d20aa6c..c322fa2c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,6 @@ dependencies: easy_localization: ^3.0.1 email_validator: ^2.0.1 encrypt: ^5.0.1 - envify: ^2.0.2 expandable: ^5.0.1 fading_edge_scrollview: ^3.0.0 file_picker: ^4.6.1 @@ -65,7 +64,7 @@ dependencies: dev_dependencies: # Generators build_runner: ^2.1.11 - envify_generator: ^2.0.2 + environment_config: ^3.1.0 json_serializable: ^6.2.0 hive_generator: ^1.1.3 retrofit_generator: ^4.0.1