cocoapods-jxedt 0.0.14 → 0.0.15

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: 9a42af93bf587f17cb6256301bdcc0b744cad56e731f8d00b4c11e072bf22058
4
- data.tar.gz: bfd62a6afcaf885d939778b70d21779730ce3b5bc1c59df7cf1d781ea10fb77a
3
+ metadata.gz: 87df49d02d7bd4e47d3a4279b4c075e9a55d260d25adc98223aced2c342bc804
4
+ data.tar.gz: 93fe5bda70d2c56b17b5c0e0b692bd96b6b5dc9aef8f7fc4ee014a860ea9f6d4
5
5
  SHA512:
6
- metadata.gz: 3d6963c2b36104bc5dbbd8b9d87c354d1074219662de03fac82b757245997a1b149c0c77711ca1cd640eb73181824aa9606181edf25372f0d891d91c1d2a7b42
7
- data.tar.gz: 7bf5ed75aae47c6eb983962d8a4e6f13725e179351d4b2a48f46876932a6f6e406f445248f0a780bf9c853489fb01a84f63e3b93d8b115ecbf02529a943897c0
6
+ metadata.gz: '09a2a403367a4d7b10b7d8b03741325faeb1a32b4d8af1dedce1712e62ad1f1e3b23b5aacc02a60b069f75c7c3ecca8140ea9962e111b2a89bcd394b5236ab74'
7
+ data.tar.gz: 7581173b0772a0a6abb08d71a76a9bf7b72faba95ca61aa7c4ebb09c03adf2af37f7db470f43d04bae33c635fc15430148867f3bafb30997cd8368611828acc3
@@ -7,35 +7,35 @@ module Jxedt
7
7
  attr_accessor :dsl_config
8
8
 
9
9
  APPLICABLE_DSL_CONFIG = {
10
- :all_binary => '全部组件允许使用二进制。默认为false',
11
- :binary_dir => "framework的保存路径,相对于'Pods/Pods.xcodeproj'的相对路径。默认为'../_Prebuild'",
12
- :binary_switch => "二进制开关,关闭则不hook pre_install过程。默认为true",
13
- :prebuild_job => "开启编译任务,设置为false则不触发编译。默认为true",
14
- :keep_source_project => "保留源码的pods工程,默认保留,方便查看源码",
15
- :dev_pods_enabled => "Development Pods是否支持binary。默认为false",
16
- :excluded_pods => "排除binary的pods",
17
- :xcconfig_configuration_alias => "xcconfig文件中configuration的别名,configurations设置为多个值的时候会用到,用于搜索替换。一般不需要设置,有默认值为'cocoapods-jxedt-binary'",
18
- :framework_header_search_enabled => "设置开启binary的framework是否配置framework的HEADER_SEARCH_PATH,兼容头文件引用的问题。默认为false",
19
- :silent_build => "静默编译。默认true",
10
+ :all_binary => '全部组件使用二进制。默认为false',
11
+ :binary_dir => "二进制文件的保存路径,'Pods/Pods.xcodeproj'文件的相对路径。默认为'../_Prebuild'",
12
+ :binary_switch => "插件开关,设置为false则关闭插件二进制功能。默认为true",
13
+ :prebuild_job => "开启编译任务,设置为false则不触发编译功能。默认为true",
14
+ :keep_source_project => "保留源码的pods工程,方便查看源码,文件目录为Podfile文件同级目录下'Pods-Source'。默认为false",
15
+ :dev_pods_enabled => "Development Pods是否支持二进制。默认为false",
16
+ :excluded_pods => "排除binary的pods,是一个数组。默认是[]",
17
+ :xcconfig_configuration_alias => "xcconfig文件中配置多configuration的别名(一定要唯一),用于搜索替换,我们用来支持多configuration的二进制。一般不需要设置,默认值为'cocoapods-jxedt-binary'",
18
+ :framework_header_search_enabled => "开启binary的组件是否配置HEADER_SEARCH_PATH头文件搜索,兼容头文件引用的问题。默认为false",
19
+ :silent_build => "静默编译,即不输出编译命令。默认true",
20
20
  :configurations => "支持的configuration配置,可以写字符串'Debug'或'Release',也可以写多个'['Debug', 'Release']'。默认为'Release'",
21
21
  :xcframework => "编译结果是否为xcframework。默认false",
22
- :clean_build => "编译的时候是否clean。默认true",
22
+ :clean_build => "编译的时候是否clean build。默认true",
23
23
  :bitcode_enabled => "开启bitcode。默认false",
24
- :device_build_enabled => "编译真机。默认true",
25
- :simulator_build_enabled => "编译模拟器。默认false",
26
- :disable_dsym => "禁止编译dsym产物。默认true",
27
- :disable_resource_compilable_pods => "禁止编译有需要编译的resource文件(xib、xcdatamodeld等)的pod",
28
- :build_log_path => "编译的log输出路径",
29
- :prebuild_sandbox_path => '预编译的sandbox路径,可以配置一个多台电脑都可访问的路径,可以做源码和二进制的link。必须以`/Users/cocoapods-jxedt`开头',
24
+ :device_build_enabled => "编译真机架构。默认true",
25
+ :simulator_build_enabled => "编译模拟器架构。默认false",
26
+ :disable_dsym => "禁止DSYM产物。默认true",
27
+ :disable_resource_compilable_pods => "禁止编译有特殊resource文件(xib、xcdatamodeld等)的pod。默认为false",
28
+ :build_log_path => "编译的log输出路径。",
29
+ :prebuild_sandbox_path => '预编译的sandbox(源码)路径,可以配置一个多台电脑都可访问的路径,做源码和二进制的link。必须以`/Users/cocoapods-jxedt`开头,否则插件认为无效。',
30
30
  :build_args => "编译的配置。了解xcodebuild命令的可以配置编译参数,例如配置 ARCHS='arm64 armv7'",
31
- :git_cache => 'git缓存配置,A Hash. 详情查看 GIT_CACHE_CONFIG'
31
+ :git_cache => 'git缓存配置。A Hash. 详情查看 GIT_CACHE_CONFIG'
32
32
  }.freeze
