Skip to content

Commit 48c5503

Browse files
author
彭懂
committed
ADD: 添加源码排序
1 parent 43c3886 commit 48c5503

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

lib/cocoapods-ppbuild/Reference/reference_source_code.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def refrence_source_code
1717
exsited_framework_pod_names.each do |target_name|
1818
real_reference("_Prebuild/#{target_name}", project, target_name)
1919
end
20+
group = project.main_group.find_subpath(File.join("SourceCode"), true)
21+
group.sort_by_type
2022
project.save;
2123
end
2224

@@ -34,14 +36,14 @@ def real_reference(file_path, project, target_name)
3436

3537
#添加文件链接
3638
def add_files_to_group(group)
37-
Dir.foreach(group.real_path) do |entry|
38-
filePath = File.join(group.real_path, entry)
39-
# 过滤目录和.DS_Store文件
40-
if entry != ".DS_Store" && !filePath.to_s.end_with?(".meta") &&entry != "." &&entry != ".." then
41-
# 向group中增加文件引用
42-
group.new_reference(filePath)
39+
Dir.foreach(group.real_path) do |entry|
40+
filePath = File.join(group.real_path, entry)
41+
# 过滤目录和.DS_Store文件
42+
if entry != ".DS_Store" && !filePath.to_s.end_with?(".meta") &&entry != "." &&entry != ".." then
43+
# 向group中增加文件引用
44+
group.new_reference(filePath)
45+
end
4346
end
44-
end
4547
end
4648
end
4749
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module CocoapodsPpbuild
2-
VERSION = "1.0.5"
2+
VERSION = "1.0.6"
33
end

0 commit comments

Comments
 (0)