[rake] Re-instate top-level clean task and refactor into XcodeConfig.

Related to:
* 646cbb1918
* bddc880f98
This commit is contained in:
Eloy Durán
2014-10-17 12:55:57 +02:00
parent 2b5880021b
commit 478472308c
9 changed files with 7 additions and 27 deletions

View File

@@ -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

View File

@@ -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|

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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 }