fastlane-plugin-xamarin_native 0.1.0 → 2.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: d4666af6955d74348e9baca8a898f1165b66a22a5cd93dbab5319ff73f7f0e4c
4
- data.tar.gz: dd18f6a4fc75e2918dc9400745ec6c1ed32524d767b66cf3cacde6164d3079ce
3
+ metadata.gz: 8e82e4b3b02ed9aa555e058236ef9a8bc74b68986c2b28b05675e2f8a5263f0f
4
+ data.tar.gz: 66b3d7a35df64b412edc15dfb333694c34c3cba1a49750682ec81242f43e561a
5
5
  SHA512:
6
- metadata.gz: 48ac2ba499c20ec16a41d44a187e0eb4218b0d3c33bf22def6510d3695caadcdab0beea37f31858fd0ff9944811ffb1e1a5b35324c142f337f4379b93326aee8
7
- data.tar.gz: 33e7e429cb81f46d26e3ddd1b4dd2c24d3a025fd516e80e8569e428a43ba5fe17951dab2760a93b147c60e5de78f695b7f039bb6fdaa54cd3f7962ea5e135ae3
6
+ metadata.gz: 30d9f3daa32138f98f64e0ec51a5cdce4f04fb806e169112de7a0b63a671de69850b328ae7dc29f459d75d81f45b76139cabf9f7570387a2ad8585f6a9f61e08
7
+ data.tar.gz: 5dd731e295efe5afb933b6eaf295f4b862857bd14dd423b97a1c498986e4d5bb0ccebc14e08f5f7f5734b369c5b746cca2b70e49fed0cc14aa30461367869bde
@@ -0,0 +1,215 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/xamarin_native_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class DotnetAction < Action
7
+ DOTNET = '/usr/local/share/dotnet/dotnet'.freeze
8
+ ACTION = %w(build publish).freeze
9
+ TARGET = %w(build rebuild clean).freeze
10
+ CONFIGURATION = %w(Release Debug).freeze
11
+ FRAMEWORK = %(net8.0-ios net8.0-android)
12
+ RUNTIME_IDENTIFIER = %w(ios-arm64 android-arm64).freeze
13
+ PRINT_ALL = [true, false].freeze
14
+
15
+ def self.run(params)
16
+ build(params)
17
+ end
18
+
19
+ def self.build(params)
20
+ action = params[:action]
21
+ target = params[:target]
22
+ configuration = params[:configuration]
23
+ framework = params[:framework]
24
+ runtime_identifier = params[:runtime_identifier]
25
+ solution = params[:solution]
26
+ project = params[:project]
27
+ output_path = params[:output_path]
28
+ ipa_name = params[:ipa_name]
29
+ sign_apk = params[:sign_apk]
30
+ android_signing_keystore = params[:android_signing_keystore]
31
+ android_signing_key_pass = params[:android_signing_key_pass]
32
+ android_signing_store_pass = params[:android_signing_store_pass]
33
+ android_signing_key_alias = params[:android_signing_key_alias]
34
+
35
+ command = "#{DOTNET} "
36
+ command << "#{action} "
37
+ command << "-t:#{target} " if target != nil
38
+ command << "-r #{runtime_identifier} " if runtime_identifier != nil
39
+ command << "-f #{framework} " if framework != nil
40
+ command << "-c #{configuration} " if configuration != nil
41
+ command << "-o #{output_path} " if output_path != nil
42
+
43
+ command << "-p:BuildIpa=True " if ipa_name != nil
44
+ command << "-p:IpaPackageName=#{ipa_name} " if ipa_name != nil
45
+
46
+ command << "-p:AndroidKeyStore=True " if sign_apk == true
47
+ command << "-p:AndroidSigningKeyStore=#{android_signing_keystore} " if android_signing_keystore != nil
48
+ command << "-p:AndroidSigningKeyPass=#{android_signing_key_pass} " if android_signing_key_pass != nil
49
+ command << "-p:AndroidSigningStorePass=#{android_signing_store_pass} " if android_signing_store_pass != nil
50
+ command << "-p:AndroidSigningKeyAlias=#{android_signing_key_alias} " if android_signing_key_alias != nil
51
+
52
+ command << project if project != nil
53
+ command << solution if solution != nil
54
+ Helper::XamarinNativeHelper.bash(command, !params[:print_all])
55
+ end
56
+
57
+ def self.description
58
+ "Build Xamarin.Native iOS and Android projects using msbuild"
59
+ end
60
+
61
+ def self.authors
62
+ ["illania"]
63
+ end
64
+
65
+ def self.available_options
66
+ [
67
+ FastlaneCore::ConfigItem.new(
68
+ key: :action,
69
+ env_name: 'FL_XN_BUILD_ACTION',
70
+ description: 'Build or Publish action',
71
+ type: String,
72
+ optional: false,
73
+ verify_block: proc do |value|
74
+ UI.user_error!("Unsupported value! Use one of #{ACTION.join '\' '}".red) unless ACTION.include? value
75
+ end
76
+ ),
77
+
78
+ FastlaneCore::ConfigItem.new(
79
+ key: :solution,
80
+ env_name: 'FL_XN_BUILD_SOLUTION',
81
+ description: 'Path to Maui.sln file',
82
+ type: String,
83
+ optional: true,
84
+ verify_block: proc do |value|
85
+ UI.user_error!('File not found'.red) unless File.file? value
86
+ end
87
+ ),
88
+
89
+ FastlaneCore::ConfigItem.new(
90
+ key: :project,
91
+ env_name: 'FL_XN_BUILD_PROJECT',
92
+ description: 'Project to build or publish',
93
+ type: String,
94
+ optional: true,
95
+ verify_block: proc do |value|
96
+ UI.user_error!('File not found'.red) unless File.file? value
97
+ end
98
+ ),
99
+
100
+ FastlaneCore::ConfigItem.new(
101
+ key: :framework,
102
+ env_name: 'FL_XN_BUILD_FRAMEWORK',
103
+ description: 'Build Framework',
104
+ type: String,
105
+ optional: false,
106
+ verify_block: proc do |value|
107
+ UI.user_error!("Unsupported value! Use one of #{FRAMEWORK.join '\' '}".red) unless FRAMEWORK.include? value
108
+ end
109
+ ),
110
+
111
+ FastlaneCore::ConfigItem.new(
112
+ key: :runtime_identifier,
113
+ env_name: 'FL_XN_BUILD_RUNTIME_IDENTIFIER',
114
+ description: 'Runtime Identifier',
115
+ type: String,
116
+ optional: true,
117
+ verify_block: proc do |value|
118
+ UI.user_error!("Unsupported value! Use one of #{RUNTIME_IDENTIFIER.join '\' '}".red) unless RUNTIME_IDENTIFIER.include? value
119
+ end
120
+ ),
121
+
122
+ FastlaneCore::ConfigItem.new(
123
+ key: :configuration,
124
+ env_name: 'FL_XN_CONFIGURATION',
125
+ description: 'Release or Debug',
126
+ type: String,
127
+ optional: false,
128
+ verify_block: proc do |value|
129
+ UI.user_error!("Unsupported value! Use one of #{CONFIGURATION.join '\' '}".red) unless CONFIGURATION.include? value
130
+ end
131
+ ),
132
+
133
+ FastlaneCore::ConfigItem.new(
134
+ key: :target,
135
+ env_name: 'FL_XN_BUILD_TARGET',
136
+ description: 'Target build type',
137
+ type: String,
138
+ optional: true,
139
+ verify_block: proc do |value|
140
+ UI.user_error!("Unsupported value! Use one of #{TARGET.join '\' '}".red) unless TARGET.include? value
141
+ end
142
+ ),
143
+
144
+ FastlaneCore::ConfigItem.new(
145
+ key: :print_all,
146
+ env_name: 'FL_XN_BUILD_PRINT_ALL',
147
+ description: 'Print std out',
148
+ default_value: true,
149
+ is_string: false,
150
+ optional: true,
151
+ verify_block: proc do |value|
152
+ UI.user_error!("Unsupported value! Use one of #{PRINT_ALL.join '\' '}".red) unless PRINT_ALL.include? value
153
+ end
154
+ ),
155
+
156
+ FastlaneCore::ConfigItem.new(
157
+ key: :output_path,
158
+ env_name: 'FL_XN_BUILD_OUTPUT_PATH',
159
+ description: 'Build output path for ipa and apk files',
160
+ is_string: true,
161
+ optional: true
162
+ ),
163
+ FastlaneCore::ConfigItem.new(
164
+ key: :ipa_name,
165
+ env_name: 'FL_XN_BUILD_IPA_NAME',
166
+ description: 'Ipa name for iOS app',
167
+ is_string: true,
168
+ optional: true
169
+ ),
170
+ FastlaneCore::ConfigItem.new(
171
+ key: :sign_apk,
172
+ env_name: 'FL_XN_BUILD_SIGN_APK',
173
+ description: 'Sets if apk should be created and signed',
174
+ is_string: false,
175
+ optional: true,
176
+ default_value: false
177
+ ),
178
+ FastlaneCore::ConfigItem.new(
179
+ key: :android_signing_keystore,
180
+ env_name: 'FL_XN_BUILD_DROID_SIGNING_KEYSTORE',
181
+ description: 'Sets Android Signing KeyStore',
182
+ is_string: true,
183
+ optional: true
184
+ ),
185
+ FastlaneCore::ConfigItem.new(
186
+ key: :android_signing_key_pass,
187
+ env_name: 'FL_XN_BUILD_DROID_SIGNING_KEY_PASS',
188
+ description: 'Sets Android Signing Key Password',
189
+ is_string: true,
190
+ optional: true
191
+ ),
192
+ FastlaneCore::ConfigItem.new(
193
+ key: :android_signing_store_pass,
194
+ env_name: 'FL_XN_BUILD_DROID_SIGNING_STORE_PASS',
195
+ description: 'Sets Android Signing Store Password',
196
+ is_string: true,
197
+ optional: true
198
+ ),
199
+ FastlaneCore::ConfigItem.new(
200
+ key: :android_signing_key_alias,
201
+ env_name: 'FL_XN_BUILD_DROID_SIGNING_KEY_ALIAS',
202
+ description: 'Sets Android Signing Key Alias',
203
+ is_string: true,
204
+ optional: true
205
+ )
206
+ ]
207
+ end
208
+
209
+ def self.is_supported?(platform)
210
+ [:ios, :android].include?(platform)
211
+ end
212
+
213
+ end
214
+ end
215
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module XamarinNative
3
- VERSION = "0.1.0"
3
+ VERSION = "2.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-xamarin_native
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - illania
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-24 00:00:00.000000000 Z
11
+ date: 2024-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -189,6 +189,7 @@ files:
189
189
  - lib/fastlane/plugin/xamarin_native.rb
190
190
  - lib/fastlane/plugin/xamarin_native/actions/bump_code.rb
191
191
  - lib/fastlane/plugin/xamarin_native/actions/bump_version.rb
192
+ - lib/fastlane/plugin/xamarin_native/actions/dotnet.rb
192
193
  - lib/fastlane/plugin/xamarin_native/actions/msbuild.rb
193
194
  - lib/fastlane/plugin/xamarin_native/actions/nuget.rb
194
195
  - lib/fastlane/plugin/xamarin_native/helper/xamarin_native_helper.rb