Skip to content

Commit c862451

Browse files
authored
Drop build.gradle support when version.properties can be used (#579)
2 parents 4fb0229 + 2d9d23c commit c862451

15 files changed

+108
-11
lines changed

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
### Breaking Changes
88

9-
_None_
9+
- Remove `build_gradle_path` parameter from `android_current_branch_is_hotfix` [#579]
1010

1111
### New Features
1212

@@ -18,15 +18,26 @@ _None_
1818

1919
### Internal Changes
2020

21-
- Deprecated the following actions: [#577]
21+
- Deprecated the following actions: [#577, #579]
2222
- `android_betabuild_prechecks`
2323
- `android_build_prechecks`
24+
- `android_bump_version_beta`
25+
- `android_bump_version_final_release`
26+
- `android_bump_version_hotfix`
27+
- `android_bump_version_release`
2428
- `android_codefreeze_prechecks`
2529
- `android_completecodefreeze_prechecks`
2630
- `android_finalize_prechecks`
31+
- `android_get_alpha_version`
32+
- `android_get_app_version`
33+
- `android_get_release_version`
2734
- `android_hotfix_prechecks`
35+
- `android_tag_build`
2836
- `ios_betabuild_prechecks`
2937
- `ios_build_prechecks`
38+
- `ios_bump_version_beta`
39+
- `ios_bump_version_hotfix`
40+
- `ios_bump_version_release`
3041
- `ios_codefreeze_prechecks`
3142
- `ios_completecodefreeze_prechecks`
3243
- `ios_finalize_prechecks`

MIGRATION.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Migration Instructions for Major Releases
22

3+
## From 11.x to 12.0.0
4+
5+
- `android_current_branch_is_hotfix` no longer supports the `build_gradle_path` parameter. Convert the project to define `versionName` and `versionCode` in `version.properties` and call `android_current_branch_is_hotfix` with `version_properties_path`.
6+
37
## From `10.0.0` to `11.0.0`
48

59
- The `ios_check_beta_deps` now uses the `Podfile.lock` instead of `Podfile` for its detection. If you called this action with an explicit `podfile: …` argument, you'll have to update the call to use `lockfile:` instead—or remove that argument completely from your call and rely on its default value being `Podfile.lock`.

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ def self.output
7878
def self.return_value
7979
end
8080

81+
def self.category
82+
:deprecated
83+
end
84+
85+
def self.deprecated_notes
86+
'This action is deprecated and will be removed in the next major version update of the Release Toolkit. Please use the formatters and calculators in the Versioning module to automate version changes.'
87+
end
88+
8189
def self.authors
8290
['Automattic']
8391
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ def self.available_options
7070
]
7171
end
7272

73+
def self.category
74+
:deprecated
75+
end
76+
77+
def self.deprecated_notes
78+
'This action is deprecated and will be removed in the next major version update of the Release Toolkit. Please use the formatters and calculators in the Versioning module to automate version changes.'
79+
end
80+
7381
def self.authors
7482
['Automattic']
7583
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ def self.available_options
7979
]
8080
end
8181

82+
def self.category
83+
:deprecated
84+
end
85+
86+
def self.deprecated_notes
87+
'This action is deprecated and will be removed in the next major version update of the Release Toolkit. Please use the formatters and calculators in the Versioning module to automate version changes.'
88+
end
89+
8290
def self.authors
8391
['Automattic']
8492
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ def self.output
9797
def self.return_value
9898
end
9999

100+
def self.category
101+
:deprecated
102+
end
103+
104+
def self.deprecated_notes
105+
'This action is deprecated and will be removed in the next major version update of the Release Toolkit. Please use the formatters and calculators in the Versioning module to automate version changes.'
106+
end
107+
100108
def self.authors
101109
['Automattic']
102110
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ class AndroidCurrentBranchIsHotfixAction < Action
88
def self.run(params)
99
require_relative '../../helper/android/android_version_helper'
1010

11-
build_gradle_path = params[:build_gradle_path]
1211
version_properties_path = params[:version_properties_path]
1312

1413
version = Fastlane::Helper::Android::VersionHelper.get_release_version(
15-
build_gradle_path: build_gradle_path,
14+
build_gradle_path: nil,
1615
version_properties_path: version_properties_path
1716
)
1817
Fastlane::Helper::Android::VersionHelper.is_hotfix?(version)
@@ -32,16 +31,10 @@ def self.details
3231

3332
def self.available_options
3433
[
35-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
36-
description: 'Path to the build.gradle file',
37-
type: String,
38-
optional: true,
39-
conflicting_options: [:version_properties_path]),
4034
FastlaneCore::ConfigItem.new(key: :version_properties_path,
4135
description: 'Path to the version.properties file',
4236
type: String,
43-
optional: true,
44-
conflicting_options: [:build_gradle_path]),
37+
optional: false),
4538
]
4639
end
4740

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ def self.return_value
4949
'Return the alpha version of the app'
5050
end
5151

52+
def self.category
53+
:deprecated
54+
end
55+
56+
def self.deprecated_notes
57+
'This action is deprecated and will be removed in the next major version update of the Release Toolkit. Please use the formatters and calculators in the Versioning module to automate version changes.'
58+
end
59+
5260
def self.authors
5361
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
5462
['Automattic']

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ def self.return_value
4949
'Return the public version of the app'
5050
end
5151

52+
def self.category
53+
:deprecated
54+
end
55+
56+
def self.deprecated_notes
57+
'This action is deprecated and will be removed in the next major version update of the Release Toolkit. Please use the formatters and calculators in the Versioning module to automate version changes.'
58+
end
59+
5260
def self.authors
5361
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
5462
['Automattic']

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ def self.return_value
4949
'Return the public version of the app'
5050
end
5151

52+
def self.category
53+
:deprecated
54+
end
55+
56+
def self.deprecated_notes
57+
'This action is deprecated and will be removed in the next major version update of the Release Toolkit. Please use the formatters and calculators in the Versioning module to automate version changes.'
58+
end
59+
5260
def self.authors
5361
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
5462
['Automattic']

0 commit comments

Comments
 (0)