fastlane-plugin-android_emulator_kami 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc498287d6deef8860628a45af1bdf3865b742c6c14ae9a76c10afe91fddba61
4
- data.tar.gz: 8800c9ad8e7718377b637e2d01d10796f43775b43d4fdf364760ae5e01562734
3
+ metadata.gz: 7837b5a2aae20491cb8f8c71bb1ba6d7196431b8f6921d5fad2a09449141a7d5
4
+ data.tar.gz: 280a25b37a09d16fd0f425c9f6886e3088433a1cf3c1b813afc607e57c60ecfe
5
5
  SHA512:
6
- metadata.gz: 107e96cc34433c6b6e7f6d418c1fae920fb5895d900beab7c99301f3a77b35816331b404a1ee3e288eb127a4cd7cf19fc103b05c468d48757562176f294c1e2c
7
- data.tar.gz: fad3316a4b8e4812d3edd20be992f6c8c05bcc3dbb77ab67b152e7b5c0b96c9e3ac489e26f6938dd80b30bb8578cb395ebeadb189ea7f8a8f65c7addaea797e8
6
+ metadata.gz: c5509e92bfbe6821786693a155c3a6215464902470041a8b2f4ca212396bf5df5b172110f18cab83f7bdcf1978d675ff00163eb0340ce94d9c57d1a512984288
7
+ data.tar.gz: 6074bca0640cace9ce42b2f1e0549d73e92010d9849f8c4724ce5d0e099a0770085d434e2cb4cc8badc97533cdfce1a863ea084dc0831f61c2bb1b9b11a32d75
@@ -9,8 +9,8 @@ module Fastlane
9
9
  port = params[:port]
10
10
  adb = "#{sdk_dir}/platform-tools/adb"
11
11
 
12
- resolution_width = params[:resolution_width] || 1080
13
- resolution_height = params[:resolution_height] || 1920
12
+ resolution_width = params[:resolution_width]
13
+ resolution_height = params[:resolution_height]
14
14
 
15
15
 
16
16
  UI.message("Stopping emulator")
@@ -25,14 +25,27 @@ module Fastlane
25
25
  )
26
26
 
27
27
  UI.message("Override configuration")
28
- open("#{Dir.home}/.android/avd/#{params[:name]}.avd/config.ini", 'a') { |f|
29
- f << "hw.gpu.mode=auto\n"
30
- f << "hw.gpu.enabled=yes\n"
31
- f << "hw.lcd.height=#{resolution_width}\n"
32
- f << "hw.lcd.width=#{resolution_height}\n"
33
- f << "skin.dynamic=yes\n"
34
- f << "skin.name=1080x1920\n"
28
+ ini_path = "#{Dir.home}/.android/avd/#{params[:name]}.avd/config.ini"
29
+ inifile = IniFile.load(ini_path)
30
+ settings = inifile["global"]
31
+ new_settings = {
32
+ "hw.gpu.mode" => "auto",
33
+ "hw.gpu.enabled" => "yes",
34
+ "skin.dynamic" => "yes",
35
+ "skin.name" => "#{resolution_width}x#{resolution_height}",
36
+ "hw.lcd.height" => resolution_height,
37
+ "hw.lcd.width" => resolution_width
35
38
  }
39
+ new_ini = IniFile.new
40
+ new_settings.each do |key, value|
41
+ new_ini["global"][key] = value
42
+ end
43
+ merged_ini = inifile.merge new_ini
44
+ puts "New emulator configuration:\n"
45
+ merged_ini["global"].each do |key, value|
46
+ puts "#{key}: #{value}"
47
+ end
48
+ merged_ini.write
36
49
 
37
50
  # Verify HAXM installed on mac
38
51
  if FastlaneCore::Helper.mac?
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidEmulatorKami
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_emulator_kami
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Ruhl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-07 00:00:00.000000000 Z
11
+ date: 2019-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: inifile
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: pry
15
29
  requirement: !ruby/object:Gem::Requirement