ann-flutter-flavor 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +271 -0
  5. data/Rakefile +6 -0
  6. data/ann-flutter-flavor.gemspec +25 -0
  7. data/lib/ann-flutter-flavor.rb +10 -0
  8. data/lib/ann_flutter_flavor/version.rb +3 -0
  9. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_compile_build_action.rb +219 -0
  10. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_download_from_app_store_action.rb +183 -0
  11. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_download_from_play_store_action.rb +168 -0
  12. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_emulators_action.rb +180 -0
  13. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_run_tests_action.rb +128 -0
  14. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb +137 -0
  15. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_upload_to_app_store_action.rb +280 -0
  16. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_upload_to_firebase_action.rb +199 -0
  17. data/lib/fastlane/plugin/ann_flutter_flavor/actions/ann_upload_to_play_store_action.rb +248 -0
  18. data/lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_android.rb +120 -0
  19. data/lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_annai.rb +502 -0
  20. data/lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb +157 -0
  21. data/lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_setup.rb +161 -0
  22. data/lib/fastlane/plugin/ann_flutter_flavor/helper/podspec_bridge.rb +153 -0
  23. data/lib/fastlane/plugin/ann_flutter_flavor/helper/test_integration.rb +346 -0
  24. data/lib/fastlane/plugin/ann_flutter_flavor/helper/utils_project_config.rb +96 -0
  25. data/lib/fastlane/plugin/ann_flutter_flavor/helper/utils_spec_loader.rb +363 -0
  26. data/lib/fastlane/plugin/ann_flutter_flavor/helper/utils_status.rb +115 -0
  27. data/lib/fastlane/plugin/ann_flutter_flavor.rb +23 -0
  28. data/plugin_manager.sh +140 -0
  29. metadata +112 -0
