fastlane-plugin-android_versioning_kts 0.1.0 → 0.3.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/android_versioning_kts/actions/get_value_from_build.rb +77 -31
- data/lib/fastlane/plugin/android_versioning_kts/actions/get_version_code.rb +21 -7
- data/lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb +20 -7
- data/lib/fastlane/plugin/android_versioning_kts/actions/increment_version_code.rb +92 -0
- data/lib/fastlane/plugin/android_versioning_kts/actions/increment_version_name.rb +125 -0
- data/lib/fastlane/plugin/android_versioning_kts/actions/set_value_in_build.rb +126 -0
- data/lib/fastlane/plugin/android_versioning_kts/helper/android_versioning_kts_helper.rb +4 -2
- data/lib/fastlane/plugin/android_versioning_kts/version.rb +3 -1
- data/lib/fastlane/plugin/android_versioning_kts.rb +2 -0
- metadata +29 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2956b1ea371117d6a9b3593a205a8ef467cf8004febc361075ca8b8aacda9449
|
4
|
+
data.tar.gz: 1545f0a91b4a23491aab64f44a55d3a951534ff57f3911caa75ac496cf8c71b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c67ccbad3f2267f7c53a4f09a231af9122c1e5e6f78d992e6b086039acf6acc6ef3ffc25e7047b17cef9702e12e32921fa75bc3e2c19fecf042c5e6cbcc98c2
|
7
|
+
data.tar.gz: d5d4d079801e5bcea33c13f93bf1b10ae0bf979e64f15a33a722344392ea7f079a006e713a397dbfb3ea3d1e3653d39254a71b2df52116a6cf75f89762da7036
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fileutils'
|
2
4
|
|
3
5
|
module Fastlane
|
@@ -9,33 +11,63 @@ module Fastlane
|
|
9
11
|
type ||= params[:type]
|
10
12
|
|
11
13
|
case type
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
when 'param'
|
15
|
+
regex = /
|
16
|
+
\s*
|
17
|
+
(?<key>#{params[:key]}\s*=\s*)
|
18
|
+
(?<left>['"]?)
|
19
|
+
(?<value>[a-zA-Z0-9._]*)
|
20
|
+
(?<right>['"]?)
|
21
|
+
(?<comment>.*)
|
22
|
+
/x
|
23
|
+
when 'function'
|
24
|
+
regex = /
|
25
|
+
\s*
|
26
|
+
(?<key>#{params[:key]}\s*\(\s*)
|
27
|
+
(?<left>['"]?)
|
28
|
+
(?<value>[a-zA-Z0-9._]*)
|
29
|
+
(?<right>['"]?)
|
30
|
+
(?<comment>.*\).*)
|
31
|
+
/x
|
32
|
+
else
|
33
|
+
throw "#{type} is not valid type"
|
18
34
|
end
|
19
35
|
|
20
|
-
|
36
|
+
flavor = params[:flavor]
|
37
|
+
flavor_specified = !(flavor.nil? || flavor.empty?)
|
38
|
+
regex_flavor = Regexp.new(/[ \t]create\("#{flavor}"\)[ \t]/)
|
39
|
+
value = ''
|
21
40
|
found = false
|
41
|
+
flavor_found = false
|
42
|
+
product_flavors_section = false
|
43
|
+
|
22
44
|
Dir.glob("#{app_project_dir}/build.gradle.kts") do |path|
|
23
45
|
UI.verbose("path: #{path}")
|
24
46
|
UI.verbose("absolute_path: #{File.expand_path(path)}")
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
break
|
47
|
+
|
48
|
+
File.open(path, 'r') do |file|
|
49
|
+
file.each_line do |line|
|
50
|
+
if flavor_specified && !product_flavors_section
|
51
|
+
next unless line.include? 'productFlavors'
|
52
|
+
|
53
|
+
product_flavors_section = true
|
33
54
|
end
|
34
|
-
|
55
|
+
|
56
|
+
if flavor_specified && !flavor_found
|
57
|
+
next unless line.match(regex_flavor)
|
58
|
+
|
59
|
+
flavor_found = true
|
60
|
+
end
|
61
|
+
|
62
|
+
next unless line.match(regex) && !found
|
63
|
+
|
64
|
+
key, left, value, right, comment = line.match(regex).captures
|
65
|
+
break
|
35
66
|
end
|
67
|
+
file.close
|
36
68
|
end
|
37
69
|
end
|
38
|
-
|
70
|
+
value
|
39
71
|
end
|
40
72
|
|
41
73
|
#####################################################
|
@@ -43,25 +75,39 @@ module Fastlane
|
|
43
75
|
#####################################################
|
44
76
|
def self.available_options
|
45
77
|
[
|
46
|
-
FastlaneCore::ConfigItem.new(
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
FastlaneCore::ConfigItem.new(
|
56
|
-
|
57
|
-
|
58
|
-
|
78
|
+
FastlaneCore::ConfigItem.new(
|
79
|
+
key: :app_project_dir,
|
80
|
+
env_name: 'ANDROID_VERSIONING_APP_PROJECT_DIR',
|
81
|
+
description: 'The path to the application source folder
|
82
|
+
in the Android project (default: android/app)',
|
83
|
+
optional: true,
|
84
|
+
type: String,
|
85
|
+
default_value: 'android/app'
|
86
|
+
),
|
87
|
+
FastlaneCore::ConfigItem.new(
|
88
|
+
key: :flavor,
|
89
|
+
env_name: 'ANDROID_VERSIONING_FLAVOR',
|
90
|
+
description: 'The product flavor name (optional)',
|
91
|
+
optional: true,
|
92
|
+
type: String
|
93
|
+
),
|
94
|
+
FastlaneCore::ConfigItem.new(
|
95
|
+
key: :key,
|
96
|
+
description: 'The property key',
|
97
|
+
type: String
|
98
|
+
),
|
99
|
+
FastlaneCore::ConfigItem.new(
|
100
|
+
key: :type,
|
101
|
+
description: 'The property Type ["function", "param"])',
|
102
|
+
type: String,
|
103
|
+
default_value: 'param'
|
104
|
+
)
|
59
105
|
|
60
106
|
]
|
61
107
|
end
|
62
108
|
|
63
109
|
def self.authors
|
64
|
-
[
|
110
|
+
['zmunm']
|
65
111
|
end
|
66
112
|
|
67
113
|
def self.is_supported?(platform)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fileutils'
|
2
4
|
|
3
5
|
module Fastlane
|
@@ -6,6 +8,7 @@ module Fastlane
|
|
6
8
|
def self.run(params)
|
7
9
|
GetValueFromBuildAction.run(
|
8
10
|
app_project_dir: params[:app_project_dir],
|
11
|
+
flavor: params[:flavor],
|
9
12
|
key: 'versionCode',
|
10
13
|
type: 'param'
|
11
14
|
)
|
@@ -16,12 +19,22 @@ module Fastlane
|
|
16
19
|
#####################################################
|
17
20
|
def self.available_options
|
18
21
|
[
|
19
|
-
FastlaneCore::ConfigItem.new(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
FastlaneCore::ConfigItem.new(
|
23
|
+
key: :app_project_dir,
|
24
|
+
env_name: 'ANDROID_VERSIONING_APP_PROJECT_DIR',
|
25
|
+
description: 'The path to the application source folder
|
26
|
+
in the Android project (default: android/app)',
|
27
|
+
optional: true,
|
28
|
+
type: String,
|
29
|
+
default_value: 'android/app'
|
30
|
+
),
|
31
|
+
FastlaneCore::ConfigItem.new(
|
32
|
+
key: :flavor,
|
33
|
+
env_name: 'ANDROID_VERSIONING_FLAVOR',
|
34
|
+
description: 'The product flavor name (optional)',
|
35
|
+
optional: true,
|
36
|
+
type: String
|
37
|
+
)
|
25
38
|
]
|
26
39
|
end
|
27
40
|
|
@@ -31,7 +44,8 @@ module Fastlane
|
|
31
44
|
|
32
45
|
def self.details
|
33
46
|
[
|
34
|
-
"This action will return the current version code set
|
47
|
+
"This action will return the current version code set
|
48
|
+
on your project's build.gradle.kts."
|
35
49
|
].join(' ')
|
36
50
|
end
|
37
51
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fileutils'
|
2
4
|
|
3
5
|
module Fastlane
|
@@ -6,6 +8,7 @@ module Fastlane
|
|
6
8
|
def self.run(params)
|
7
9
|
GetValueFromBuildAction.run(
|
8
10
|
app_project_dir: params[:app_project_dir],
|
11
|
+
flavor: params[:flavor],
|
9
12
|
key: 'versionName',
|
10
13
|
type: 'param'
|
11
14
|
)
|
@@ -16,12 +19,21 @@ module Fastlane
|
|
16
19
|
#####################################################
|
17
20
|
def self.available_options
|
18
21
|
[
|
19
|
-
FastlaneCore::ConfigItem.new(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
FastlaneCore::ConfigItem.new(
|
23
|
+
key: :app_project_dir,
|
24
|
+
env_name: 'ANDROID_VERSIONING_APP_PROJECT_DIR',
|
25
|
+
description: 'The path to the application source folder in the Android project (default: android/app)',
|
26
|
+
optional: true,
|
27
|
+
type: String,
|
28
|
+
default_value: 'android/app'
|
29
|
+
),
|
30
|
+
FastlaneCore::ConfigItem.new(
|
31
|
+
key: :flavor,
|
32
|
+
env_name: 'ANDROID_VERSIONING_FLAVOR',
|
33
|
+
description: 'The product flavor name (optional)',
|
34
|
+
optional: true,
|
35
|
+
type: String
|
36
|
+
)
|
25
37
|
]
|
26
38
|
end
|
27
39
|
|
@@ -31,7 +43,8 @@ module Fastlane
|
|
31
43
|
|
32
44
|
def self.details
|
33
45
|
[
|
34
|
-
"This action will return the current version name set
|
46
|
+
"This action will return the current version name set
|
47
|
+
on your project's build.gradle.kts."
|
35
48
|
].join(' ')
|
36
49
|
end
|
37
50
|
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'tempfile'
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
module SharedValues
|
9
|
+
VERSION_CODE = :VERSION_CODE
|
10
|
+
end
|
11
|
+
|
12
|
+
class IncrementVersionCodeAction < Action
|
13
|
+
def self.run(params)
|
14
|
+
current_version_code = GetVersionCodeAction.run(params)
|
15
|
+
|
16
|
+
new_version_code =
|
17
|
+
if params[:version_code].nil?
|
18
|
+
current_version_code.to_i + 1
|
19
|
+
elsif params[:version_code] == -1
|
20
|
+
((Time.now.to_f * 1000).to_i / (60 * 1000)).to_i
|
21
|
+
else
|
22
|
+
params[:version_code].to_i
|
23
|
+
end
|
24
|
+
|
25
|
+
SetValueInBuildAction.run(
|
26
|
+
app_project_dir: params[:app_project_dir],
|
27
|
+
flavor: params[:flavor],
|
28
|
+
key: 'versionCode',
|
29
|
+
value: new_version_code
|
30
|
+
)
|
31
|
+
Actions.lane_context[SharedValues::VERSION_CODE] = new_version_code.to_s
|
32
|
+
new_version_code.to_s
|
33
|
+
end
|
34
|
+
|
35
|
+
#####################################################
|
36
|
+
# @!group Documentation
|
37
|
+
#####################################################
|
38
|
+
def self.available_options
|
39
|
+
[
|
40
|
+
FastlaneCore::ConfigItem.new(
|
41
|
+
key: :app_project_dir,
|
42
|
+
env_name: 'ANDROID_VERSIONING_APP_PROJECT_DIR',
|
43
|
+
description: 'The path to the application source folder
|
44
|
+
in the Android project (default: android/app)',
|
45
|
+
optional: true,
|
46
|
+
type: String,
|
47
|
+
default_value: 'android/app'
|
48
|
+
),
|
49
|
+
FastlaneCore::ConfigItem.new(
|
50
|
+
key: :flavor,
|
51
|
+
env_name: 'ANDROID_VERSIONING_FLAVOR',
|
52
|
+
description: 'The product flavor name (optional)',
|
53
|
+
optional: true,
|
54
|
+
type: String
|
55
|
+
),
|
56
|
+
FastlaneCore::ConfigItem.new(
|
57
|
+
key: :version_code,
|
58
|
+
env_name: 'ANDROID_VERSIONING_VERSION_CODE',
|
59
|
+
description: 'Change to a specific version (optional)',
|
60
|
+
optional: true,
|
61
|
+
type: Integer
|
62
|
+
)
|
63
|
+
]
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.description
|
67
|
+
'Increment the version code of your project'
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.details
|
71
|
+
[
|
72
|
+
'This action will increment the version code directly
|
73
|
+
in build.gradle.kts'
|
74
|
+
].join("\n")
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.output
|
78
|
+
[
|
79
|
+
['VERSION_CODE', 'The new version code']
|
80
|
+
]
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.authors
|
84
|
+
['Manabu OHTAKE']
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.is_supported?(platform)
|
88
|
+
platform == :android
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'tempfile'
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
module SharedValues
|
9
|
+
VERSION_NAME = :VERSION_NAME
|
10
|
+
end
|
11
|
+
|
12
|
+
class IncrementVersionNameAction < Action
|
13
|
+
def self.run(params)
|
14
|
+
if params[:version_name].nil? || params[:version_name].empty?
|
15
|
+
current_version = GetVersionNameAction.run(params)
|
16
|
+
unless current_version =~ /\d+.\d+.\d+/
|
17
|
+
UI.user_error!(
|
18
|
+
"Your current version (#{current_version})
|
19
|
+
does not respect the format A.B.C"
|
20
|
+
)
|
21
|
+
end
|
22
|
+
version = current_version.split('.').map(&:to_i)
|
23
|
+
case params[:bump_type]
|
24
|
+
when 'patch'
|
25
|
+
version[2] = version[2] + 1
|
26
|
+
new_version = version.join('.')
|
27
|
+
when 'minor'
|
28
|
+
version[1] = version[1] + 1
|
29
|
+
version[2] = version[2] = 0
|
30
|
+
new_version = version.join('.')
|
31
|
+
when 'major'
|
32
|
+
version[0] = version[0] + 1
|
33
|
+
version[1] = 0
|
34
|
+
version[2] = 0
|
35
|
+
new_version = version.join('.')
|
36
|
+
end
|
37
|
+
else
|
38
|
+
new_version = params[:version_name]
|
39
|
+
end
|
40
|
+
SetValueInBuildAction.run(
|
41
|
+
app_project_dir: params[:app_project_dir],
|
42
|
+
flavor: params[:flavor],
|
43
|
+
key: 'versionName',
|
44
|
+
value: new_version
|
45
|
+
)
|
46
|
+
Actions.lane_context[SharedValues::VERSION_NAME] = new_version
|
47
|
+
new_version
|
48
|
+
end
|
49
|
+
|
50
|
+
#####################################################
|
51
|
+
# @!group Documentation
|
52
|
+
#####################################################
|
53
|
+
def self.available_options
|
54
|
+
[
|
55
|
+
FastlaneCore::ConfigItem.new(
|
56
|
+
key: :app_project_dir,
|
57
|
+
env_name: 'ANDROID_VERSIONING_APP_PROJECT_DIR',
|
58
|
+
description: 'The path to the application source folder
|
59
|
+
in the Android project (default: android/app)',
|
60
|
+
optional: true,
|
61
|
+
type: String,
|
62
|
+
default_value: 'android/app'
|
63
|
+
),
|
64
|
+
FastlaneCore::ConfigItem.new(
|
65
|
+
key: :flavor,
|
66
|
+
env_name: 'ANDROID_VERSIONING_FLAVOR',
|
67
|
+
description: 'The product flavor name (optional)',
|
68
|
+
optional: true,
|
69
|
+
type: String
|
70
|
+
),
|
71
|
+
FastlaneCore::ConfigItem.new(
|
72
|
+
key: :bump_type,
|
73
|
+
env_name: 'ANDROID_VERSIONING_BUMP_TYPE',
|
74
|
+
description: 'Change to a specific type (optional)',
|
75
|
+
optional: true,
|
76
|
+
type: String,
|
77
|
+
default_value: 'patch',
|
78
|
+
verify_block:
|
79
|
+
proc do |value|
|
80
|
+
unless %w[
|
81
|
+
patch minor major
|
82
|
+
].include? value
|
83
|
+
UI.user_error!(
|
84
|
+
"Available values are 'patch', 'minor' and 'major'"
|
85
|
+
)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
),
|
89
|
+
FastlaneCore::ConfigItem.new(
|
90
|
+
key: :version_name,
|
91
|
+
env_name: 'ANDROID_VERSIONING_VERSION_NAME',
|
92
|
+
description: 'Change to a specific version (optional)',
|
93
|
+
optional: true,
|
94
|
+
type: String
|
95
|
+
)
|
96
|
+
]
|
97
|
+
end
|
98
|
+
|
99
|
+
def self.description
|
100
|
+
'Increment the version name of your project'
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.details
|
104
|
+
[
|
105
|
+
'This action will increment the version name directly
|
106
|
+
in build.gradle.kts'
|
107
|
+
].join("\n")
|
108
|
+
end
|
109
|
+
|
110
|
+
def self.output
|
111
|
+
[
|
112
|
+
['VERSION_NAME', 'The new version name']
|
113
|
+
]
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.authors
|
117
|
+
['Manabu OHTAKE']
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.is_supported?(platform)
|
121
|
+
platform == :android
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'tempfile'
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
class SetValueInBuildAction < Action
|
9
|
+
def self.run(params)
|
10
|
+
app_project_dir ||= params[:app_project_dir]
|
11
|
+
regex = /
|
12
|
+
(?<key>#{params[:key]}\s*=\s*)
|
13
|
+
(?<left>['"]?)
|
14
|
+
(?<value>[a-zA-Z0-9._]*)
|
15
|
+
(?<right>['"]?)
|
16
|
+
(?<comment>.*)
|
17
|
+
/x
|
18
|
+
flavor = params[:flavor]
|
19
|
+
flavor_specified = !(flavor.nil? || flavor.empty?)
|
20
|
+
regex_flavor = /[ \t]create\("#{flavor}"\)[ \t]/
|
21
|
+
found = false
|
22
|
+
product_flavors_section = false
|
23
|
+
flavor_found = false
|
24
|
+
Dir.glob("#{app_project_dir}/build.gradle.kts") do |path|
|
25
|
+
temp_file = Tempfile.new('versioning')
|
26
|
+
File.open(path, 'r') do |file|
|
27
|
+
file.each_line do |line|
|
28
|
+
if flavor_specified && !product_flavors_section
|
29
|
+
unless line.include?('productFlavors') || product_flavors_section
|
30
|
+
temp_file.puts line
|
31
|
+
next
|
32
|
+
end
|
33
|
+
product_flavors_section = true
|
34
|
+
end
|
35
|
+
|
36
|
+
if flavor_specified && !flavor_found
|
37
|
+
unless line.match(regex_flavor)
|
38
|
+
temp_file.puts line
|
39
|
+
next
|
40
|
+
end
|
41
|
+
flavor_found = true
|
42
|
+
end
|
43
|
+
|
44
|
+
unless line.match(regex) && !found
|
45
|
+
temp_file.puts line
|
46
|
+
next
|
47
|
+
end
|
48
|
+
line = line.gsub regex,
|
49
|
+
"\\k<key>\\k<left>#{params[:value]}\\k<right>\\k<comment>"
|
50
|
+
found = true
|
51
|
+
temp_file.puts line
|
52
|
+
end
|
53
|
+
file.close
|
54
|
+
end
|
55
|
+
temp_file.rewind
|
56
|
+
temp_file.close
|
57
|
+
|
58
|
+
begin
|
59
|
+
FileUtils.mv(temp_file.path, path)
|
60
|
+
rescue => ex
|
61
|
+
if ex.message.to_s.include? 'Operation not permitted'
|
62
|
+
FileUtils.cp(temp_file.path, path)
|
63
|
+
FileUtils.rm(temp_file.path)
|
64
|
+
else
|
65
|
+
raise ex
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
temp_file.unlink
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
#####################################################
|
74
|
+
# @!group Documentation
|
75
|
+
#####################################################
|
76
|
+
def self.available_options
|
77
|
+
[
|
78
|
+
FastlaneCore::ConfigItem.new(
|
79
|
+
key: :app_project_dir,
|
80
|
+
env_name: 'ANDROID_VERSIONING_APP_PROJECT_DIR',
|
81
|
+
description: 'The path to the application source folder
|
82
|
+
in the Android project (default: android/app)',
|
83
|
+
optional: true,
|
84
|
+
type: String,
|
85
|
+
default_value: 'android/app'
|
86
|
+
),
|
87
|
+
FastlaneCore::ConfigItem.new(
|
88
|
+
key: :flavor,
|
89
|
+
env_name: 'ANDROID_VERSIONING_FLAVOR',
|
90
|
+
description: 'The product flavor name (optional)',
|
91
|
+
optional: true,
|
92
|
+
type: String
|
93
|
+
),
|
94
|
+
FastlaneCore::ConfigItem.new(
|
95
|
+
key: :key,
|
96
|
+
description: 'The property key',
|
97
|
+
type: String
|
98
|
+
),
|
99
|
+
FastlaneCore::ConfigItem.new(
|
100
|
+
key: :value,
|
101
|
+
description: 'The property value',
|
102
|
+
type: String
|
103
|
+
)
|
104
|
+
]
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.description
|
108
|
+
'Set the value of your project'
|
109
|
+
end
|
110
|
+
|
111
|
+
def self.details
|
112
|
+
[
|
113
|
+
'This action will set the value directly in build.gradle.kts '
|
114
|
+
].join("\n")
|
115
|
+
end
|
116
|
+
|
117
|
+
def self.authors
|
118
|
+
['Manabu OHTAKE']
|
119
|
+
end
|
120
|
+
|
121
|
+
def self.is_supported?(platform)
|
122
|
+
platform == :android
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fastlane_core/ui/ui'
|
2
4
|
|
3
5
|
module Fastlane
|
4
|
-
UI = FastlaneCore::UI unless Fastlane.const_defined?(
|
6
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?('UI')
|
5
7
|
|
6
8
|
module Helper
|
7
9
|
class AndroidVersioningKtsHelper
|
@@ -9,7 +11,7 @@ module Fastlane
|
|
9
11
|
# as `Helper::AndroidVersioningKtsHelper.your_method`
|
10
12
|
#
|
11
13
|
def self.show_message
|
12
|
-
UI.message(
|
14
|
+
UI.message('Hello from the android_versioning_kts plugin helper!')
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-android_versioning_kts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zmunm
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,21 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: fastlane
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.130.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.130.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - ">="
|
@@ -39,7 +53,7 @@ dependencies:
|
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
@@ -53,7 +67,7 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
@@ -67,7 +81,7 @@ dependencies:
|
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: rspec_junit_formatter
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - ">="
|
@@ -122,21 +136,7 @@ dependencies:
|
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
|
-
|
126
|
-
name: fastlane
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 2.130.0
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 2.130.0
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email: atheist2197@gmail.com
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
@@ -148,13 +148,16 @@ files:
|
|
148
148
|
- lib/fastlane/plugin/android_versioning_kts/actions/get_value_from_build.rb
|
149
149
|
- lib/fastlane/plugin/android_versioning_kts/actions/get_version_code.rb
|
150
150
|
- lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb
|
151
|
+
- lib/fastlane/plugin/android_versioning_kts/actions/increment_version_code.rb
|
152
|
+
- lib/fastlane/plugin/android_versioning_kts/actions/increment_version_name.rb
|
153
|
+
- lib/fastlane/plugin/android_versioning_kts/actions/set_value_in_build.rb
|
151
154
|
- lib/fastlane/plugin/android_versioning_kts/helper/android_versioning_kts_helper.rb
|
152
155
|
- lib/fastlane/plugin/android_versioning_kts/version.rb
|
153
156
|
homepage: https://github.com/zmunm/fastlane-plugin-android-versioning-kts
|
154
157
|
licenses:
|
155
158
|
- MIT
|
156
159
|
metadata: {}
|
157
|
-
post_install_message:
|
160
|
+
post_install_message:
|
158
161
|
rdoc_options: []
|
159
162
|
require_paths:
|
160
163
|
- lib
|
@@ -169,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
172
|
- !ruby/object:Gem::Version
|
170
173
|
version: '0'
|
171
174
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
173
|
-
signing_key:
|
175
|
+
rubygems_version: 3.5.3
|
176
|
+
signing_key:
|
174
177
|
specification_version: 4
|
175
178
|
summary: android versioning for gradle kotlin DSL
|
176
179
|
test_files: []
|