cocoapods-jxedt 0.0.14 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-jxedt/binary/config.rb +27 -23
- data/lib/cocoapods-jxedt/binary/helper/prebuild_sandbox.rb +1 -16
- data/lib/cocoapods-jxedt/binary/hooks/pre_install.rb +4 -3
- data/lib/cocoapods-jxedt/command/binary/binary.rb +2 -2
- data/lib/cocoapods-jxedt/command/binary/command/build.rb +4 -3
- data/lib/cocoapods-jxedt/command/binary/command/clean.rb +7 -7
- data/lib/cocoapods-jxedt/command/binary/command/code.rb +6 -5
- data/lib/cocoapods-jxedt/command/binary/command/fetch.rb +3 -2
- data/lib/cocoapods-jxedt/command/binary/command/push.rb +3 -3
- data/lib/cocoapods-jxedt/command/binary/command/source_project.rb +3 -2
- data/lib/cocoapods-jxedt/command/binary/command/statistics.rb +1 -1
- data/lib/cocoapods-jxedt/command/options/options.rb +4 -4
- data/lib/cocoapods-jxedt/command/user/user.rb +4 -3
- data/lib/cocoapods-jxedt/gem_version.rb +1 -1
- data/lib/cocoapods-jxedt/git_helper/cache_fetcher.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97f69690fe092a3b3f3ac75812d982e144d4f5e8434e70d999ab81a6d0aeef89
|
4
|
+
data.tar.gz: 55319b9dd689f80433855208a24a81b4b85a6b1a898b88b9921b961ef6bae4a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecbb12c9bb4c7adac71673b5a47d02a80695112d0acfc157585448c761a91e8ee679d091500cbbcecabea583cfa92a76b1ac74738fc07bf3f8a70494f853c2be
|
7
|
+
data.tar.gz: 03cb1d511a955cbbe0b6925e1c03a1bc840f09095b91000c5ee581c692d4415adad79fd1b67213c6e712942afcd4d296285ecb9cc8667fdaa51f5a865dadf6d6
|
@@ -7,35 +7,35 @@ module Jxedt
|
|
7
7
|
attr_accessor :dsl_config
|
8
8
|
|
9
9
|
APPLICABLE_DSL_CONFIG = {
|
10
|
-
:all_binary => '
|
11
|
-
:binary_dir => "
|
12
|
-
:binary_switch => "
|
13
|
-
:prebuild_job => "开启编译任务,设置为false
|
14
|
-
:keep_source_project => "保留源码的pods
|
15
|
-
:dev_pods_enabled => "Development Pods
|
16
|
-
:excluded_pods => "排除binary的pods",
|
17
|
-
:xcconfig_configuration_alias => "xcconfig
|
18
|
-
:framework_header_search_enabled => "
|
19
|
-
:silent_build => "
|
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 => "
|
25
|
-
:simulator_build_enabled => "
|
26
|
-
:disable_dsym => "
|
27
|
-
:disable_resource_compilable_pods => "
|
28
|
-
:build_log_path => "编译的log
|
29
|
-
:prebuild_sandbox_path => '预编译的sandbox
|
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
|
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 => '
|
38
|
-
:auto_push => '
|
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
|
-
|
151
|
-
|
152
|
-
|
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
|
@@ -45,10 +45,11 @@ module Jxedt
|
|
45
45
|
# fetch cache and sync
|
46
46
|
if Jxedt.config.cache_repo_enabled? && Jxedt.config.auto_fetch?
|
47
47
|
log_section "🚗 Fetch git cache"
|
48
|
-
|
49
|
-
|
48
|
+
# 统计需要prebuild的targets
|
49
|
+
prebuild_pods = Jxedt::Prebuild.new(source_installer).targets_to_prebuild.map(&:pod_name)
|
50
|
+
binary_hash = prebuild_pods.reduce({}) do |hash, name|
|
50
51
|
checksum = prebuild_sandbox.source_lockfile.spec_checksums_hash_key(name)
|
51
|
-
hash.update(name => checksum)
|
52
|
+
hash.update(name => checksum)
|
52
53
|
end
|
53
54
|
|
54
55
|
require 'cocoapods-jxedt/git_helper/cache_fetcher'
|
@@ -10,9 +10,9 @@ module Pod
|
|
10
10
|
class Command
|
11
11
|
class JxedtCommand < Command
|
12
12
|
class Binary < JxedtCommand
|
13
|
-
self.summary = '
|
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', '
|
18
|
-
['--force-push', '
|
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 = '
|
6
|
+
self.summary = '清除编译的组件二进制'
|
7
7
|
self.description = <<-DESC
|
8
|
-
|
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', '
|
16
|
-
['--local', '
|
17
|
-
['--all', '
|
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! "
|
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! "
|
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 = '
|
6
|
+
self.summary = '创建源码链接'
|
7
7
|
self.description = <<-DESC
|
8
|
-
|
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', '
|
16
|
-
['--unlink', '
|
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! "
|
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 = '
|
6
|
+
self.summary = '获取远程更新'
|
7
7
|
self.description = <<-DESC
|
8
|
-
|
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 = '
|
6
|
+
self.summary = '同步组件二进制产物到远程'
|
7
7
|
self.description = <<-DESC
|
8
|
-
|
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', '
|
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 = '
|
6
|
+
self.summary = '生成源码Pods工程'
|
7
7
|
self.description = <<-DESC
|
8
|
-
|
8
|
+
生成源码Pods工程\n
|
9
|
+
默认我们是不保留源码工程,如果需要查看组件源码时,可重新生成对应的源码工程,打开查看
|
9
10
|
DESC
|
10
11
|
self.command = 'sourceProject'
|
11
12
|
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 = '
|
5
|
+
self.summary = 'cocoapods-jxedt插件配置参数介绍。'
|
6
6
|
self.description = <<-DESC
|
7
|
-
|
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
|
-
['--
|
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
|
-
|
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!
|
27
|
+
help! "请指定要操作的命令, '--add' 或 '--delete'" unless @add || @delete
|
27
28
|
help! '输入的目录不正确!' if @name.length == 0
|
28
29
|
super
|
29
30
|
end
|
@@ -19,6 +19,8 @@ module Jxedt
|
|
19
19
|
cache_dir = Pathname.new(Jxedt.config.git_cache_path) + "GeneratedFrameworks"
|
20
20
|
to_dir = Pathname.new(to_dir)
|
21
21
|
binary_hash.each do |name, checksum|
|
22
|
+
next if checksum.nil?
|
23
|
+
|
22
24
|
zip_file = cache_dir + name + "#{checksum}.zip"
|
23
25
|
next unless zip_file.exist?
|
24
26
|
|
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.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guojiashuang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|