data/plugin_manager.sh ADDED
@@ -0,0 +1,140 @@
1
+ #!/bin/zsh
2
+
3
+ # --- Fastlane Plugin Manager Script (Zsh) ---
4
+ # Use this script to manage the build, local installation, and cleanup of the Fastlane plugin.
5
+ #
6
+ # Usage: ./plugin_manager.sh {action} [action2] [...]
7
+ # Actions can be combined and separated by commas:
8
+ # Example: ./plugin_manager.sh clean,build,install
9
+ # Example: ./plugin_manager.sh build install
10
+ #
11
+ # Note: 'build' is now a pure build function; use 'clean,build' to clean first.
12
+
13
+ # Set -e: Exit immediately if a command exits with a non-zero status.
14
+ set -e
15
+
16
+ # --- Configuration ---
17
+ PLUGIN_NAME="annai-flutter-flavor"
18
+
19
+ # --- Functions ---
20
+
21
+ # Function to clean the built artifacts and uninstall the gem
22
+ clean() {
23
+ echo "-------------------------------------"
24
+ echo " STARTING: Plugin CLEAN Process"
25
+ echo "-------------------------------------"
26
+
27
+ # 1. Uninstall the locally installed gem
28
+ echo "--> Attempting to UNINSTALL local gem: $PLUGIN_NAME..."
29
+ # The 'gem uninstall' command will return a non-zero exit code if the gem is not found.
30
+ # To prevent 'set -e' from exiting the script, we check if the gem is installed first
31
+ # or suppress the error using '|| true'. Using a conditional check is cleaner.
32
+ if gem list -i $PLUGIN_NAME; then
33
+ # --all: Uninstall all versions of the gem
34
+ # -I: Ignore dependencies (speeds up the process)
35
+ gem uninstall $PLUGIN_NAME --all --ignore-dependencies
36
+ echo "SUCCESS: Local gem uninstalled."
37
+ else
38
+ echo "Gem $PLUGIN_NAME not found installed locally. Skipping uninstall."
39
+ fi
40
+
41
+ # 2. Remove built gem files
42
+ # Check if any .gem files exist in the pkg directory
43
+ if ls pkg/*.gem 1> /dev/null 2>&1; then
44
+ echo "--> Removing built gem files from 'pkg/'..."
45
+ rm -rf pkg/*.gem
46
+ echo "SUCCESS: Build artifacts removed."
47
+ else
48
+ echo "No .gem files found in 'pkg/'. Nothing to clean."
49
+ fi
50
+
51
+ echo "-------------------------------------"
52
+ echo " CLEAN Process COMPLETE"
53
+ echo "-------------------------------------"
54
+ }
55
+
56
+ # Function to build the gem
57
+ build() {
58
+ echo "-------------------------------------"
59
+ echo " STARTING: Plugin BUILD Process"
60
+ echo "-------------------------------------"
61
+
62
+ # 1. Install/Update Dependencies
63
+ echo "--> Running bundle install (Output from Bundler below)..."
64
+ bundle install
65
+
66
+ # 2. Build the Gem
67
+ echo "\n--> Running rake build (Output from Rake below)..."
68
+ rake build
69
+
70
+ # $? is the exit code of the last command
71
+ if [[ $? -ne 0 ]]; then
72
+ echo "\nERROR: Gem build failed. Check the output above."
73
+ exit 1
74
+ fi
75
+
76
+ echo "\nSUCCESS: Build complete. Gem file is in the 'pkg/' directory."
77
+ }
78
+
79
+ # Function to find and install the latest built gem
80
+ install() {
81
+ echo "-------------------------------------"
82
+ echo " STARTING: Plugin INSTALL Process"
83
+ echo "-------------------------------------"
84
+
85
+ # Find the built gem file dynamically:
86
+ # ls -t lists by time (newest first).
87
+ GEM_FILE=$(ls -t pkg/*.gem 2>/dev/null | head -1)
88
+
89
+ # Check if a gem file was found
90
+ if [[ -z "$GEM_FILE" ]]; then
91
+ echo "ERROR: Could not find any built gem files in the 'pkg/' directory."
92
+ echo "Please ensure you ran 'build' before 'install'."
93
+ exit 1
94
+ fi
95
+
96
+ # 1. Install the Gem
97
+ echo "--> Installing the latest built gem: $GEM_FILE (Output from gem below)..."
98
+ # The --force flag ensures it installs, even if an older version is already installed.
99
+ gem install "$GEM_FILE" --force
100
+
101
+ echo "\nSUCCESS: Local installation complete."
102
+ }
103
+
104
+ # --- Main Script Execution ---
105
+
106
+ # Combine all arguments into a single string and replace commas with spaces.
107
+ # Then, use zsh's `$=` parameter expansion to split the string into an array of actions.
108
+ # This handles both: `./plugin_manager.sh clean,build` AND `./plugin_manager.sh clean build`
109
+ ACTION_STRING="${*}"
110
+ ACTION_LIST=(${(s/,/)ACTION_STRING})
111
+
112
+ if [[ ${#ACTION_LIST} -eq 0 ]]; then
113
+ # If no arguments are provided, show usage.
114
+ ACTION_LIST=("INVALID")
115
+ fi
116
+
117
+ for ACTION in "${ACTION_LIST[@]}"; do
118
+ case $ACTION in
119
+ clean)
120
+ clean
121
+ ;;
122
+ build)
123
+ build
124
+ ;;
125
+ install)
126
+ install
127
+ ;;
128
+ *)
129
+ # If an invalid action is provided, show usage and exit the script.
130
+ echo "--------------------------------------------------------"
131
+ echo "Invalid or missing script option(s)."
132
+ echo "Usage: ./plugin_manager.sh {action} [action2] [...]"
133
+ echo "Valid actions: clean, build, install"
134
+ echo "Example: ./plugin_manager.sh clean,build,install"
135
+ echo "Example: ./plugin_manager.sh build install"
136
+ echo "--------------------------------------------------------"
137
+ exit 1
138
+ ;;
139
+ esac
140
+ done
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ann-flutter-flavor
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - ANN Solutions
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2026-06-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fastlane
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.232.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.232.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.4.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.4.0
55
+ description:
56
+ email:
57
+ - support@annaibrands.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - Gemfile.lock
65
+ - Rakefile
66
+ - ann-flutter-flavor.gemspec
67
+ - lib/ann-flutter-flavor.rb
68
+ - lib/ann_flutter_flavor/version.rb
69
+ - lib/fastlane/plugin/ann_flutter_flavor.rb
70
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_compile_build_action.rb
71
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_download_from_app_store_action.rb
72
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_download_from_play_store_action.rb
73
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_emulators_action.rb
74
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_run_tests_action.rb
75
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_setup_action.rb
76
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_upload_to_app_store_action.rb
77
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_upload_to_firebase_action.rb
78
+ - lib/fastlane/plugin/ann_flutter_flavor/actions/ann_upload_to_play_store_action.rb
79
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_android.rb
80
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_annai.rb
81
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb
82
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_setup.rb
83
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/podspec_bridge.rb
84
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/test_integration.rb
85
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/utils_project_config.rb
86
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/utils_spec_loader.rb
87
+ - lib/fastlane/plugin/ann_flutter_flavor/helper/utils_status.rb
88
+ - plugin_manager.sh
89
+ homepage: https://github.com/anntech-dev
90
+ licenses:
91
+ - MIT
92
+ metadata: {}
93
+ post_install_message:
94
+ rdoc_options: []
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubygems_version: 3.4.19
109
+ signing_key:
110
+ specification_version: 4
111
+ summary: A fastlane plugin to manage Flutter build flavors and shared setup.
112
+ test_files: []