ann-flavor-flutter 0.1.12 → 0.1.13
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16d7f58e4027292d95f6a258d4ff3c3ac7b26b76c6cfc60c9406af289fa97fdc
|
|
4
|
+
data.tar.gz: 4027de193deef4a6293fef30bf505fe57412f82255dcc7d036b62c6de28d55d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19f6a97ecde33b1d933bf4ae0e4a0e7016214a04c0f52c9d5940cc0625a04637ad65b0fd87fdf1be848843e20b23bbb110135c41a33b99fb59a04ac07199c26e
|
|
7
|
+
data.tar.gz: 1972bfc4ba0b631a6551214620d5f94afff4e2d2871ee4229cc9024e60216ec57ce2475e316bc312f733cef12853a54fc4d1fa4b26d71cc39b0f5bf6586fd368
|
|
@@ -71,6 +71,11 @@ module FastlaneFlutterFlavor
|
|
|
71
71
|
return current_data
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
+
def enabled?
|
|
75
|
+
return false unless @spec_data
|
|
76
|
+
@spec_data.fetch('enabled', true) != false
|
|
77
|
+
end
|
|
78
|
+
|
|
74
79
|
# Retrieves the configuration for a specific flavor, merged with the platform defaults.
|
|
75
80
|
# This function uses the spec data loaded into the instance variable @spec_data.
|
|
76
81
|
#
|
|
@@ -78,7 +83,7 @@ module FastlaneFlutterFlavor
|
|
|
78
83
|
# @param flavor_name [String] The name of the flavor (e.g., 'dev', 'staging').
|
|
79
84
|
# @return [Hash, nil] The fully merged configuration for the flavor, or nil if missing.
|
|
80
85
|
def get_merged_flavor_config(platform, flavor_name)
|
|
81
|
-
return nil unless @spec_data
|
|
86
|
+
return nil unless @spec_data && enabled?
|
|
82
87
|
|
|
83
88
|
platform_key = platform.to_s
|
|
84
89
|
flavor_key = flavor_name.to_s
|
|
@@ -120,7 +125,7 @@ module FastlaneFlutterFlavor
|
|
|
120
125
|
# @param platform [Symbol] The target platform (:ios or :android).
|
|
121
126
|
# @return [Hash] A hash where keys are flavor names (String) and values are their raw configs (Hash).
|
|
122
127
|
def get_platform_flavors(platform)
|
|
123
|
-
return {} unless @spec_data
|
|
128
|
+
return {} unless @spec_data && enabled?
|
|
124
129
|
platform_key = platform.to_s
|
|
125
130
|
|
|
126
131
|
# Use dig to safely retrieve the flavors hash from @spec_data
|