ann-flavor-flutter 0.4.8 → 0.4.10

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: a70549206a408d933bf2258bf1c8b21ba4b1439d926e106a67f08564a2eac3fe
4
- data.tar.gz: 0ff6ede39627802182e5ace0a13ab8d5a48075539f65827a52dbd9bfcc838373
3
+ metadata.gz: 447122ad8d1119d28bf0aa610fbdaca4c59ef0c4049fd61f6e7020df8d69423a
4
+ data.tar.gz: dbd5b81ae7e31e7c866c50487d34ba891bf74666a91d74652d0e6ac7273f5242
5
5
  SHA512:
6
- metadata.gz: d3d91d71d2a5321d94b3211cc0818430a4525ef5fb65ca8d80e9cad5c2471f111556aee73452a6265179f4569e591c2f79661024c0959ead917b94115f1a445a
7
- data.tar.gz: 6e90f40ea8ea0736b6984c30389916cbbe395116b7efdb4defde155da342174c0c62cec528c726fd698f9f6715d6821b67020518acb1a5db58d755e4b765c729
6
+ metadata.gz: 5bb57612673800eab64900e93aefde7faac4a27d78b898cd3e080c872b68e893393dd4180b791f9260434bb5d0369bff7e6df3ebf529cf5d7165cdd75ca8a63d
7
+ data.tar.gz: 0d4aba9d47ab1061a2dedd1bd874fab7797d0591d9efc3b8a951f1c45f530e1c56c8793c046af0f04af396cd4d677cbc75468d71ff175ac6b08cf6847928a185
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.10
4
+
5
+ ### Fixed
6
+ - `AnnFlavorCore::AnnSpec#flavor_exists_on?(platform_key, flavor_key)` added to the shared core (`ann-flavor-core-ruby`, vendored into this gem at publish time). Core-only in this release — `YamlSpecLoader`/`PodspecBridge` do not call this method yet; no functional change to Fastlane lane behavior. Included here purely because this gem vendors the shared core's source and versions travel together.
7
+
8
+ ## 0.4.9
9
+
10
+ ### Fixed
11
+ - `YamlSpecLoader#get_display_name`/`#get_version_name`/`#get_version_code`/`#get_gms_ads_id` were hardcoded to resolve against the `release` build type regardless of the caller's actual build — a sibling of the `#get_package_id` bug fixed under plan-030 Phase 6 / REQ-CDEL-00070, but not applied to these four getters at the time. `PodspecBridge` now threads its real `@build_type` through to all of them (matching `#bundle_id`), so a debug build correctly picks up any `build_types.debug`-level `name_suffix`/`version_name`/`version_code` override instead of silently resolving the release value.
12
+
3
13
  ## 0.4.8
4
14
 
5
15
  ### Added
@@ -1,3 +1,3 @@
1
1
  module AnnFlavorFlutter
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.10"
3
3
  end
@@ -114,7 +114,7 @@ module FastlaneFlutterFlavor
114
114
  end
115
115
 
116
116
  def display_name
117
- @loader.get_display_name(@platform, @flavor)
117
+ @loader.get_display_name(@platform, @flavor, @build_type)
118
118
  end
119
119
 
120
120
  def bundle_id
@@ -122,15 +122,15 @@ module FastlaneFlutterFlavor
122
122
  end
123
123
 
124
124
  def version_name
125
- @loader.get_version_name(@platform, @flavor)
125
+ @loader.get_version_name(@platform, @flavor, @build_type)
126
126
  end
127
127
 
128
128
  def version_code
129
- @loader.get_version_code(@platform, @flavor)
129
+ @loader.get_version_code(@platform, @flavor, @build_type)
130
130
  end
131
131
 
132
132
  def gms_ads_id
133
- @loader.get_gms_ads_id(@platform, @flavor)
133
+ @loader.get_gms_ads_id(@platform, @flavor, @build_type)
134
134
  end
135
135
 
136
136
  def team_id