33
33
 
34
34
  GIT_CACHE_CONFIG = {
35
35
  :repo => '配置缓存仓库地址,如:{:remote => "https://github.com/user/cocoapods-cache.git", :local => "~/.cocoapods-jxedt/cocoapods-cache"},或者直接写远程仓库地址"https://github.com/user/cocoapods-cache.git"',
36
36
  :branch => 'git cache的branch,默认是master分支',
37
- :auto_fetch => 'pod install过程是否自动拉取远程的二进制,默认true',
38
- :auto_push => 'pod install过程是否自动同步二进制结果到远程仓库,默认false',
37
+ :auto_fetch => '预编译过程是否自动拉取远程的二进制。默认true',
38
+ :auto_push => '预编译过程是否自动同步二进制结果到远程。默认false'
39
39
  }.freeze
40
40
 
41
41
  def initialize()
@@ -147,9 +147,13 @@ module Jxedt
147
147
  def build_args
148
148
  @args ||= begin
149
149
  args = @dsl_config[:build_args] || {}
150
- args[:default] ||= ["ONLY_ACTIVE_ARCH=NO", "BUILD_LIBRARY_FOR_DISTRIBUTION=YES"]
151
- args[:device] ||= [] # ["ARCHS='arm64 armv7 armv7s'", "ONLY_ACTIVE_ARCH=NO"]
152
- args[:simulator] ||= [] # ["ARCHS='arm64 x86_64 i386'", "ONLY_ACTIVE_ARCH=NO"]
150
+ # 可选的配置项
151
+ default_options = []
152
+ default_options << "ONLY_ACTIVE_ARCH=NO"
153
+ default_options << "BUILD_LIBRARY_FOR_DISTRIBUTION=YES"
154
+ args[:default] ||= default_options
155
+ args[:device] ||= ["ARCHS='arm64'"] # ["ARCHS='arm64 armv7 armv7s'"]
156
+ args[:simulator] ||= ["ARCHS='x86_64'"] # ["ARCHS='arm64 x86_64 i386'"]
153
157
  args
154
158
  end
155
159
  end
@@ -111,23 +111,8 @@ module Pod
111
111
  def clean_source_project!
112
112
  return if Jxedt.config.keep_source_project?
113
113
 
114
- sources_root.rmtree if sources_root.exist?
114
+ sources_root.rmtree if real_path_compiler? && sources_root.exist?
115
115
  root.rmtree if root.exist?
116
116
  end
117
117
  end
118
- end
119
-
120
- module Pod
121
- class Installer
122
- # The {UserProjectIntegrator} integrates the libraries generated by
123
- # TargetDefinitions of the {Podfile} with their correspondent user
124
- # projects.
125
- #
126
- class UserProjectIntegrator
127
- alias_method :old_create_workspace, :create_workspace
128
- def create_workspace
129
- old_create_workspace unless sandbox.is_a?(Pod::JxedtPrebuildSandbox)
130
- end
131
- end
132
- end
133
118
  end
@@ -10,9 +10,9 @@ module Pod
10
10
  class Command
