fastlane-plugin-flutter 0.1.6 → 0.1.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
  SHA1:
3
- metadata.gz: 23f9fd114709763b7576dd3ba3fd2ce97c590969
4
- data.tar.gz: 1d59fa932dadb4327b25d1bc1bc123f6f5de65bc
3
+ metadata.gz: 1d4b9daf3d6ffa642ccf619976dde9988fde5cd7
4
+ data.tar.gz: 9af6e631deeb49a105e2abb2152b8faf6f73bbab
5
5
  SHA512:
6
- metadata.gz: 512074affe3b3e76bc1f7d4d9d6b06ea06d134334f9ee6b8ecd11338c06af9a4adc604ba402adc710ea8a196d60a2fb33c6565e19e389814a83d0217f0268cb3
7
- data.tar.gz: ff7e5107b022be042d03d304a1c5ad2d8a5b1ef40cc5b435d24d3e1d4e4ec084d0539fa25fc20d432c0da29389ef6d431d29ff12401d24f790dfb662d3ccfe79
6
+ metadata.gz: 8a5c6840df397ca893f8ef272a80903017b95e2e02ba6f1451190d11029f0b544601b04936c985714897364d0754db3669e96b0921b47bc60ba52654a6826499
7
+ data.tar.gz: 448212fb4385714908477456d0be3ecf52ac17a192709f1a2e56a41f75bbf67870a087cd657be0777c1d6edcaf4d9c790071208d59a93bd41fb21d2d8f2e3c23
@@ -51,7 +51,7 @@ module Fastlane
51
51
  end
52
52
  else
53
53
  # fastlane does not fail automatically if we provide a block.
54
- UI.user_error! "flutter build #{platform} has failed."
54
+ UI.user_error!("flutter build #{platform} has failed.")
55
55
  end
56
56
  end
57
57
  end
@@ -98,6 +98,12 @@ module Fastlane
98
98
  # Don't generate .dart for the original ARB, messages_all.dart has it.
99
99
  arb_files.delete(l10n_messages_file)
100
100
 
101
+ if params[:l10n_reformat_arb]
102
+ arb_files.each do |arb_file|
103
+ Helper::FlutterHelper.reformat_arb(arb_file)
104
+ end
105
+ end
106
+
101
107
  sh *%W(flutter pub pub run intl_translation:generate_from_arb
102
108
  --output-dir=#{output_dir}
103
109
  --no-use-deferred-loading
@@ -163,6 +169,14 @@ module Fastlane
163
169
  UI.user_error!('File does not exist') unless File.exist?(value)
164
170
  end,
165
171
  ),
172
+ FastlaneCore::ConfigItem.new(
173
+ key: :l10n_reformat_arb,
174
+ env_name: 'FL_FLUTTER_L10N_REFORMAT_ARB',
175
+ description: 'Reformat .arb files',
176
+ optional: true,
177
+ is_string: false,
178
+ default_value: false,
179
+ ),
166
180
  ]
167
181
  end
168
182
 
@@ -23,6 +23,12 @@ module Fastlane
23
23
 
24
24
  false
25
25
  end
26
+
27
+ def self.reformat_arb(file_name)
28
+ pretty_content = JSON.pretty_generate(JSON.parse(File.read(file_name)))
29
+
30
+ File.write(file_name, pretty_content + "\n")
31
+ end
26
32
  end
27
33
  end
28
34
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Flutter
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
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.6
4
+ version: 0.1.7
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-04-22 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry