fastlane-plugin-gradle_manager 1.0.0 → 1.1.0

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: ba8b27a2f2f053f6df7bc175a6e93087dcc143289beefee74576e2a0c8094748
4
- data.tar.gz: bf8b09d6dea9991b00ec9bb3963cbf1ba67a6a54d88c0fbd1fe02a090c1205dd
3
+ metadata.gz: 0a81e47b48a716c49a62e3d4edcbe367e348c73ac0e265cc34ab60abe0877997
4
+ data.tar.gz: 55002eb8cb38b91f18d9ac2f4141722376517a7dd328c3c6ae6fbc7bba56993a
5
5
  SHA512:
6
- metadata.gz: 0e43986cf559a67d9fa8d7fb4a66c9666e3c4723d68c2e9a4d33dc0bd790e560ec281b39e3eade8b69a901b69c44156a8afca8615868e71240ea54b9c96aa50c
7
- data.tar.gz: e7686db376c18aeb9f33e25d1d1079c946baf48228501e34f84abcd633aebd30f0827eb18e0901d943ce761587587b0843af16ee49bed5bb26ef1afd072142ad
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 = Helper::GradleParserHelper.parse(gradle_file_path)
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
- '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.'
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
- FastlaneCore::ConfigItem.new(key: :module_name,
43
- env_name: 'GRADLE_MANAGER_MODULE_NAME',
44
- description: 'The name of the application source folder in the Android project (default: app)',
45
- optional: true,
46
- type: String,
47
- default_value: 'app'),
48
- FastlaneCore::ConfigItem.new(key: :gradle_file_path,
49
- env_name: 'GRADLE_MANAGER_GRADLE_FILE_PATH',
50
- description: 'The relative path to the gradle file (default:app/build.gradle)',
51
- optional: true,
52
- type: String,
53
- default_value: nil),
54
- FastlaneCore::ConfigItem.new(key: :flavor_name,
55
- env_name: 'GRADLE_MANAGER_FLAVOR_NAME',
56
- description: 'The name of the product flavor',
57
- optional: true,
58
- type: String,
59
- default_value: nil)
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 = Helper::GradleParserHelper.parse(gradle_file_path)
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
- 'Get the parsed Gradle file of an Android project.',
31
- 'This action will return the parsed Gradle file based on the path you\'ve specified.'
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
- FastlaneCore::ConfigItem.new(key: :module_name,
38
- env_name: 'GRADLE_MANAGER_MODULE_NAME',
39
- description: 'The name of the application source folder in the Android project (default: app)',
40
- optional: true,
41
- type: String,
42
- default_value: 'app'),
43
- FastlaneCore::ConfigItem.new(key: :gradle_file_path,
44
- env_name: 'GRADLE_MANAGER_GRADLE_FILE_PATH',
45
- description: 'The relative path to the gradle file (default:app/build.gradle)',
46
- optional: true,
47
- type: String,
48
- default_value: nil),
49
- FastlaneCore::ConfigItem.new(key: :flavor_name,
50
- env_name: 'GRADLE_MANAGER_FLAVOR_NAME',
51
- description: 'The name of the product flavor',
52
- optional: true,
53
- type: String,
54
- default_value: nil)
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 = Helper::GradleParserHelper.parse(gradle_file_path)
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
- 'Get the parsed Gradle file of an Android project.',
31
- 'This action will return the parsed Gradle file based on the path you\'ve specified.'
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
- FastlaneCore::ConfigItem.new(key: :module_name,
38
- env_name: 'GRADLE_MANAGER_MODULE_NAME',
39
- description: 'The name of the application source folder in the Android project (default: app)',
40
- optional: true,
41
- type: String,
42
- default_value: 'app'),
43
- FastlaneCore::ConfigItem.new(key: :gradle_file_path,
44
- env_name: 'GRADLE_MANAGER_GRADLE_FILE_PATH',
45
- description: 'The relative path to the gradle file (default:app/build.gradle)',
46
- optional: true,
47
- type: String,
48
- default_value: nil),
49
- FastlaneCore::ConfigItem.new(key: :flavor_name,
50
- env_name: 'GRADLE_MANAGER_FLAVOR_NAME',
51
- description: 'The name of the product flavor',
52
- optional: true,
53
- type: String,
54
- default_value: nil)
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
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GradleManager
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
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.0.0
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-19 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry