mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-14 01:55:52 +08:00
[RM-651] allow to run rake task other than `build' in Extension/Framework project
http://hipbyte.myjetbrains.com/youtrack/issue/RM-651 Conflicts: NEWS
This commit is contained in:
@@ -75,6 +75,10 @@ PLIST
|
||||
end
|
||||
|
||||
def build(config, platform, opts)
|
||||
unless ENV['RM_TARGET_BUILD']
|
||||
App.fail "Extension targets must be built from an application project"
|
||||
end
|
||||
|
||||
@host_app_dir = ENV['RM_TARGET_HOST_APP_PATH']
|
||||
config.sdk_version = ENV['RM_TARGET_SDK_VERSION'] if ENV['RM_TARGET_SDK_VERSION']
|
||||
config.deployment_target = ENV['RM_TARGET_DEPLOYMENT_TARGET'] if ENV['RM_TARGET_DEPLOYMENT_TARGET']
|
||||
|
||||
@@ -29,10 +29,6 @@ require 'motion/util/version'
|
||||
App = Motion::Project::App
|
||||
App.template = :'ios-extension'
|
||||
|
||||
unless ENV['RM_TARGET_BUILD']
|
||||
App.fail "Extension targets must be built from an application project"
|
||||
end
|
||||
|
||||
require 'motion/project'
|
||||
require 'motion/project/template/ios-extension-config'
|
||||
require 'motion/project/template/ios-extension-builder'
|
||||
|
||||
@@ -29,10 +29,6 @@ require 'motion/util/version'
|
||||
App = Motion::Project::App
|
||||
App.template = :'ios-framework'
|
||||
|
||||
unless ENV['RM_TARGET_BUILD']
|
||||
App.fail "Framework targets must be built from an application project"
|
||||
end
|
||||
|
||||
require 'motion/project'
|
||||
require 'motion/project/template/ios-framework/config'
|
||||
require 'motion/project/template/ios-framework/builder'
|
||||
|
||||
@@ -28,6 +28,10 @@ require 'motion/project/builder'
|
||||
module Motion; module Project
|
||||
class Builder
|
||||
def build(config, platform, opts)
|
||||
unless ENV['RM_TARGET_BUILD']
|
||||
App.fail "Framework targets must be built from an application project"
|
||||
end
|
||||
|
||||
@host_app_dir = ENV['RM_TARGET_HOST_APP_PATH']
|
||||
config.sdk_version = ENV['RM_TARGET_SDK_VERSION'] if ENV['RM_TARGET_SDK_VERSION']
|
||||
config.deployment_target = ENV['RM_TARGET_DEPLOYMENT_TARGET'] if ENV['RM_TARGET_DEPLOYMENT_TARGET']
|
||||
|
||||
Reference in New Issue
Block a user