fastlane-plugin-gradle_manager 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/gradle_manager/actions/get_application_id_action.rb +33 -22
- data/lib/fastlane/plugin/gradle_manager/actions/get_version_code_action.rb +33 -22
- data/lib/fastlane/plugin/gradle_manager/actions/get_version_name_action.rb +33 -22
- data/lib/fastlane/plugin/gradle_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a81e47b48a716c49a62e3d4edcbe367e348c73ac0e265cc34ab60abe0877997
|
4
|
+
data.tar.gz: 55002eb8cb38b91f18d9ac2f4141722376517a7dd328c3c6ae6fbc7bba56993a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b74d77dfa2e3fa50726bae92cd72bc6ff93796c9d2ef1290ea02d0316c962e28a9fefd924539259bb603febc30ef67b1ca752b8505f69098283d84727fbd10c
|
7
|
+
data.tar.gz: fe4b639ba395478e75674c498a9ed8bda8aeded5846c53ebfc2494c6a8d84c1706a36b0e078948a7aec1e62357c34cc6478d89331efc19b5fc3b1395711435db
|
@@ -2,11 +2,16 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class GetApplicationIdAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
gradle_file_path = Helper::GradleFileFinderHelper.find_file(params)
|
6
5
|
flavor ||= params[:flavor_name]
|
7
6
|
|
8
7
|
begin
|
9
|
-
gradle_data
|
8
|
+
gradle_data ||= params[:cached_data]
|
9
|
+
|
10
|
+
if gradle_data.nil?
|
11
|
+
gradle_file_path = Helper::GradleFileFinderHelper.find_file(params)
|
12
|
+
gradle_data = Helper::GradleParserHelper.parse(gradle_file_path)
|
13
|
+
end
|
14
|
+
|
10
15
|
application_id = Helper::GradleDataFinderHelper.find_property(gradle_data, :application_id, flavor)
|
11
16
|
|
12
17
|
application_id_suffix = Helper::GradleDataFinderHelper.find_property(gradle_data, :application_id_suffix, flavor)
|
@@ -32,31 +37,37 @@ module Fastlane
|
|
32
37
|
|
33
38
|
def self.details
|
34
39
|
[
|
35
|
-
|
36
|
-
|
40
|
+
'Get the parsed Gradle file of an Android project.',
|
41
|
+
'This action will return the parsed Gradle file based on the path you\'ve specified.'
|
37
42
|
].join('\n')
|
38
43
|
end
|
39
44
|
|
40
45
|
def self.available_options
|
41
46
|
[
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
47
|
+
FastlaneCore::ConfigItem.new(key: :cached_data,
|
48
|
+
env_name: 'GRADLE_MANAGER_CACHED_DATA',
|
49
|
+
description: 'The cached data from get_gradle_data. If not supplied then the action will try to fetch it.',
|
50
|
+
optional: true,
|
51
|
+
type: Hash,
|
52
|
+
default_value: nil),
|
53
|
+
FastlaneCore::ConfigItem.new(key: :module_name,
|
54
|
+
env_name: 'GRADLE_MANAGER_MODULE_NAME',
|
55
|
+
description: 'The name of the application source folder in the Android project (default: app)',
|
56
|
+
optional: true,
|
57
|
+
type: String,
|
58
|
+
default_value: 'app'),
|
59
|
+
FastlaneCore::ConfigItem.new(key: :gradle_file_path,
|
60
|
+
env_name: 'GRADLE_MANAGER_GRADLE_FILE_PATH',
|
61
|
+
description: 'The relative path to the gradle file (default:app/build.gradle)',
|
62
|
+
optional: true,
|
63
|
+
type: String,
|
64
|
+
default_value: nil),
|
65
|
+
FastlaneCore::ConfigItem.new(key: :flavor_name,
|
66
|
+
env_name: 'GRADLE_MANAGER_FLAVOR_NAME',
|
67
|
+
description: 'The name of the product flavor',
|
68
|
+
optional: true,
|
69
|
+
type: String,
|
70
|
+
default_value: nil)
|
60
71
|
]
|
61
72
|
end
|
62
73
|
|
@@ -2,11 +2,16 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class GetVersionCodeAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
gradle_file_path = Helper::GradleFileFinderHelper.find_file(params)
|
6
5
|
flavor ||= params[:flavor_name]
|
7
6
|
|
8
7
|
begin
|
9
|
-
gradle_data
|
8
|
+
gradle_data ||= params[:cached_data]
|
9
|
+
|
10
|
+
if gradle_data.nil?
|
11
|
+
gradle_file_path = Helper::GradleFileFinderHelper.find_file(params)
|
12
|
+
gradle_data = Helper::GradleParserHelper.parse(gradle_file_path)
|
13
|
+
end
|
14
|
+
|
10
15
|
return Helper::GradleDataFinderHelper.find_property(gradle_data, :version_code, flavor)
|
11
16
|
rescue => err
|
12
17
|
UI.error("An exception occurred while parsing the gradle file: #{err}")
|
@@ -27,31 +32,37 @@ module Fastlane
|
|
27
32
|
|
28
33
|
def self.details
|
29
34
|
[
|
30
|
-
|
31
|
-
|
35
|
+
'Get the parsed Gradle file of an Android project.',
|
36
|
+
'This action will return the parsed Gradle file based on the path you\'ve specified.'
|
32
37
|
].join('\n')
|
33
38
|
end
|
34
39
|
|
35
40
|
def self.available_options
|
36
41
|
[
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
42
|
+
FastlaneCore::ConfigItem.new(key: :cached_data,
|
43
|
+
env_name: 'GRADLE_MANAGER_CACHED_DATA',
|
44
|
+
description: 'The cached data from get_gradle_data. If not supplied then the action will try to fetch it.',
|
45
|
+
optional: true,
|
46
|
+
type: Hash,
|
47
|
+
default_value: nil),
|
48
|
+
FastlaneCore::ConfigItem.new(key: :module_name,
|
49
|
+
env_name: 'GRADLE_MANAGER_MODULE_NAME',
|
50
|
+
description: 'The name of the application source folder in the Android project (default: app)',
|
51
|
+
optional: true,
|
52
|
+
type: String,
|
53
|
+
default_value: 'app'),
|
54
|
+
FastlaneCore::ConfigItem.new(key: :gradle_file_path,
|
55
|
+
env_name: 'GRADLE_MANAGER_GRADLE_FILE_PATH',
|
56
|
+
description: 'The relative path to the gradle file (default:app/build.gradle)',
|
57
|
+
optional: true,
|
58
|
+
type: String,
|
59
|
+
default_value: nil),
|
60
|
+
FastlaneCore::ConfigItem.new(key: :flavor_name,
|
61
|
+
env_name: 'GRADLE_MANAGER_FLAVOR_NAME',
|
62
|
+
description: 'The name of the product flavor',
|
63
|
+
optional: true,
|
64
|
+
type: String,
|
65
|
+
default_value: nil)
|
55
66
|
]
|
56
67
|
end
|
57
68
|
|
@@ -2,11 +2,16 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class GetVersionNameAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
gradle_file_path = Helper::GradleFileFinderHelper.find_file(params)
|
6
5
|
flavor ||= params[:flavor_name]
|
7
6
|
|
8
7
|
begin
|
9
|
-
gradle_data
|
8
|
+
gradle_data ||= params[:cached_data]
|
9
|
+
|
10
|
+
if gradle_data.nil?
|
11
|
+
gradle_file_path = Helper::GradleFileFinderHelper.find_file(params)
|
12
|
+
gradle_data = Helper::GradleParserHelper.parse(gradle_file_path)
|
13
|
+
end
|
14
|
+
|
10
15
|
return Helper::GradleDataFinderHelper.find_property(gradle_data, :version_name, flavor)
|
11
16
|
rescue => err
|
12
17
|
UI.error("An exception occurred while parsing the gradle file: #{err}")
|
@@ -27,31 +32,37 @@ module Fastlane
|
|
27
32
|
|
28
33
|
def self.details
|
29
34
|
[
|
30
|
-
|
31
|
-
|
35
|
+
'Get the parsed Gradle file of an Android project.',
|
36
|
+
'This action will return the parsed Gradle file based on the path you\'ve specified.'
|
32
37
|
].join('\n')
|
33
38
|
end
|
34
39
|
|
35
40
|
def self.available_options
|
36
41
|
[
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
42
|
+
FastlaneCore::ConfigItem.new(key: :cached_data,
|
43
|
+
env_name: 'GRADLE_MANAGER_CACHED_DATA',
|
44
|
+
description: 'The cached data from get_gradle_data. If not supplied then the action will try to fetch it.',
|
45
|
+
optional: true,
|
46
|
+
type: Hash,
|
47
|
+
default_value: nil),
|
48
|
+
FastlaneCore::ConfigItem.new(key: :module_name,
|
49
|
+
env_name: 'GRADLE_MANAGER_MODULE_NAME',
|
50
|
+
description: 'The name of the application source folder in the Android project (default: app)',
|
51
|
+
optional: true,
|
52
|
+
type: String,
|
53
|
+
default_value: 'app'),
|
54
|
+
FastlaneCore::ConfigItem.new(key: :gradle_file_path,
|
55
|
+
env_name: 'GRADLE_MANAGER_GRADLE_FILE_PATH',
|
56
|
+
description: 'The relative path to the gradle file (default:app/build.gradle)',
|
57
|
+
optional: true,
|
58
|
+
type: String,
|
59
|
+
default_value: nil),
|
60
|
+
FastlaneCore::ConfigItem.new(key: :flavor_name,
|
61
|
+
env_name: 'GRADLE_MANAGER_FLAVOR_NAME',
|
62
|
+
description: 'The name of the product flavor',
|
63
|
+
optional: true,
|
64
|
+
type: String,
|
65
|
+
default_value: nil)
|
55
66
|
]
|
56
67
|
end
|
57
68
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-gradle_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Helder Pinhal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|