11
11
  class JxedtCommand < Command
12
12
  class Binary < JxedtCommand
13
- self.summary = '二进制相关操作,二进制build、fetch、clean、statistics'
13
+ self.summary = '二进制相关操作'
14
14
  self.description = <<-DESC
15
- 二进制相关操作,二进制build、fetch、push、statistics
15
+ 二进制相关操作,二进制build、clean、fetch、push、statistics
16
16
  DESC
17
17
  self.command = 'binary'
18
18
  self.abstract_command = true
@@ -5,7 +5,8 @@ module Pod
5
5
  class Build < Binary
6
6
  self.summary = '组件编译成二进制'
7
7
  self.description = <<-DESC
8
- 统计二进制组件
8
+ 编译组件为二进制\n
9
+ 编译结果目录默认在Podfile文件同级目录'Pods-Source/.command_build'
9
10
  DESC
10
11
  self.command = 'build'
11
12
  self.arguments = [
@@ -14,8 +15,8 @@ module Pod
14
15
  [
15
16
  ['--name', '编译的组件name,多个以,分隔'],
16
17
  ['--output-path', '编译的二进制文件输出路径'],
17
- ['--push', 'prebuild frameworks push origin.'],
18
- ['--force-push', 'force push generated frameworks']
18
+ ['--push', '编译的组件二进制推送到远程'],
19
+ ['--force-push', '强制推送编译的组件二进制到远程']
19
20
  ]
20
21
  end
21
22
  def initialize(argv)
@@ -3,18 +3,18 @@ module Pod
3
3
  class JxedtCommand < Command
4
4
  class Binary < JxedtCommand
5
5
  class Clean < Binary
6
- self.summary = 'clean cache repo.'
6
+ self.summary = '清除编译的组件二进制'
7
7
  self.description = <<-DESC
8
- clean cache repo.
8
+ 清除编译的组件二进制\n
9
9
  DESC
10
10
  self.command = 'clean'
11
11
  self.arguments = [
12
12
  ]
13
13
  def self.options
14
14
  [
15
- ['--name', 'Remove the file with the corresponding name.'],
16
- ['--local', 'Remove local cache.'],
17
- ['--all', 'Remove all files.'],
15
+ ['--name', '删除一个或多个二进制产物,多个以,分隔'],
16
+ ['--local', '只删除本地的二进制产物'],
17
+ ['--all', '删除所有的二进制产物,执行过程需要再次确认'],
18
18
  ]
19
19
  end
20
20
  def initialize(argv)
@@ -25,7 +25,7 @@ module Pod
25
25
  end
26
26
 
27
27
  def validate!
28
- help! "Please enter the necessary options." if @names.empty? && !@all
28
+ help! "至少要添加一个选项,'--name'或'--all'" if @names.empty? && !@all
29
29
  super
30
30
  end
31
31
 
@@ -71,7 +71,7 @@ module Pod
71
71
  else
72
72
  random = (0...10).map { (97 + rand(26)).chr }.join
73
73
  input = get_stdin("你确认要清除所有缓存吗?包括远程仓库的缓存。确认请输入: #{random}")
74
- help! "输入错误,自动退出。" if random != input
74
+ help! "输入错误,自动退出" if random != input
75
75
 
76
76
  local_cache_dir.rmtree if local_cache_dir.exist?
77
77
 
@@ -3,17 +3,18 @@ module Pod
3
3
  class JxedtCommand < Command
4
4
  class Binary < JxedtCommand
5
5
  class Code < Binary
6
- self.summary = 'binary and source code linked.'
6
+ self.summary = '创建源码链接'
7
7
  self.description = <<-DESC
8
- binary and source code linked.
8
+ 创建源码链接\n
9
+ 在'/Users/cocoapods-jxedt'目录下创建源码的链接,用于二进制调试
9
10
  DESC
10
11
  self.command = 'code'
11
12
  self.arguments = [
12
13
  ]
13
14
  def self.options
14
15
  [
15
- ['--link', 'link source code.'],
16
- ['--unlink', 'Remove source code linked.'],
16
+ ['--link', '创建源码软链接'],
17
+ ['--unlink', '删除软链接'],
17
18
  ]
18
19
  end
19
20
  def initialize(argv)
@@ -23,7 +24,7 @@ module Pod
23
24
  end
24
25
 
25
26
  def validate!
26
- help! "Please enter the necessary options." unless @link || @unlink
27
+ help! "至少要添加一个选项,'--link'或'--unlink'" unless @link || @unlink
27
28
  super
28
29
  end
29
30
 
@@ -3,9 +3,10 @@ module Pod
3
3
  class JxedtCommand < Command
4
4
  class Binary < JxedtCommand
5
5
  class Fecth < Binary
6
- self.summary = 'fetch cache repo.'
6
+ self.summary = '获取远程更新'
7
7
  self.description = <<-DESC
8
- fetch cache repo.
8
+ 获取远程更新\n
9
+ 更新远程仓库到本地,本地目录会放在'~/.cocoapods-jxedt/'
9
10
  DESC
10
11
  self.command = 'fetch'
11
12
  self.arguments = [
@@ -3,16 +3,16 @@ module Pod
3
3
  class JxedtCommand < Command
4
4
  class Binary < JxedtCommand
5
5
  class Push < Binary
6
- self.summary = 'sync local files to git repo.'
6
+ self.summary = '同步组件二进制产物到远程'
7
7
  self.description = <<-DESC
8
- sync local files to git repo.
8
+ 同步组件二进制产物到远程
9
9
  DESC
10
10
  self.command = 'push'
11
11
  self.arguments = [
12
12
  ]
13
13
  def self.options
14
14
  [
15
- ['--force-push', 'force push generated frameworks']
15
+ ['--force-push', '强制推送组件二进制到远程,远程有相同的校验和会被本地覆盖']
16
16
  ]
17
17
  end
18
18
  def initialize(argv)
@@ -3,9 +3,10 @@ module Pod
3
3
  class JxedtCommand < Command
4
4
  class Binary < JxedtCommand
5
5
  class SourceProject < Binary
6
- self.summary = '生成binary对应的源码工程'
6
+ self.summary = '生成源码Pods工程'
7
7
  self.description = <<-DESC
8
- 生成binary对应的源码工程
8
+ 生成源码Pods工程\n
9
+ 默认我们是不保留源码工程,如果需要查看组件源码时,可重新生成对应的源码工程,打开查看
9
10
  DESC
10
11
  self.command = 'sourceProject'
11
12
  self.arguments = [
@@ -5,7 +5,7 @@ module Pod
5
5
  class Statistics < Binary
6
6
  self.summary = '统计二进制使用情况'
7
7
  self.description = <<-DESC
8
- 统计二进制使用详情
8
+ 统计二进制组件使用详情\n
9
9
  DESC
10
10
  self.command = 'statistics'
11
11
  self.arguments = [
@@ -2,17 +2,17 @@ module Pod
2
2
  class Command
3
3
  class JxedtCommand < Command
4
4
  class Options < JxedtCommand
5
- self.summary = 'binary配置参数介绍'
5
+ self.summary = 'cocoapods-jxedt插件配置参数介绍。'
6
6
  self.description = <<-DESC
7
- binary插件配置介绍
7
+ cocoapods-jxedt插件配置参数介绍
8
8
  DESC
9
9
  self.command = 'options'
10
10
  self.arguments = [
11
11
  ]
12
12
  def self.options
13
13
  [
14
- ['--more-config', '获取cocoapods-jxedt插件的完整配置'],
15
- ['--config', '获取cocoapods-jxedt插件的基础配置']
14
+ ['--config', '获取cocoapods-jxedt插件的基础配置'],
15
+ ['--more-config', '获取cocoapods-jxedt插件的完整配置']
16
16
  ]
17
17
  end
18
18
  def initialize(argv)
@@ -2,9 +2,10 @@ module Pod
2
2
  class Command
3
3
  class JxedtCommand < Command
4
4
  class User < JxedtCommand
5
- self.summary = '用户操作,添加和删除用户目录,用来统一路径,方便做源码和二进制的link.'
5
+ self.summary = '用户操作,添加和删除用户目录,用来统一路径,方便做源码和二进制的link'
6
6
  self.description = <<-DESC
7
- 用户操作,添加和删除用户目录,用来统一路径,方便做源码和二进制的link.
7
+ 用户操作,添加和删除用户目录\n
8
+ 用来统一路径,方便做源码和二进制的链接
8
9
  DESC
9
10
  self.command = 'user'
10
11
  self.arguments = [
@@ -23,7 +24,7 @@ module Pod
23
24
  end
24
25
 
25
26
  def validate!
26
- help! '请指定要操作的命令, add or delete' unless @add || @delete
27
+ help! "请指定要操作的命令, '--add' '--delete'" unless @add || @delete
27
28
  help! '输入的目录不正确!' if @name.length == 0
28
29
  super
29
30
  end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsJxedt
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-jxedt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - guojiashuang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-10 00:00:00.000000000 Z
11
+ date: 2023-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods