fastlane-plugin-android_sdk_update 1.0.0 → 2.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
- SHA1:
3
- metadata.gz: 2515fd10afe8cb81dad11f4a5eb2ab7e328ebafd
4
- data.tar.gz: 1052ccbef84eaf59c3f341b26c8ba0b225e2fa0e
2
+ SHA256:
3
+ metadata.gz: 0d17e51a2ef94028d2d946195fb5236b7b005f884dd81c5f0575527efaf2cd57
4
+ data.tar.gz: 3c0e80a2370997872c7432291f4b98f91139b2762f1e0b540299f5027b118de5
5
5
  SHA512:
6
- metadata.gz: 56df0346a2546448352531ce7767d4bf5c4ba7501e4c493f3b063e567c3f49dfbfa906c6011c84351cd3458429117a86c391b1e7215e2d78c4285e95206b97bd
7
- data.tar.gz: 8a65c756d0a22c467679bbb43a911809e84a1a2a9e5f2d8e51f4611acb3914a5cc10c68017f0c151220cfbbc8b749770c4d988fe8efa15d5cc27bab236535390
6
+ metadata.gz: 880260ed8a996015e6d5badca9f41328334daab136caea062c9aeb332723235559ca4abedae7bf3316bc17c657406d8212f52bee60b7188ef94a0f58878762d1
7
+ data.tar.gz: a2c635c6d36c01537a92ad68ef8ad751483e8f5482c12970941a0698ba30869f9f7565733684729fc7a9db7fba0fc71be568978b170a620a1b4ced5b2876b74d
@@ -3,8 +3,7 @@ module Fastlane
3
3
  class AndroidSdkUpdateAction < Action
4
4
  def self.run(params)
5
5
  # Install Android-SDK via brew
6
- sdk_path = determine_sdk(params)
7
- sdk_manager = File.expand_path("tools/bin/sdkmanager", sdk_path)
6
+ sdk_manager, sdk_path = determine_sdk(params)
8
7
 
9
8
  # Define required packages
10
9
  require 'java-properties'
@@ -51,13 +50,15 @@ module Fastlane
51
50
  # on mac
52
51
  if FastlaneCore::Helper.mac?
53
52
  require 'fastlane/plugin/brew'
54
- Actions::BrewAction.run(command: "cask ls --versions android-sdk || brew cask install android-sdk")
55
- sdk_path = File.realpath("../../..", FastlaneCore::CommandExecutor.which("sdkmanager"))
53
+ Actions::BrewAction.run(command: "list --cask --versions android-commandlinetools || brew install --cask android-commandlinetools")
54
+ sdk_manager = File.realpath(FastlaneCore::CommandExecutor.which("sdkmanager"))
55
+ sdk_path = File.expand_path("../../../..", sdk_manager)
56
56
 
57
57
  # on linux
58
58
  elsif FastlaneCore::Helper.linux?
59
59
  sdk_path = File.expand_path(params[:linux_sdk_dir])
60
- if File.exist?("#{sdk_path}/tools/bin/sdkmanager")
60
+ sdk_manager = File.expand_path("tools/bin/sdkmanager", sdk_path)
61
+ if File.exist?(sdk_manager)
61
62
  UI.message("Using existing android-sdk at #{sdk_path}")
62
63
  else
63
64
  UI.message("Downloading android-sdk to #{sdk_path}")
@@ -69,18 +70,18 @@ module Fastlane
69
70
  end
70
71
 
71
72
  ENV['ANDROID_SDK_ROOT'] = sdk_path
72
- sdk_path
73
+ [sdk_manager, sdk_path]
73
74
  end
74
75
 
75
76
  def self.download_and_extract_sdk(download_url, sdk_path)
76
- FastlaneCore::CommandExecutor.execute(command: "wget -O /tmp/android-sdk-tools.zip #{download_url}",
77
+ FastlaneCore::CommandExecutor.execute(command: "wget -O /tmp/android-commandlinetools.zip #{download_url}",
77
78
  print_all: true,
78
79
  print_command: true)
79
- FastlaneCore::CommandExecutor.execute(command: "unzip -qo /tmp/android-sdk-tools.zip -d #{sdk_path}",
80
+ FastlaneCore::CommandExecutor.execute(command: "unzip -qo /tmp/android-commandlinetools.zip -d #{sdk_path}",
80
81
  print_all: true,
81
82
  print_command: true)
82
83
  ensure
83
- FastlaneCore::CommandExecutor.execute(command: "rm -f /tmp/android-sdk-tools.zip",
84
+ FastlaneCore::CommandExecutor.execute(command: "rm -f /tmp/android-commandlinetools.zip",
84
85
  print_all: true,
85
86
  print_command: true)
86
87
  end
@@ -95,7 +96,7 @@ module Fastlane
95
96
 
96
97
  def self.details
97
98
  [
98
- "The initial Android-SDK will be installed with Homebrew/Linuxbrew.",
99
+ "The initial Android-SDK will be installed with Homebrew.",
99
100
  "Updates for the specified packages will be automatically installed.",
100
101
  "Instructions to configure 'compile_sdk_version' and 'build_tools_version': https://github.com/NovaTecConsulting/fastlane-plugin-android_sdk_update"
101
102
  ].join("\n")
@@ -150,7 +151,7 @@ module Fastlane
150
151
  env_name: "FL_ANDROID_LINUX_SDK_DOWNLOAD_URL",
151
152
  description: "Download URL for Android SDK on Linux",
152
153
  optional: true,
153
- default_value: "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip")
154
+ default_value: "https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip")
154
155
  ]
155
156
  end
156
157
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidSdkUpdate
3
- VERSION = "1.0.0"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_sdk_update
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Burgk
8
8
  - Michael Ruhl
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-12-07 00:00:00.000000000 Z
12
+ date: 2022-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fastlane-plugin-brew
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.2.0
34
+ version: 0.3.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.2.0
41
+ version: 0.3.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: bundler
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ dependencies:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
- description:
126
+ description:
127
127
  email:
128
128
  - philipp.burgk@novatec-gmbh.de
129
129
  - michael.ruhl@novatec-gmbh.de
@@ -141,7 +141,7 @@ homepage: https://github.com/NovaTecConsulting/fastlane-plugin-android_sdk_updat
141
141
  licenses:
142
142
  - MIT
143
143
  metadata: {}
144
- post_install_message:
144
+ post_install_message:
145
145
  rdoc_options: []
146
146
  require_paths:
147
147
  - lib
@@ -156,9 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  requirements: []
159
- rubyforge_project:
160
- rubygems_version: 2.6.10
161
- signing_key:
159
+ rubygems_version: 3.1.2
160
+ signing_key:
162
161
  specification_version: 4
163
162
  summary: Install required Android-SDK packages
164
163
  test_files: []