Sha256: 273901ea4e0c91e1da4b7ea096d0cbc0f3e77f058a7c36f8ccae4f55e93c13da

Contents?: true

Size: 1.37 KB

Versions: 20

Compression:

Stored size: 1.37 KB

Contents

require 'bundler'
load 'lib/calabash-android/helpers.rb'

def build
  test_server_template_dir = File.join(File.dirname(__FILE__), 'test-server')

  Dir.mktmpdir do |workspace_dir|

    @test_server_dir = File.join(workspace_dir, 'test-server')
    FileUtils.cp_r(test_server_template_dir, workspace_dir)

    ant_executable = (is_windows? ? "ant.bat" : "ant")
    args = [
      ant_executable,
      "clean",
      "package",
      "-debug",
      "-Dtools.dir=\"#{tools_dir}\"",
      "-Dandroid.api.level=17",
      "-Dversion=#{Calabash::Android::VERSION}",
    ]
    Dir.chdir(@test_server_dir) do
      STDOUT.sync = true
      IO.popen(args.join(" ")) do |io|
        io.each { |s| print s }
      end
      if $?.exitstatus != 0
        puts "Could not build the test server. Please see the output above."
        exit $?.exitstatus
      end
    end

    FileUtils.mkdir_p "test_servers" unless File.exist? "test_servers"

    FileUtils.cp(File.join(@test_server_dir, "bin", "Test_unsigned.apk"), File.join(File.dirname(__FILE__), 'lib/calabash-android/lib/TestServer.apk'))
  end
end

task :build do
  unless File.exists? "test-server/calabash-js/src"
    puts "calabash-js not found!"
    puts "For instuctions see: https://github.com/calabash/calabash-android/wiki/Building-calabash-android"
    exit 1
  end

  build

  Rake::Task["install"].execute

end


Bundler::GemHelper.install_tasks

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
calabash-android-0.4.9 Rakefile
testautoa-0.4.5 Rakefile
calabash-android-0.4.9.pre4 Rakefile
calabash-android-0.4.9.pre3 Rakefile
calabash-android-0.4.9.pre2 Rakefile
calabash-android-0.4.9.pre1 Rakefile
calabash-android-0.4.8 Rakefile
calabash-android-0.4.7.pre10 Rakefile
calabash-android-0.4.7.pre9 Rakefile
calabash-android-0.4.7.pre8 Rakefile
calabash-android-0.4.7.pre7 Rakefile
calabash-android-0.4.7.pre6 Rakefile
calabash-android-0.4.7.pre4 Rakefile
calabash-android-0.4.7.pre3 Rakefile
calabash-android-0.4.7.pre2 Rakefile
calabash-android-0.4.7.pre1 Rakefile
testautoa-0.4.4 Rakefile
calabash-android-0.4.6 Rakefile
calabash-android-0.4.5 Rakefile
calabash-android-0.4.5.pre1 Rakefile