@@ -179,21 +179,27 @@ module FastlaneFlutterFlavor
179
179
  resolved&.effective_id
180
180
  end
181
181
 
182
- # @return [String, nil] The merged app name.
183
- def get_display_name(platform, flavor_name)
184
- resolved = resolve(platform, flavor_name, 'release')
182
+ # @return [String, nil] The merged app name for the given build type. Was
183
+ # previously hardcoded to 'release' regardless of the caller's actual
184
+ # build a sibling of the get_package_id fix (plan-030 Phase 6 /
185
+ # REQ-CDEL-00070): PodspecBridge#display_name now threads its real
186
+ # @build_type through instead of relying on this default.
187
+ def get_display_name(platform, flavor_name, build_type = 'release')
188
+ resolved = resolve(platform, flavor_name, build_type)
185
189
  resolved&.effective_name
186
190
  end
187
191
 
188
- # @return [String, nil] The merged version name.
189
- def get_version_name(platform, flavor_name)
190
- resolved = resolve(platform, flavor_name, 'release')
192
+ # @return [String, nil] The merged version name for the given build type.
193
+ # Was previously hardcoded to 'release' — see get_display_name.
194
+ def get_version_name(platform, flavor_name, build_type = 'release')
195
+ resolved = resolve(platform, flavor_name, build_type)
191
196
  resolved&.effective_version_name
192
197
  end
193
198
 
194
- # @return [String, nil] The path to the version_code.
195
- def get_version_code(platform, flavor_name)
196
- resolved = resolve(platform, flavor_name, 'release')
199
+ # @return [String, nil] The version_code for the given build type. Was
200
+ # previously hardcoded to 'release' — see get_display_name.
201
+ def get_version_code(platform, flavor_name, build_type = 'release')
202
+ resolved = resolve(platform, flavor_name, build_type)
197
203
  return nil unless resolved
198
204
  resolved.effective_version_code.to_i.to_s
199
205
  end
@@ -295,8 +301,9 @@ module FastlaneFlutterFlavor
295
301
  resolved&.effective_name
296
302
  end
297
303
 
298
- def get_gms_ads_id(platform, flavor_name)
299
- resolved = resolve(platform, flavor_name, 'release')
304
+ # Was previously hardcoded to 'release' — see get_display_name.
305
+ def get_gms_ads_id(platform, flavor_name, build_type = 'release')
306
+ resolved = resolve(platform, flavor_name, build_type)
300
307
  resolved&.effective_gms_ads_id
301
308
  end
302
309
 
@@ -13,6 +13,25 @@ module AnnFlavorCore
13
13
 
14
14
  AnnSpec = Struct.new(:app, :enabled, :debug_config, :tooling, keyword_init: true) do
15
15
  def self.defaults = new(app: AnnApp.new, enabled: true, debug_config: DebugConfig.new)
16
+
17
+ # Whether flavor +flavor_key+ has an entry under app.<platform_key>.flavor
18
+ # in the spec — i.e. whether this flavor actually targets that platform.
19
+ #
20
+ # +platform_key+ is 'android', 'ios', 'web', or 'windows' (any other
21
+ # value returns false). This says nothing about whether the platform
22
+ # itself is configured for the app at all — a platform absent from app
23
+ # entirely also returns false here, the same as a platform that exists
24
+ # but doesn't list this flavor. Callers that need to distinguish those
25
+ # two cases should check app.<platform_key>.nil? separately.
26
+ def flavor_exists_on?(platform_key, flavor_key)
27
+ platform = case platform_key
28
+ when 'android' then app&.android
29
+ when 'ios' then app&.ios
30
+ when 'web' then app&.web
31
+ when 'windows' then app&.windows
32
+ end
33
+ platform&.flavors&.key?(flavor_key) || false
34
+ end
16
35
  end
17
36
 
18
37
  AnnApp = Struct.new(:android, :ios, :web, :windows, :general, :integrations, keyword_init: true)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ann-flavor-flutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - ANN Solutions