Skip to content

Commit

Permalink
Merge branch 'main' into sidhdhi/fix-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sidhdhi-p committed Jun 19, 2024
2 parents 1db4da9 + 5dd3067 commit 85cc868
Show file tree
Hide file tree
Showing 17 changed files with 100 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- uses: subosito/[email protected]
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: 17.0.6
cache: 'gradle'

Expand All @@ -32,7 +33,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundle-cache: true
bundler-cache: true

- name: Retrieve the secret and decode it to file
env:
Expand Down Expand Up @@ -72,10 +73,12 @@ jobs:
buildName="${versionValue[0]}.${versionValue[1]}.${{ github.run_number }}"
echo "Generating android build $buildName $buildNumber"
flutter build apk --release --build-number=$buildNumber --build-name=$buildName
mv build/app/outputs/apk/release/Khelo*.apk .
cd ..
mv khelo/build/app/outputs/apk/release/Khelo*.apk .
- name: Upload APK Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Khelo APK
path: Khelo*.apk
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/android_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: 17.0.6
cache: 'gradle'

Expand All @@ -32,7 +33,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundle-cache: true
bundler-cache: true

- name: Retrieve the secret and decode it to file
env:
Expand All @@ -43,7 +44,7 @@ jobs:
cd khelo
echo $FIREBASE_OPTIONS_BASE64 | base64 -di > lib/firebase_options.dart
echo $GOOGLE_SERVICES_JSON_BASE64 | base64 -di > android/app/google-services.json
- name: Install Dependencies
run: |
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/ios_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Publish to App Store Connect
on: push
jobs:
build:
runs-on: macos-13
runs-on: macos-latest

env:
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
Expand All @@ -21,7 +21,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.4'

- name: Set up Flutter
uses: subosito/flutter-action@v2
Expand All @@ -34,10 +39,12 @@ jobs:
env:
FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }}
GOOGLE_SERVICE_INFO_PLIST_BASE64: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}
FIREBASE_JSON_BASE64: ${{ secrets.FIREBASE_JSON_BASE64 }}
run: |
cd khelo
echo $FIREBASE_OPTIONS_BASE64 | base64 --decode > lib/firebase_options.dart
echo $GOOGLE_SERVICE_INFO_PLIST_BASE64 | base64 --decode > ios/Runner/GoogleService-Info.plist
echo $FIREBASE_JSON_BASE64 | base64 --decode > firebase.json
- name: Install Dependencies
run: |
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion khelo/android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ platform :android do
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_apk: true,
release_status: 'draft',
aab: '../build/app/outputs/bundle/release/app-release.aab',
skip_upload_screenshots: true)
end
Expand Down
3 changes: 3 additions & 0 deletions khelo/assets/images/ic_save.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 23 additions & 6 deletions khelo/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
203168372BBFD3E7005953C0 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
20E4EAC22BB7FBF4001FD0E5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
36A9CDDD30BEEFAAB87A6822 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3D888651C4C3408C09E3A9AD /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
5795302B2BF60A4D006B7A32 /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = "<group>"; };
6FD9FFBCB662585BD6C8FCE0 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
71018C381C9FB1881222C2AE /* 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 = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
Expand All @@ -65,6 +63,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9B3323CC2C1C61D20053F1A5 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
AEF4D4C9FDEA72B8A3FCA32B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B19091D2B4A27468EAE2E443 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
BDAD34F0A6EFF59B2672A5ED /* 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 = "<group>"; };
Expand Down Expand Up @@ -137,8 +136,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
5795302B2BF60A4D006B7A32 /* RunnerRelease.entitlements */,
203168372BBFD3E7005953C0 /* Runner.entitlements */,
9B3323CC2C1C61D20053F1A5 /* Runner.entitlements */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -207,6 +205,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
48DBE20C4FFA0C6093DF577D /* [CP] Embed Pods Frameworks */,
C7BD899DCC0D6933A79BD0BB /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
Expand Down Expand Up @@ -349,6 +348,24 @@
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;
};
C7BD899DCC0D6933A79BD0BB /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
FE21343C7A9976ADFB4BEB1B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -698,12 +715,12 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = S985H2T7J8;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = S985H2T7J8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
Expand Down
16 changes: 0 additions & 16 deletions khelo/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
import UIKit
import Flutter
import Firebase
import FirebaseAuth

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let firebaseAuth = Auth.auth()
firebaseAuth.setAPNSToken(deviceToken, type: AuthAPNSTokenType.unknown)
}

