mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-05-16 18:09:31 +08:00
[rake] Re-instate top-level clean task and refactor into XcodeConfig.
Related to: *646cbb1918*bddc880f98
This commit is contained in:
@@ -42,6 +42,11 @@ unless ENV['RM_TARGET_BUILD']
|
||||
system("/usr/bin/ruby \"#{motion_bin_path}\" update --check")
|
||||
end
|
||||
|
||||
desc "Clear local build objects"
|
||||
task :clean do
|
||||
App.config.clean_project
|
||||
end
|
||||
|
||||
namespace :clean do
|
||||
desc "Clean all build objects"
|
||||
task :all do
|
||||
|
||||
@@ -291,7 +291,7 @@ EOS
|
||||
$stderr.puts '=' * 80
|
||||
end
|
||||
|
||||
def clean_project(platforms)
|
||||
def clean_project
|
||||
paths = [self.build_dir]
|
||||
paths.concat(Dir.glob(self.resources_dirs.flatten.map{ |x| x + '/**/*.{nib,storyboardc,momd}' }))
|
||||
paths.each do |p|
|
||||
|
||||
@@ -523,7 +523,3 @@ task :device => ['build', 'device:install', 'device:start']
|
||||
desc "Build the app then run it in the emulator"
|
||||
task :default => 'emulator:start'
|
||||
|
||||
desc "Clear local build objects"
|
||||
task :clean do
|
||||
App.config.clean_project
|
||||
end
|
||||
|
||||
@@ -236,7 +236,6 @@ module Motion; module Project;
|
||||
end
|
||||
|
||||
def clean_project
|
||||
super []
|
||||
vendored_bs_files(false).each do |path|
|
||||
if File.exist?(path)
|
||||
App.info 'Delete', path
|
||||
|
||||
@@ -37,11 +37,6 @@ require 'motion/project'
|
||||
require 'motion/project/template/ios-extension-config'
|
||||
require 'motion/project/template/ios-extension-builder'
|
||||
|
||||
desc "Clear local build objects"
|
||||
task :clean do
|
||||
App.config.clean_project(['iPhoneSimulator', 'iPhoneOS'])
|
||||
end
|
||||
|
||||
desc "Build the simulator version"
|
||||
task :default => :"build:simulator"
|
||||
|
||||
|
||||
@@ -37,11 +37,6 @@ require 'motion/project'
|
||||
require 'motion/project/template/ios-framework/config'
|
||||
require 'motion/project/template/ios-framework/builder'
|
||||
|
||||
desc "Clear local build objects"
|
||||
task :clean do
|
||||
App.config.clean_project(['iPhoneSimulator', 'iPhoneOS'])
|
||||
end
|
||||
|
||||
desc "Build the simulator version"
|
||||
task :default => :"build:simulator"
|
||||
|
||||
|
||||
@@ -33,11 +33,6 @@ require 'motion/project'
|
||||
require 'motion/project/template/ios/config'
|
||||
require 'motion/project/template/ios/builder'
|
||||
|
||||
desc "Clear local build objects"
|
||||
task :clean do
|
||||
App.config.clean_project(['iPhoneSimulator', 'iPhoneOS'])
|
||||
end
|
||||
|
||||
desc "Build the project, then run the simulator"
|
||||
task :default => :simulator
|
||||
|
||||
|
||||
@@ -32,11 +32,6 @@ require 'motion/project'
|
||||
require 'motion/project/template/osx/config'
|
||||
require 'motion/project/template/osx/builder'
|
||||
|
||||
desc "Clear local build objects"
|
||||
task :clean do
|
||||
App.config.clean_project(['MacOSX'])
|
||||
end
|
||||
|
||||
desc "Build the project, then run it"
|
||||
task :default => :run
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@ EOS
|
||||
@vendor_projects.delete_if { |x| x.path == path }
|
||||
end
|
||||
|
||||
def clean_project(platforms)
|
||||
def clean_project
|
||||
super
|
||||
@vendor_projects.each { |vendor| vendor.clean(platforms) }
|
||||
@targets.each { |target| target.clean }
|
||||
|
||||
Reference in New Issue
Block a user