Class: Potemkin::AndroidBuilder

Inherits:
Builder
  • Object
show all
Defined in:
lib/potemkin/builder/android.rb

Instance Method Summary collapse

Methods inherited from Builder

#build, #clean, #config, #logger, #with_env_vars

Instance Method Details

#android_project_dirObject

The subfolder where the actual app is located



21
22
23
24
# File 'lib/potemkin/builder/android.rb', line 21

def android_project_dir
  raise "Please add project dir" unless config.android_project_dir
  config.android_project_dir
end

#build_commandObject

Returns the command to be executed to build This command should be run in the root of the project dir



11
12
13
# File 'lib/potemkin/builder/android.rb', line 11

def build_command
  "ant -f #{android_project_dir}/build.xml #{config.build_type}"
end

#clean_commandObject

this will clean out the bin directories within a project



16
17
18
# File 'lib/potemkin/builder/android.rb', line 16

def clean_command
  "ant -f #{android_project_dir}/build.xml clean"
end

#env_varsObject

android needs the ANDROID_HOME dir to be set in the environment



5
6
7
# File 'lib/potemkin/builder/android.rb', line 5

def env_vars
  { "ANDROID_HOME" => config.sdk_root }
end