override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
let firebaseAuth = Auth.auth()
if (firebaseAuth.canHandleNotification(userInfo)){
print(userInfo)
return
}
}
}
5 changes: 4 additions & 1 deletion khelo/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<key>CFBundleURLSchemes</key>
<array>
<string>app-1-753506519474-ios-8cd38557e090c0b51e7cab</string>
<string>com.googleusercontent.apps.753506519474-6qolf71653023s197ur4ag97q2lvaf9r</string>
</array>
</dict>
</array>
Expand All @@ -46,6 +45,10 @@
<string>Select a profile image from your device's gallery to showcase your preferred photo in moments of your choice.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
5 changes: 4 additions & 1 deletion khelo/ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
8 changes: 0 additions & 8 deletions khelo/ios/Runner/RunnerRelease.entitlements

This file was deleted.

4 changes: 4 additions & 0 deletions khelo/lib/gen/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions khelo/lib/ui/flow/matches/add_match/add_match_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ class _AddMatchScreenState extends ConsumerState<AddMatchScreen> {
context: context,
error: saveBtnError.getString(context),
),
icon: Icon(
Icons.alarm,
color: saveBtnError == null
? context.colorScheme.primary
: context.colorScheme.textDisabled,
icon: SvgPicture.asset(
Assets.images.icSave,
width: 24,
height: 24,
colorFilter: ColorFilter.mode(
saveBtnError == null
? context.colorScheme.primary
: context.colorScheme.textDisabled,
BlendMode.srcIn),
),
);
}
Expand Down
35 changes: 9 additions & 26 deletions khelo/lib/ui/flow/my_game/my_game_tab_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:khelo/ui/flow/my_game/my_game_tab_view_model.dart';
import 'package:khelo/ui/flow/team/team_list_screen.dart';
import 'package:khelo/ui/flow/team/team_list_view_model.dart';
import 'package:style/button/action_button.dart';
import 'package:style/button/large_icon_button.dart';
import 'package:style/button/tab_button.dart';
import 'package:style/extensions/context_extensions.dart';

Expand Down Expand Up @@ -71,10 +70,6 @@ class _MyGameTabScreenState extends ConsumerState<MyGameTabScreen>
final notifier = ref.watch(myGameTabViewStateProvider.notifier);

return AppPage(
floatingActionButton: Visibility(
visible: _selectedTab == 0,
child: _floatingAddButton(context),
),
body: Builder(
builder: (context) {
return _content(context, notifier);
Expand Down Expand Up @@ -105,9 +100,10 @@ class _MyGameTabScreenState extends ConsumerState<MyGameTabScreen>

Widget _tabView(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
padding: const EdgeInsets.symmetric(vertical: 8),
child: Row(
children: [
const SizedBox(width: 16),
TabButton(
context.l10n.common_matches_title,
selected: _selectedTab == 0,
Expand All @@ -123,35 +119,22 @@ class _MyGameTabScreenState extends ConsumerState<MyGameTabScreen>
_controller.jumpToPage(1);
},
),
const Spacer(),
if (_selectedTab == 1) ...[
const Spacer(),
actionButton(context,
onPressed: () => ref
.read(teamListViewStateProvider.notifier)
.onFilterButtonTap(),
icon: Icon(CupertinoIcons.slider_horizontal_3,
color: context.colorScheme.primary)),
actionButton(context,
onPressed: () => AppRoute.addTeam().push(context),
icon: Icon(Icons.add, color: context.colorScheme.primary)),
]
],
actionButton(context,
onPressed: () => _selectedTab == 1
? AppRoute.addTeam().push(context)
: AppRoute.addMatch().push(context),
icon: Icon(Icons.add, color: context.colorScheme.primary)),
],
),
);
}

Widget _floatingAddButton(
BuildContext context,
) {
return LargeIconButton(
backgroundColor: context.colorScheme.primary,
onTap: () async {
AppRoute.addMatch().push(context);
},
icon: Icon(
Icons.add_rounded,
color: context.colorScheme.onPrimary,
),
);
}
}
Loading

0 comments on commit 85cc868

Please sign in to comment.