fastlane-plugin-zhuixi_build_app 1.1.4 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c575f8e5b9ee7687db6d18d76dac2f2d68e31f231269e959a68f242b8ab0971f
4
- data.tar.gz: 75deb1d17b66b273c00ed7dd3bf8c6179df38161afe8e39454f2ad04d9dea314
3
+ metadata.gz: 2a786dd65817d36b83f169b33f472a9bdac63ec885089d589d08340fbd2466f8
4
+ data.tar.gz: ba724d3d1e71d302f95215f9d83931b41f6a250c04e39aac49ac7637aeb64b94
5
5
  SHA512:
6
- metadata.gz: 87a97332998883719c2f17164cfb20287bd456649b508de05c7423b83a7db133fd064d43325240add5a0c651fa775132567b68f036fe518e7a4de6dfb6270abb
7
- data.tar.gz: 74464ba72e875a7e986d0de1f39a6b2d0b08ebd56b69fe91364abdab364266babd1745ad11f88ce8ace70e884e9f50294112a079af435ecc55468f42e261d310
6
+ metadata.gz: 1c3b280d54cec8742a626a78a10e52738bd023368109734054281372477ce3b51c7965461aebef303b24ac595bbc328742f6a3edfe4805493f18c210d6485adc
7
+ data.tar.gz: 460e93533173ec11e9dce116543fd872c8d8cf4a4ecb8fc57f76318669d04135d5c1888fa555d649aaa24ba475b7a31551ddb3b3812c4c4a0852f331e5f481a2
@@ -2,6 +2,7 @@ require "fastlane/action"
2
2
  require_relative "../actions/base_action"
3
3
  require_relative "../helper/zhuixi_build_app_helper"
4
4
  require "mini_magick"
5
+ require "json"
5
6
 
6
7
  module Fastlane
7
8
  module Actions
@@ -189,14 +190,35 @@ module Fastlane
189
190
  lane_context[:target].build_configuration_list.build_configurations.each do |config|
190
191
  config.build_settings["INFOPLIST_FILE"] = File.join(lane_context[:zhuixi_path], "Info.plist")
191
192
  end
193
+ #更新部分渠道配置文件
194
+ update_channel_config()
192
195
  lane_context[:project].save
193
196
  add_channel_sdk_library()
194
197
  end
198
+
199
+ def self.update_channel_config()
200
+ if lane_context[:selectPlatformName] == "神起"
201
+ vconfig_json = File.join(
202
+ lane_context[:zhuixi_path],
203
+ "resources",
204
+ "SDKs",
205
+ "VCConfig.json"
206
+ )
207
+ json = JSON.parse(File.read(vconfig_json))
208
+ json["appId"] = lane_context[:configParams][:channel_appid.to_s]
209
+ json["appKey"] = lane_context[:configParams][:channel_appkey.to_s]
210
+ File.open(vconfig_json, "w") do |f|
211
+ f.puts JSON.pretty_generate(json)
212
+ end
213
+ end
214
+ end
215
+
195
216
  # 是否在动态库集合
196
217
  def self.isEmbedFramework(filename)
197
218
  framework_path = filename.to_s
198
219
  framework_name = File.basename(framework_path, ".*") # 提取 .framework 文件的名称
199
- if lane_context[:platform_id] == 59 && framework_name == "boRanSDK"
220
+ platform_id = [59, 61, 62]
221
+ if platform_id.include?(lane_context[:platform_id])
200
222
  # 在 .framework 目录中搜索与文件名相同的文件
201
223
  file_path = Dir.glob("#{framework_path}/#{framework_name}").first
202
224
 
@@ -240,7 +262,7 @@ module Fastlane
240
262
 
241
263
  # 查询所有文件
242
264
  def self.getAllRes(rootDir)
243
- isfile = rootDir.to_s.end_with?(".framework", ".bundle", ".png", ".storyboard")
265
+ isfile = rootDir.to_s.end_with?(".framework", ".bundle", ".png", ".storyboard", ".json")
244
266
  launchimage_path = lane_context[:configParams]["channel_orientation"] == "portrait" ? "launchimage-landscape" : "launchimage-portrait"
245
267
  if File.directory?(rootDir) and !isfile
246
268
  Dir.foreach(rootDir) do |filepath|
@@ -304,7 +326,7 @@ module Fastlane
304
326
  end
305
327
  end
306
328
  lane_context[:target].frameworks_build_phase.add_file_reference(file_ref, true)
307
- elsif filename.to_s.end_with?(".plist", ".bundle", ".png", ".storyboard")
329
+ elsif filename.to_s.end_with?(".plist", ".bundle", ".png", ".storyboard", ".json")
308
330
  lane_context[:target].resources_build_phase.add_file_reference(file_ref, true)
309
331
  elsif filename.to_s.end_with?(".m", ".mm", ".cpp")
310
332
  lane_context[:target].source_build_phase.add_file_reference(file_ref, true)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ZhuixiBuildApp
3
- VERSION = "1.1.4"
3
+ VERSION = "1.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-zhuixi_build_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedSevenMale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-31 00:00:00.000000000 Z
11
+ date: 2023-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler