fastlane-plugin-android_emulator 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4abf0fd4e943f5472df569d20e2b0d895fb2f476
4
- data.tar.gz: d6a543c47f797cfd9b97a269e4da944df14c2ef6
3
+ metadata.gz: 17104a36bd72a96126cb59e9a36e911bfb2d5dc0
4
+ data.tar.gz: 9fa26d306438b27de51c827abc1b0a4060fa7eb0
5
5
  SHA512:
6
- metadata.gz: 939b5ca5cf743f5465ea060e0ea3c8d0650aae5f1536f006c262e7cf664f9a2b2eaa7d3088738040179f2df43e136ebd57e80ac6010e8932bf84f4ea06178e32
7
- data.tar.gz: 53d80c750a8ad8239718dca4ea55644287a4ffe156d5df01f6dd3dd52fdca348f229a51c61ba093feb8376ca3ea181eac9937e605483be11f0ef47f81ab03bd7
6
+ metadata.gz: e1dfc77a11cea89cf0440ec43a169989ea7563ac0cc478221b39358dc102ceed91c2a6af3f2ddf4a58df6d855f3007ec1039dc7131f35bfe9b97c44bf6e5db4a
7
+ data.tar.gz: 6b76a6887f4c470cf89df20b60b8d49e888d24e5448e0bf6fea6cc63377528be8eef8c223f28159614b6584ecaf54a40c4306d62a6517ca5290783c8ce2fbcf2
@@ -3,13 +3,10 @@ require_relative '../helper/android_emulator_helper'
3
3
 
4
4
  module Fastlane
5
5
  module Actions
6
- module SharedValues
7
- ANDROID_SDK_DIR = :ANDROID_SDK_DIR
8
- end
9
-
10
6
  class AndroidEmulatorAction < Action
11
7
  def self.run(params)
12
8
  sdk_dir = params[:sdk_dir]
9
+ port = params[:port]
13
10
  adb = "#{sdk_dir}/platform-tools/adb"
14
11
 
15
12
  UI.message("Stopping emulator")
@@ -39,7 +36,7 @@ module Fastlane
39
36
  end
40
37
 
41
38
  UI.message("Starting emulator")
42
- system("LC_NUMERIC=C; #{sdk_dir}/tools/emulator @#{params[:name]} > /dev/null 2>&1 &")
39
+ system("LC_NUMERIC=C; #{sdk_dir}/tools/emulator @#{params[:name]} -port #{port} > /dev/null 2>&1 &")
43
40
  sh("#{adb} -e wait-for-device")
44
41
 
45
42
  until Actions.sh("#{adb} -e shell getprop init.svc.bootanim", log: false).include? "stopped" do
@@ -56,6 +53,8 @@ module Fastlane
56
53
  sh("#{adb} -e shell settings put global sysui_demo_allowed 1")
57
54
  sh("#{adb} -e shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 0700")
58
55
  end
56
+
57
+ ENV['SCREENGRAB_SPECIFIC_DEVICE'] = "emulator-#{port}"
59
58
  end
60
59
 
61
60
  def self.description
@@ -82,7 +81,7 @@ module Fastlane
82
81
  FastlaneCore::ConfigItem.new(key: :sdk_dir,
83
82
  env_name: "ANDROID_SDK_DIR",
84
83
  description: "Path to the Android SDK DIR",
85
- default_value: Actions.lane_context[SharedValues::ANDROID_SDK_DIR],
84
+ default_value: ENV['ANDROID_HOME'] || ENV['ANDROID_SDK_ROOT'] || ENV['ANDROID_SDK'],
86
85
  optional: false,
87
86
  verify_block: proc do |value|
88
87
  UI.user_error!("No ANDROID_SDK_DIR given, pass using `sdk_dir: 'sdk_dir'`") unless value and !value.empty?
@@ -96,6 +95,11 @@ module Fastlane
96
95
  description: "Name of the AVD",
97
96
  default_value: "fastlane",
98
97
  optional: false),
98
+ FastlaneCore::ConfigItem.new(key: :port,
99
+ env_name: "AVD_PORT",
100
+ description: "Port of the emulator",
101
+ default_value: "5554",
102
+ optional: false),
99
103
  FastlaneCore::ConfigItem.new(key: :location,
100
104
  env_name: "AVD_LOCATION",
101
105
  description: "Set location of the the emulator '<longitude> <latitude>'",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidEmulator
3
- VERSION = "0.1.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_emulator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Ruhl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-25 00:00:00.000000000 Z
11
+ date: 2018-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry