fastlane-plugin-android_sdk_update 1.1.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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d17e51a2ef94028d2d946195fb5236b7b005f884dd81c5f0575527efaf2cd57
|
4
|
+
data.tar.gz: 3c0e80a2370997872c7432291f4b98f91139b2762f1e0b540299f5027b118de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: "list --cask --versions android-
|
55
|
-
|
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
|
-
|
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-
|
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-
|
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-
|
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
|
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/
|
154
|
+
default_value: "https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip")
|
154
155
|
]
|
155
156
|
end
|
156
157
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-android_sdk_update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philipp Burgk
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
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
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
|
-
rubygems_version: 3.
|
159
|
+
rubygems_version: 3.1.2
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: Install required Android-SDK packages
|