fastlane-plugin-flutter 0.4.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 850e54c27628397e666fc6891f194099be8c0ab99ae465c58b33f2735ece8b53
|
4
|
+
data.tar.gz: 99e0b65d86165f064d9db289511629c5afd15854f3b12c7b7cae3992d3f51060
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84dd37b21ceba829ee3500fc2696e6d63da9036a23efa9bc84bc919032b05db10b64bf0f8c6caeda65ab70de2ecbc7589a7eb5014877ac78ad0914f4888525f6
|
7
|
+
data.tar.gz: ac0c75e59ca975897caee138e093a98a5ea2da7208548cc8fd957945a960a1f6b9ab86afcf8c02b1612d0a32f414f6a56ee8b39cd32a69d46d857348cda422e4
|
@@ -34,7 +34,7 @@ module Fastlane
|
|
34
34
|
else
|
35
35
|
Helper::FlutterHelper.git(
|
36
36
|
'clone', # no --depth limit to keep Flutter tag-based versioning.
|
37
|
-
"--branch=#{flutter_channel || '
|
37
|
+
"--branch=#{flutter_channel || 'stable'}",
|
38
38
|
'--quiet',
|
39
39
|
'--',
|
40
40
|
FLUTTER_REMOTE_REPOSITORY,
|
@@ -52,16 +52,7 @@ module Fastlane
|
|
52
52
|
|
53
53
|
Helper::FlutterHelper.flutter('build', *build_args) do |status, res|
|
54
54
|
if status.success?
|
55
|
-
|
56
|
-
map { |path| File.absolute_path(path[0]) }
|
57
|
-
if artifacts.size == 1
|
58
|
-
lane_context[SharedValues::FLUTTER_OUTPUT] = artifacts.first
|
59
|
-
elsif artifacts.size > 1
|
60
|
-
# Could be the result of "flutter build apk --split-per-abi".
|
61
|
-
lane_context[SharedValues::FLUTTER_OUTPUT] = artifacts
|
62
|
-
else
|
63
|
-
UI.important('Cannot parse built file path from "flutter build"')
|
64
|
-
end
|
55
|
+
process_build_output(res, build_args)
|
65
56
|
# gym (aka build_ios_app) action call may follow build; let's help
|
66
57
|
# it identify the project, since Flutter project structure is
|
67
58
|
# usually standard.
|
@@ -125,6 +116,21 @@ form instead.
|
|
125
116
|
end
|
126
117
|
end
|
127
118
|
|
119
|
+
def self.process_build_output(output, build_args)
|
120
|
+
artifacts = output.scan(/Built (.*?)(:? \([^)]*\))?\.$/).
|
121
|
+
map { |path| File.absolute_path(path[0]) }
|
122
|
+
if artifacts.size == 1
|
123
|
+
lane_context[SharedValues::FLUTTER_OUTPUT] = artifacts.first
|
124
|
+
elsif artifacts.size > 1
|
125
|
+
# Could be the result of "flutter build apk --split-per-abi".
|
126
|
+
lane_context[SharedValues::FLUTTER_OUTPUT] = artifacts
|
127
|
+
elsif build_args.include?('--config-only')
|
128
|
+
UI.message('Config-only "build" detected, no output file name')
|
129
|
+
else
|
130
|
+
UI.important('Cannot parse built file path from "flutter build"')
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
128
134
|
def self.description
|
129
135
|
'Run "flutter build" to build a Flutter application'
|
130
136
|
end
|
@@ -13,32 +13,47 @@ module Fastlane
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.flutter_sdk_root
|
16
|
+
# Support flutterw and compatible projects.
|
17
|
+
# Prefixing directory name with "." has a nice effect that Flutter tools
|
18
|
+
# such as "format" and "lint" will not recurse into this subdirectory
|
19
|
+
# while analyzing the project itself. This works immensely better than
|
20
|
+
# e.g. vendor/flutter.
|
21
|
+
pinned_flutter_path = File.join(Dir.pwd, '.flutter')
|
22
|
+
|
16
23
|
@flutter_sdk_root ||= File.expand_path(
|
17
|
-
if
|
18
|
-
UI.
|
19
|
-
'
|
20
|
-
|
21
|
-
'FLUTTER_ROOT instead.'
|
22
|
-
)
|
23
|
-
ENV['FLUTTER_SDK_ROOT']
|
24
|
+
if flutter_installed?(pinned_flutter_path)
|
25
|
+
UI.message("Determined Flutter location as #{pinned_flutter_path}" \
|
26
|
+
" because 'flutter' executable exists there.")
|
27
|
+
pinned_flutter_path
|
24
28
|
elsif ENV.include?('FLUTTER_ROOT')
|
25
29
|
# FLUTTER_ROOT is a standard environment variable from Flutter.
|
30
|
+
UI.message("Determined Flutter location as #{ENV['FLUTTER_ROOT']}" \
|
31
|
+
" because environment variable FLUTTER_ROOT points there" \
|
32
|
+
" (current directory is #{Dir.pwd}).")
|
26
33
|
ENV['FLUTTER_ROOT']
|
27
34
|
elsif flutter_binary = FastlaneCore::CommandExecutor.which('flutter')
|
28
|
-
File.dirname(File.dirname(flutter_binary))
|
35
|
+
location = File.dirname(File.dirname(flutter_binary))
|
36
|
+
UI.message("Determined Flutter location as #{location} because"\
|
37
|
+
" 'flutter' executable in PATH is located there" \
|
38
|
+
" (current directory is #{Dir.pwd}).")
|
39
|
+
location
|
29
40
|
else
|
30
|
-
|
41
|
+
# Where we'd prefer to install flutter.
|
42
|
+
UI.message("Determined desired Flutter location as" \
|
43
|
+
" #{pinned_flutter_path} because that's where this fastlane" \
|
44
|
+
" plugin would install Flutter by default.")
|
45
|
+
pinned_flutter_path
|
31
46
|
end
|
32
47
|
)
|
33
48
|
end
|
34
49
|
|
35
|
-
def self.flutter_installed?
|
50
|
+
def self.flutter_installed?(custom_flutter_root = nil)
|
36
51
|
# Can't use File.executable? because on Windows it has to be .exe.
|
37
|
-
File.exist?(flutter_binary)
|
52
|
+
File.exist?(flutter_binary(custom_flutter_root))
|
38
53
|
end
|
39
54
|
|
40
|
-
def self.flutter_binary
|
41
|
-
File.join(flutter_sdk_root, 'bin', 'flutter')
|
55
|
+
def self.flutter_binary(custom_flutter_root = nil)
|
56
|
+
File.join(custom_flutter_root || flutter_sdk_root, 'bin', 'flutter')
|
42
57
|
end
|
43
58
|
|
44
59
|
def self.dev_dependency?(package)
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Sheremet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -188,7 +188,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
|
-
|
191
|
+
rubyforge_project:
|
192
|
+
rubygems_version: 2.7.6.2
|
192
193
|
signing_key:
|
193
194
|
specification_version: 4
|
194
195
|
summary: Flutter actions plugin for Fastlane
|