-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18a9ef8
commit 62f2134
Showing
24 changed files
with
594 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ def template_hash | |
'configuration_env' => { description: '编译环境', default: 'dev', selection: %w[dev debug_iphoneos release_iphoneos] }, | ||
'code_repo_url' => { description: '源码私有源 Git 地址', default: '[email protected]:su350380433/example_spec_source.git' }, | ||
'binary_repo_url' => { description: '二进制私有源 Git 地址', default: '[email protected]:su350380433/example_spec_bin_dev.git' }, | ||
'binary_download_url' => { description: '二进制下载地址,内部会依次传入组件名称与版本,替换字符串中的 %s ', default: 'http://localhost:8080/frameworks/%s/%s.zip' }, | ||
'binary_download_url' => { description: '二进制下载地址,内部会依次传入组件名称与版本,替换字符串中的 %s ', default: 'http://localhost:8080/frameworks/%s/%s/zip' }, | ||
# 'binary_type' => { description: '二进制打包类型', default: 'framework', selection: %w[framework library] }, | ||
'download_file_type' => { description: '下载二进制文件类型', default: 'zip', selection: %w[zip tgz tar tbz txz dmg] } | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
module CBin | ||
VERSION = '0.2.9' | ||
VERSION = '0.3.0.12' | ||
end | ||
|
||
module Pod | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/build_utils.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
require 'yaml' | ||
require 'cocoapods-imy-bin/config/config' | ||
|
||
module CBin | ||
class Build | ||
|
||
class Utils | ||
|
||
def Utils.is_framework(spec) | ||
if Utils.uses_frameworks? | ||
return true | ||
end | ||
|
||
return Utils.is_swift_module(spec) | ||
end | ||
|
||
def Utils.is_swift_module(spec) | ||
|
||
is_framework = false | ||
dir = File.join(CBin::Config::Builder.instance.gen_dir, CBin::Config::Builder.instance.target_name) | ||
#auto 走这里 | ||
if File.exist?(dir) | ||
Dir.chdir(dir) do | ||
public_headers = Array.new | ||
spec_header_dir = "./Headers/Public/#{spec.name}" | ||
|
||
unless File.exist?(spec_header_dir) | ||
spec_header_dir = "./Pods/Headers/Public/#{spec.name}" | ||
end | ||
return false unless File.exist?(spec_header_dir) | ||
|
||
is_framework = File.exist?(File.join(spec_header_dir, "#{spec.name}-umbrella.h")) | ||
end | ||
end | ||
|
||
if $ARGV[1] == "local" | ||
is_framework = File.exist?(File.join(CBin::Config::Builder.instance.xcode_build_dir, "#{spec.name}.framework")) | ||
unless is_framework | ||
is_framework = File.exist?(File.join(CBin::Config::Builder.instance.xcode_BuildProductsPath_dir, "#{spec.name}","Swift Compatibility Header")) | ||
end | ||
end | ||
|
||
is_framework | ||
end | ||
|
||
def Utils.uses_frameworks? | ||
uses_frameworks = false | ||
Pod::Config.instance.podfile.target_definitions.each do |key,value| | ||
if key != "Pods" | ||
uses_frameworks = value.uses_frameworks? | ||
if uses_frameworks | ||
break ; | ||
end | ||
end | ||
end | ||
|
||
return uses_frameworks | ||
end | ||
|
||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.