ann-flavor-flutter 0.4.6 → 0.4.7
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: fd7cce396ef86ea1e15205e7440d3755a79707eeaa55126a84bce553d0785add
|
|
4
|
+
data.tar.gz: 10d3037745026703bcd2ae17d93ea6467fb8fe3b6d0962f228b23f2d25e4e7cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3312b0e1231f50e7c99bb0ea43580245bd5bae4814dfd63d790e29fa41f9bc197f5492dcb3e0f9b120ac95e8cbbd4c27666874ed0abc18caf8b0183d0013a26
|
|
7
|
+
data.tar.gz: 174e5a6e6a016a6772ad6d764056b4576e09279f03130a0e91e36e323d4f0bb3f9b6dc4db825d3405a3feeefc034bfe1f42c8dbf7b1cdd5217f0a13bc1eb8308
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.7
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- `dart_defines` (`annspec.yaml`'s `android.default.dart_defines` / per-flavor overrides) was silently never applied to `flutter build` when compilation happened as part of `upload_to_play_store`, `upload_to_app_store`, or `upload_to_cloudflare` — only a manual `bundle exec fastlane android compile_build` invocation picked it up, since the flag was injected only into the generated Fastfile's standalone `compile_build` lane, which those upload/publish helpers never call. `compile_build` (the shared helper in `lanes_annai.rb`) now resolves `dart_defines` itself at runtime, so every caller gets it automatically — this also means a flavor-level `dart_defines` override is now honored, which the old generation-time injection could never represent (it could only see default-level values). ([#59](https://github.com/anntech-dev/ann-flavor-tooling/issues/59))
|
|
7
|
+
|
|
3
8
|
## 0.4.6
|
|
4
9
|
|
|
5
10
|
### Fixed
|
|
@@ -113,6 +113,22 @@ module FastlaneFlutterFlavor
|
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
# dart_defines (REQ-DDEF-00040): resolved here — not only in the
|
|
117
|
+
# standalone Fastfile `compile_build` lane — so every caller that
|
|
118
|
+
# compiles via this helper gets it, including upload_to_play_store,
|
|
119
|
+
# upload_to_app_store, and upload_to_cloudflare, which call this
|
|
120
|
+
# method directly and previously never applied dart_defines at all
|
|
121
|
+
# (DEF-059, #59). A caller-supplied additional_parameter is preserved
|
|
122
|
+
# and the resolved flags are appended alongside it as separate argv
|
|
123
|
+
# elements (Fastlane::Actions.sh below is called with a splatted
|
|
124
|
+
# array, so each flag must be its own element, not one combined
|
|
125
|
+
# string). additional_parameter may already be an Array here (the web
|
|
126
|
+
# branch above turns it into one) or a String.
|
|
127
|
+
dart_defines_flags = @specLoader.get_dart_defines_flags(@platform, flavor, build_config)
|
|
128
|
+
unless dart_defines_flags.empty?
|
|
129
|
+
additional_parameter = Array(additional_parameter).flatten.reject { |p| p.to_s.empty? } + dart_defines_flags
|
|
130
|
+
end
|
|
131
|
+
|
|
116
132
|
# Base command parts
|
|
117
133
|
command_parts = [
|
|
118
134
|
"flutter", "build",
|
|
@@ -329,5 +329,27 @@ module FastlaneFlutterFlavor
|
|
|
329
329
|
resolved = resolve(platform, flavor_name, build_config)
|
|
330
330
|
resolved&.effective_auth&.reversed_client_id
|
|
331
331
|
end
|
|
332
|
+
|
|
333
|
+
# Merges common + compile-scoped dart_defines (compile wins on collision,
|
|
334
|
+
# per REQ-DDEF-00015) into individual --dart-define=KEY=VALUE flags for
|
|
335
|
+
# `flutter build`. Returns [] when there's nothing to emit. Returned as
|
|
336
|
+
# separate array elements (not a single joined string) so callers can pass
|
|
337
|
+
# them straight through to Fastlane::Actions.sh's argv-array form without
|
|
338
|
+
# each flag being treated as one combined shell argument.
|
|
339
|
+
#
|
|
340
|
+
# REQ-DDEF-00040's default-only scoping decision applies here too:
|
|
341
|
+
# `resolve` folds flavor-level overrides in via the core's 4-level cascade,
|
|
342
|
+
# so a flavor with its own dart_defines still resolves correctly per call —
|
|
343
|
+
# unlike the (now-removed) generated-Fastfile-lane version, which could
|
|
344
|
+
# only represent default-level dart_defines since it was a single static
|
|
345
|
+
# lane shared across every flavor.
|
|
346
|
+
def get_dart_defines_flags(platform, flavor_name, build_type = 'release')
|
|
347
|
+
resolved = resolve(platform, flavor_name, build_type)
|
|
348
|
+
defines = resolved&.effective_dart_defines
|
|
349
|
+
return [] unless defines
|
|
350
|
+
|
|
351
|
+
merged = (defines.common || {}).merge(defines.compile || {})
|
|
352
|
+
merged.map { |k, v| "--dart-define=#{k}=#{v}" }
|
|
353
|
+
end
|
|
332
354
|
end
|
|
333
355
|
end
|