-
Notifications
You must be signed in to change notification settings - Fork 689
refactor(fastlane): Adapted the Fastlane configurations from the KMP Project Template. #2579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7ed8531
Adapted the Fastlane configurations from the KMP Project Template.
techsavvy185 6f4fd4f
Adjusted the FastFile to match the latest changes in the KMP template.
techsavvy185 718e13c
Merge branch 'development' into fastlane
techsavvy185 787a2b5
Merge branch 'development' into fastlane
niyajali 005cb08
Adjusted the Configs to match the latest changes in the KMP template.
techsavvy185 ea19810
Merge remote-tracking branch 'origin/fastlane' into fastlane
techsavvy185 637e956
Merge branch 'development' into fastlane
techsavvy185 35d46de
Merge branch 'development' into fastlane
techsavvy185 3a1fab1
Merge branch 'development' into fastlane
therajanmaurya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,25 @@ | ||
| require_relative 'project_config' | ||
|
|
||
| module FastlaneConfig | ||
| module AndroidConfig | ||
| STORE_CONFIG = { | ||
| default_store_file: "release_keystore.keystore", | ||
| default_store_password: "mifos1234", | ||
| default_key_alias: "mifos", | ||
| default_key_password: "mifos1234" | ||
| default_store_file: ProjectConfig::ANDROID[:keystore][:file], | ||
| default_store_password: ProjectConfig::ANDROID[:keystore][:password], | ||
| default_key_alias: ProjectConfig::ANDROID[:keystore][:key_alias], | ||
| default_key_password: ProjectConfig::ANDROID[:keystore][:key_password] | ||
| } | ||
|
|
||
| FIREBASE_CONFIG = { | ||
| firebase_prod_app_id: "1:728434912738:android:ecdb5b96f0e735661a1dbb", | ||
| firebase_demo_app_id: "1:728434912738:android:53d0930e402622611a1dbb", | ||
| firebase_service_creds_file: "secrets/firebaseAppDistributionServiceCredentialsFile.json", | ||
| firebase_groups: "mifos-mobile-apps" | ||
| firebase_prod_app_id: ProjectConfig::ANDROID[:firebase][:prod_app_id], | ||
| firebase_demo_app_id: ProjectConfig::ANDROID[:firebase][:demo_app_id], | ||
| firebase_service_creds_file: ProjectConfig.firebase_credentials_file, | ||
| firebase_groups: ProjectConfig::ANDROID[:firebase][:groups] | ||
| } | ||
|
|
||
| BUILD_PATHS = { | ||
| prod_apk_path: "cmp-android/build/outputs/apk/prod/release/cmp-android-prod-release.apk", | ||
| demo_apk_path: "cmp-android/build/outputs/apk/demo/release/cmp-android-demo-release.apk", | ||
| prod_aab_path: "cmp-android/build/outputs/bundle/prodRelease/cmp-android-prod-release.aab" | ||
| prod_apk_path: ProjectConfig::ANDROID[:apk_paths][:prod], | ||
| demo_apk_path: ProjectConfig::ANDROID[:apk_paths][:demo], | ||
| prod_aab_path: ProjectConfig::ANDROID[:aab_path] | ||
| } | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| #!/usr/bin/env ruby | ||
| # ============================================================================== | ||
| # iOS Configuration Extraction Script for GitHub Actions | ||
| # ============================================================================== | ||
| # This script extracts iOS configuration from project_config.rb and outputs | ||
| # it as JSON for consumption by GitHub Actions workflows. | ||
| # | ||
| # Usage: | ||
| # ruby fastlane-config/extract_config.rb | ||
| # | ||
| # Output: | ||
| # JSON object with iOS configuration values | ||
| # ============================================================================== | ||
|
|
||
| require 'json' | ||
| require_relative 'project_config' | ||
|
|
||
| begin | ||
| # Extract iOS configuration from project_config.rb | ||
| config = { | ||
| # App-specific configuration (from IOS) | ||
| app_identifier: FastlaneConfig::ProjectConfig::IOS[:app_identifier], | ||
| firebase_app_id: FastlaneConfig::ProjectConfig::IOS[:firebase][:app_id], | ||
| firebase_groups: FastlaneConfig::ProjectConfig::IOS[:firebase][:groups], | ||
| metadata_path: FastlaneConfig::ProjectConfig::IOS[:metadata_path], | ||
| version_number: FastlaneConfig::ProjectConfig::IOS[:version_number], | ||
|
|
||
| # Shared configuration (from IOS_SHARED) | ||
| team_id: FastlaneConfig::ProjectConfig::IOS_SHARED[:team_id], | ||
| match_git_url: FastlaneConfig::ProjectConfig::IOS_SHARED[:code_signing][:match_git_url], | ||
| match_git_branch: FastlaneConfig::ProjectConfig::IOS_SHARED[:code_signing][:match_git_branch], | ||
| match_type: FastlaneConfig::ProjectConfig::IOS_SHARED[:code_signing][:match_type], | ||
|
|
||
| # Dynamically computed provisioning profiles | ||
| provisioning_profile_adhoc: FastlaneConfig::ProjectConfig::IOS_SHARED[:code_signing][:provisioning_profiles][:adhoc], | ||
| provisioning_profile_appstore: FastlaneConfig::ProjectConfig::IOS_SHARED[:code_signing][:provisioning_profiles][:appstore] | ||
| } | ||
|
|
||
| # Output as pretty-printed JSON | ||
| puts JSON.pretty_generate(config) | ||
|
|
||
| # Exit successfully | ||
| exit 0 | ||
|
|
||
| rescue => e | ||
| # Error handling | ||
| STDERR.puts "Error extracting iOS configuration:" | ||
| STDERR.puts " #{e.class}: #{e.message}" | ||
| STDERR.puts | ||
| STDERR.puts "Stack trace:" | ||
| e.backtrace.each { |line| STDERR.puts " #{line}" } | ||
| STDERR.puts | ||
| STDERR.puts "Please ensure:" | ||
| STDERR.puts " 1. fastlane-config/project_config.rb exists and is valid Ruby" | ||
| STDERR.puts " 2. Both IOS and IOS_SHARED configurations are defined" | ||
| STDERR.puts " 3. All required keys are present in the configuration" | ||
|
|
||
| # Exit with error | ||
| exit 1 | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,50 @@ | ||
| require_relative 'project_config' | ||
|
|
||
| module FastlaneConfig | ||
| module IosConfig | ||
| # Firebase Configuration (reads from IOS) | ||
| FIREBASE_CONFIG = { | ||
| firebase_app_id: "1:728434912738:ios:shjhsa78392shja", | ||
| firebase_service_creds_file: "secrets/firebaseAppDistributionServiceCredentialsFile.json", | ||
| firebase_groups: "mifos-mobile-apps" | ||
| firebase_app_id: ProjectConfig::IOS[:firebase][:app_id], | ||
| firebase_service_creds_file: ProjectConfig.firebase_credentials_file, | ||
| firebase_groups: ProjectConfig::IOS[:firebase][:groups] | ||
| } | ||
|
|
||
| # Build Configuration (reads from both IOS and IOS_SHARED) | ||
| BUILD_CONFIG = { | ||
| project_path: "cmp-ios/iosApp.xcodeproj", | ||
| scheme: "iosApp", | ||
| output_directory: "cmp-ios/build" | ||
| # App-specific (from IOS) | ||
| app_identifier: ProjectConfig::IOS[:app_identifier], | ||
| project_path: ProjectConfig::IOS[:project_path], | ||
| workspace_path: ProjectConfig::IOS[:workspace_path], | ||
| plist_path: ProjectConfig::IOS[:plist_path], | ||
| scheme: ProjectConfig::IOS[:scheme], | ||
| output_name: ProjectConfig::IOS[:output_name], | ||
| output_directory: ProjectConfig::IOS[:output_directory], | ||
| version_number: ProjectConfig::IOS[:version_number], | ||
| metadata_path: ProjectConfig::IOS[:metadata_path], | ||
| app_rating_config_path: ProjectConfig::IOS[:age_rating_config_path], | ||
|
|
||
| # Shared (from IOS_SHARED) | ||
| team_id: ProjectConfig::IOS_SHARED[:team_id], | ||
| ci_provider: ProjectConfig::IOS_SHARED[:ci_provider], | ||
|
|
||
| # App Store Connect API (from IOS_SHARED) | ||
| key_id: ProjectConfig::IOS_SHARED[:app_store_connect][:key_id], | ||
| issuer_id: ProjectConfig::IOS_SHARED[:app_store_connect][:issuer_id], | ||
| key_filepath: ProjectConfig::IOS_SHARED[:app_store_connect][:key_filepath], | ||
|
|
||
| # Code Signing & Match (from IOS_SHARED) | ||
| match_type: ProjectConfig::IOS_SHARED[:code_signing][:match_type], | ||
| match_git_private_key: ProjectConfig::IOS_SHARED[:code_signing][:match_git_private_key], | ||
| git_url: ProjectConfig::IOS_SHARED[:code_signing][:match_git_url], | ||
| git_branch: ProjectConfig::IOS_SHARED[:code_signing][:match_git_branch], | ||
| provisioning_profile_name: ProjectConfig::IOS_SHARED[:code_signing][:provisioning_profiles][:adhoc], | ||
| provisioning_profile_appstore: ProjectConfig::IOS_SHARED[:code_signing][:provisioning_profiles][:appstore] | ||
| } | ||
|
|
||
| # TestFlight Configuration (from IOS_SHARED) | ||
| TESTFLIGHT_CONFIG = ProjectConfig::IOS_SHARED[:testflight] | ||
|
|
||
| # App Store Configuration (from IOS_SHARED) | ||
| APPSTORE_CONFIG = ProjectConfig::IOS_SHARED[:appstore] | ||
| end | ||
| end | ||
| end | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.