Module: Calabash::Android::Dependencies
- Defined in:
- lib/appium_instrumenter/dependencies.rb
Defined Under Namespace
Classes: ScanningTimedOutError
Class Method Summary
collapse
Class Method Details
.aapt_path ⇒ Object
64
65
66
|
# File 'lib/appium_instrumenter/dependencies.rb', line 64
def self.aapt_path
android_dependencies(:aapt_path)
end
|
.adb_path ⇒ Object
60
61
62
|
# File 'lib/appium_instrumenter/dependencies.rb', line 60
def self.adb_path
android_dependencies(:adb_path)
end
|
.android_jar_path ⇒ Object
72
73
74
|
# File 'lib/appium_instrumenter/dependencies.rb', line 72
def self.android_jar_path
android_dependencies(:android_jar_path)
end
|
.ant_path ⇒ Object
88
89
90
|
# File 'lib/appium_instrumenter/dependencies.rb', line 88
def self.ant_path
java_dependencies(:ant_path)
end
|
.jarsigner_path ⇒ Object
84
85
86
|
# File 'lib/appium_instrumenter/dependencies.rb', line 84
def self.jarsigner_path
java_dependencies(:jarsigner_path)
end
|
.java_path ⇒ Object
76
77
78
|
# File 'lib/appium_instrumenter/dependencies.rb', line 76
def self.java_path
java_dependencies(:java_path)
end
|
80
81
82
|
# File 'lib/appium_instrumenter/dependencies.rb', line 80
def self.keytool_path
java_dependencies(:keytool_path)
end
|
.setup ⇒ Object
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
# File 'lib/appium_instrumenter/dependencies.rb', line 92
def self.setup
if ENV['CI_NO_ANDROID_RUNTIME'] == '1'
@@android_dependencies = {}
@@java_dependencies = {}
return
end
@@halt_scanning = false
@@halt_scanning_thread = nil
if ENV['ANDROID_HOME']
android_sdk_location = ENV['ANDROID_HOME']
p ("Setting Android SDK location to $ANDROID_HOME")
else
android_sdk_location = detect_android_sdk_location
end
if android_sdk_location.nil?
p 'Could not find an Android SDK please make sure it is installed.'
p 'You can read about how Calabash is searching for an Android SDK and how you can help here:'
p 'https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites'
raise 'Could not find an Android SDK'
end
p ("Android SDK location set to '#{android_sdk_location}'")
@@halt_scanning_thread = Thread.new do
sleep 60
@@halt_scanning = true
end
begin
set_android_dependencies(locate_android_dependencies(android_sdk_location))
rescue ScanningTimedOutError => e
p 'Timed out locating Android dependency'
p 'You can read about how Calabash is searching for an Android SDK and how you can help here:'
p 'https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites'
raise e.message
rescue Environment::InvalidEnvironmentError => e
p 'Could not locate Android dependency'
p 'You can read about how Calabash is searching for an Android SDK and how you can help here:'
p 'https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites'
raise e
end
if ENV['JAVA_HOME']
java_sdk_home = ENV['JAVA_HOME']
p ("Setting Java SDK location to $JAVA_HOME")
else
java_sdk_home = detect_java_sdk_location
end
p ("Java SDK location set to '#{java_sdk_home}'")
Thread.kill(@@halt_scanning_thread) if @@halt_scanning_thread
@@halt_scanning = false
@@halt_scanning_thread = Thread.new do
sleep 60
@@halt_scanning = true
end
begin
set_java_dependencies(locate_java_dependencies(java_sdk_home))
rescue ScanningTimedOutError => e
p 'Timed out locating Java dependency'
p "You can read about how Calabash is searching for a JDK and how you can help here:"
p "https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites"
raise e.message
rescue Environment::InvalidJavaSDKHome => e
p "Could not find Java Development Kit please make sure it is installed."
p "You can read about how Calabash is searching for a JDK and how you can help here:"
p "https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites"
raise e
rescue Environment::InvalidEnvironmentError => e
p "Could not find Java dependency"
p "You can read about how Calabash is searching for a JDK and how you can help here:"
p "https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites"
raise e
end
Thread.kill(@@halt_scanning_thread) if @@halt_scanning_thread
end
|
.zipalign_path ⇒ Object
68
69
70
|
# File 'lib/appium_instrumenter/dependencies.rb', line 68
def self.zipalign_path
android_dependencies(:zipalign_path)
end
|