fastlane-plugin-flutter 0.1.10 → 0.1.11

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
  SHA1:
3
- metadata.gz: e77815f77fc8ca323487b8cc101410722beccaca
4
- data.tar.gz: 683a510aad595f0046c23f7ebc2234ac74c677a5
3
+ metadata.gz: 42310ba7cef740d4b5c694e44ad5f119263e841e
4
+ data.tar.gz: cbb4a3b8111848feb4fe7d4deddf8de07b4992fe
5
5
  SHA512:
6
- metadata.gz: 7a16ea592f2e96d7a4753fb9d8b125b9ead8e1e5795d3a48982d7d1118a37e143a4d6897118c48fcb4e0a11261a626fc48a97736c5063db23ad79c8cee4a478a
7
- data.tar.gz: cdf6eb53d72700ee7441626434b6aed7b726b779d0f0c8e4fb2fba61f4a9010873cfbae143d70d4eefdb76a243d47c6e7ab5a225b80aaad3cd36059019c5a6ca
6
+ metadata.gz: 52f61bba91360389b45e990692126ca27b89f14de1951c6c2d9e860df4322f63c64effc0320d3f3e4d710e650bd025e5ef2ce0afc4144db4860c78ccdd3b9e4d
7
+ data.tar.gz: 84a1b321c6327daeea49a6970d4099bd3fecbd6002f5cf0ccc69327c621990c940db4d72bdb63169456f23d5ebf983ca22f707c24f90c27225307d3bd3d4209a
@@ -1,6 +1,9 @@
1
1
  require 'fastlane/action'
2
2
  require_relative '../helper/flutter_helper'
3
3
 
4
+ # This is the entry point for this plugin. For more information on writing
5
+ # plugins: https://docs.fastlane.tools/advanced/
6
+
4
7
  module Fastlane
5
8
  module Actions
6
9
  module SharedValues
@@ -76,8 +79,14 @@ module Fastlane
76
79
  l10n_messages_was = File.read(l10n_messages_file)
77
80
  end
78
81
 
79
- sh *%W(flutter pub pub run intl_translation:extract_to_arb
80
- --output-dir=#{output_dir} #{params[:l10n_strings_file]})
82
+ extract_to_arb_options = ["--output-dir=#{output_dir}"]
83
+ if params[:l10n_strings_locale]
84
+ extract_to_arb_options =
85
+ ["--locale=#{params[:l10n_strings_locale]}"]
86
+ end
87
+
88
+ sh *%w(flutter pub pub run intl_translation:extract_to_arb),
89
+ *extract_to_arb_options, params[:l10n_strings_file]
81
90
 
82
91
  if l10n_messages_was
83
92
  # intl will update @@last_modified even if there are no updates;
@@ -95,8 +104,12 @@ module Fastlane
95
104
  # Sort files for consistency, because messages_all.dart will have
96
105
  # imports ordered as in the command line below.
97
106
  arb_files = Dir.glob(File.join(output_dir, 'intl_*.arb')).sort
98
- # Don't generate .dart for the original ARB, messages_all.dart has it.
99
- arb_files.delete(l10n_messages_file)
107
+
108
+ unless params[:l10n_strings_locale]
109
+ # Don't generate .dart for the original ARB unless it has its own
110
+ # locale.
111
+ arb_files.delete(l10n_messages_file)
112
+ end
100
113
 
101
114
  if params[:l10n_reformat_arb]
102
115
  arb_files.each do |arb_file|
@@ -151,6 +164,7 @@ module Fastlane
151
164
  is_string: false,
152
165
  default_value: false,
153
166
  ),
167
+ # l10n settings
154
168
  FastlaneCore::ConfigItem.new(
155
169
  key: :l10n_strings_file,
156
170
  env_name: 'FL_FLUTTER_L10N_STRINGS',
@@ -160,6 +174,12 @@ module Fastlane
160
174
  UI.user_error!('File does not exist') unless File.exist?(value)
161
175
  end,
162
176
  ),
177
+ FastlaneCore::ConfigItem.new(
178
+ key: :l10n_strings_locale,
179
+ env_name: 'FL_FLUTTER_L10N_STRINGS_LOCALE',
180
+ description: 'Locale of the data in l10n_strings_file',
181
+ optional: true,
182
+ ),
163
183
  FastlaneCore::ConfigItem.new(
164
184
  key: :l10n_reformat_arb,
165
185
  env_name: 'FL_FLUTTER_L10N_REFORMAT_ARB',
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Flutter
3
- VERSION = "0.1.10"
3
+ VERSION = "0.1.11"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-flutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Sheremet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-08 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.5.2.2
171
+ rubygems_version: 2.5.2.1
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Flutter actions plugin for Fastlane