fastlane-plugin-android_emulator 1.1.1 → 1.2.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c342be284340d90d3080c8548d3eeeeabb7d0c36f59029f2e8e8e9e762a64dca
|
4
|
+
data.tar.gz: 67f0593397dbe0179bbee05734668e3bc1ca38ffd9da6ed1780608c127f93e55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25a713f0b52b55c5b78342cd3f977b68874e29239c5f6b2686abb9268d353241b3637b6b5e5be254424be7cd7b7556b2d34668f7a0c8168c5c46324aa4656796
|
7
|
+
data.tar.gz: 7385cc4e351984156f4f14f98b0e899f9a255345c56605f73e65d10260120e0ee911cc0124a1bb0a0242c35c182a9b4915a86c08f41034394679da40e144da4c
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ With additional features:
|
|
21
21
|
|
22
22
|
## Example
|
23
23
|
|
24
|
-
**Available Options:** sdk_dir, package, name, device, port, location, demo_mode
|
24
|
+
**Available Options:** sdk_dir, package, name, device, port, location, demo_mode, cold_boot
|
25
25
|
|
26
26
|
```ruby
|
27
27
|
android_emulator(
|
@@ -29,7 +29,8 @@ android_emulator(
|
|
29
29
|
package: "system-images;android-24;google_apis;x86_64",
|
30
30
|
demo_mode: true,
|
31
31
|
sdk_dir: "PATH_TO_SDK",
|
32
|
-
device: "Nexus 5"
|
32
|
+
device: "Nexus 5",
|
33
|
+
cold_boot: false
|
33
34
|
)
|
34
35
|
```
|
35
36
|
|
@@ -4,6 +4,11 @@ require_relative '../helper/android_emulator_helper'
|
|
4
4
|
module Fastlane
|
5
5
|
module Actions
|
6
6
|
class AndroidEmulatorAction < Action
|
7
|
+
def self.avd_active(params)
|
8
|
+
image = params[:package].gsub(";", "/")
|
9
|
+
return File.readlines("#{Dir.home}/.android/avd/#{params[:name]}.avd/config.ini").grep(/#{image}/).size > 0
|
10
|
+
end
|
11
|
+
|
7
12
|
def self.run(params)
|
8
13
|
sdk_dir = params[:sdk_dir]
|
9
14
|
port = params[:port]
|
@@ -11,22 +16,24 @@ module Fastlane
|
|
11
16
|
|
12
17
|
UI.message("Stopping emulator")
|
13
18
|
system("#{adb} emu kill > /dev/null 2>&1 &")
|
14
|
-
sleep(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
19
|
+
sleep(3)
|
20
|
+
|
21
|
+
if !avd_active(params) || params[:cold_boot]
|
22
|
+
UI.message("Creating new emulator")
|
23
|
+
FastlaneCore::CommandExecutor.execute(
|
24
|
+
command: "#{sdk_dir}/tools/bin/avdmanager create avd -n '#{params[:name]}' -f -k '#{params[:package]}' -d '#{params[:device]}'",
|
25
|
+
print_all: true,
|
26
|
+
print_command: false
|
27
|
+
)
|
28
|
+
|
29
|
+
UI.message("Override configuration")
|
30
|
+
open("#{Dir.home}/.android/avd/#{params[:name]}.avd/config.ini", 'a') { |f|
|
31
|
+
f << "hw.gpu.mode=auto\n"
|
32
|
+
f << "hw.gpu.enabled=yes\n"
|
33
|
+
f << "skin.dynamic=yes\n"
|
34
|
+
f << "skin.name=1080x1920\n"
|
35
|
+
}
|
36
|
+
end
|
30
37
|
|
31
38
|
# Verify HAXM installed on mac
|
32
39
|
if FastlaneCore::Helper.mac?
|
@@ -113,7 +120,12 @@ module Fastlane
|
|
113
120
|
env_name: "AVD_DEMO_MODE",
|
114
121
|
description: "Set the emulator in demo mode",
|
115
122
|
is_string: false,
|
116
|
-
default_value: true)
|
123
|
+
default_value: true),
|
124
|
+
FastlaneCore::ConfigItem.new(key: :cold_boot,
|
125
|
+
env_name: "AVD_COLD_BOOT",
|
126
|
+
description: "Create a new AVD every run",
|
127
|
+
is_string: false,
|
128
|
+
default_value: false)
|
117
129
|
]
|
118
130
|
end
|
119
131
|
|
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: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Ruhl
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 2.78.0
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email: michael.ruhl@novatec-gmbh.de
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
@@ -152,7 +152,7 @@ homepage: https://github.com/NovaTecConsulting/fastlane-plugin-android_emulator
|
|
152
152
|
licenses:
|
153
153
|
- MIT
|
154
154
|
metadata: {}
|
155
|
-
post_install_message:
|
155
|
+
post_install_message:
|
156
156
|
rdoc_options: []
|
157
157
|
require_paths:
|
158
158
|
- lib
|
@@ -167,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
171
|
-
signing_key:
|
170
|
+
rubygems_version: 3.1.2
|
171
|
+
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Creates and starts an Android Emulator (AVD)
|
174
174
|
test_files: []
|