-
Notifications
You must be signed in to change notification settings - Fork 244
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
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.