mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
droidgap parses the output of android list targets
to find the id for 'android-5' or defaults to 5 if it can't find the id in the output
This commit is contained in:
parent
37c3c2528d
commit
594e77690c
4
droidgap
4
droidgap
@ -45,7 +45,9 @@ class Build
|
||||
def create_android
|
||||
puts "Creating Android project..."
|
||||
|
||||
`android create project -t 5 -k #{ @pkg } -a #{ @name } -n #{ @name } -p #{ @path }`
|
||||
target_id = `android list targets` =~ /id:\s*(\d+).*android-5/ ? $1 : 5
|
||||
|
||||
`android create project -t #{target_id} -k #{ @pkg } -a #{ @name } -n #{ @name } -p #{ @path }`
|
||||
|
||||
FileUtils.mkdir_p File.join(@path, "assets", "www")
|
||||
FileUtils.cp_r File.join(@www, "."), File.join(@path, "assets", "www")
|
||||
|
Loading…
Reference in New Issue
Block a user