Class: BDAwesomeTransmit::BDPodsTrans

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-BDTransform/command/BDTransform/develop/dev.rb

Class Method Summary collapse

Class Method Details

.accessor(podspec, subspecs, sandboxPath, podProjectPath, podspecName, workspacePath, workspaceName, effectedTargets) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/cocoapods-BDTransform/command/BDTransform/develop/dev.rb', line 52

def self.accessor(podspec,subspecs,sandboxPath,podProjectPath,podspecName,workspacePath,workspaceName,effectedTargets)
  @@library_to_build = Array.new()
  @@framework_to_build = Array.new()
  @@effectedTargets = effectedTargets
  @@podDirPath = sandboxPath
  @@subspecs_build = subspecs
  @@handlePodName = podspecName
  @@workspacePath = workspacePath
  @@workspaceName = workspaceName
  @@devPodPath = File.dirname(podspec)
  @@sandbox = Pod::Sandbox.new(sandboxPath)
  @@sandbox.store_podspec(podspecName,File.open(podspec, 'r:utf-8', &:read))
  @@path = Pod::Sandbox::PathList.new(@@devPodPath)
  @@spec = Pod::Specification.from_file(podspec)
  @@project = Xcodeproj::Project.open(podProjectPath)
  @@file_to_added = Array.new()
  @@file_to_resource = Array.new()
  @@bunlde_resource = Hash.new()
  @@resourceTarget = Array.new()
end

.add_pod_to_Dev(pod_name) ⇒ Object



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/cocoapods-BDTransform/command/BDTransform/develop/dev.rb', line 73

def self.add_pod_to_Dev(pod_name)

  @@project.main_group.new_group('Development Pods') unless self.isContainDevPod

  self.generatorTargetIfNeeded

  self.generatorNewGroup(pod_name)

  targetGroup = self.development_pod.new_group(pod_name)

  raise "Group of #{@@handlePodName} create fail,please retry" unless targetGroup

  buildFiles,headerFiles = self.sourceToAdded(targetGroup)

  self.addToTarget(buildFiles,pod_name)

  self.addResource

  self.addSupportFiles(pod_name)

  self.generatorSearchHeader(headerFiles,pod_name)

  self.rectifyconfig

  self.removeDepressedProductAndOfiles

  puts "  -> Pod transform complete! #{self.colorize("Note:Ensure the transform effective,Please close your project and reopen it","red")}"

end

.transmit(podspec, subspecs, sandboxPath, podProjectPath, podspecName, workspacePath, workspaceName, effectedTargets) ⇒ Object



46
47
48
49
50
# File 'lib/cocoapods-BDTransform/command/BDTransform/develop/dev.rb', line 46

def self.transmit(podspec,subspecs,sandboxPath,podProjectPath,podspecName,workspacePath,workspaceName,effectedTargets)
  self.accessor(podspec,subspecs,sandboxPath,podProjectPath,podspecName,workspacePath,workspaceName,effectedTargets)
  self.add_pod_to_Dev(podspecName)
  @@project.save
end