Skip to content

Commit

Permalink
* Set correct project min-sdk and target on update
Browse files Browse the repository at this point in the history
* Bumped version to 0.5.0.rc.3
  • Loading branch information
donv committed Oct 28, 2011
1 parent 9aaf710 commit 6648bb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/ruboto.rb
Expand Up @@ -12,4 +12,5 @@
module Ruboto
GEM_ROOT = File.dirname(File.dirname(__FILE__))
ASSETS = File.join(GEM_ROOT, "assets")
MINIMUM_SUPPORTED_SDK = 'android-7'
end
2 changes: 1 addition & 1 deletion lib/ruboto/commands/base.rb
Expand Up @@ -44,7 +44,7 @@ def self.main
}
option("target") {
argument :required
defaults 'android-7'
defaults MINIMUM_SUPPORTED_SDK
description "Android version to target. Must begin with 'android-' (e.g., 'android-8' for froyo)"
}
option("min-sdk") {
Expand Down
3 changes: 3 additions & 0 deletions lib/ruboto/util/update.rb
Expand Up @@ -215,6 +215,9 @@ def update_manifest(min_sdk, target, force = false)
if sdk_element = verify_manifest.elements['uses-sdk']
min_sdk ||= sdk_element.attributes["android:minSdkVersion"]
target ||= sdk_element.attributes["android:targetSdkVersion"]
else
min_sdk ||= MINIMUM_SUPPORTED_SDK
target ||= MINIMUM_SUPPORTED_SDK
end
app_element = verify_manifest.elements['application']
app_element.attributes['android:icon'] ||= '@drawable/icon'
Expand Down

0 comments on commit 6648bb1

Please sign in to comment.