Files
chromebrew/packages/android_sdk_tools.rb
Maximilian Downey Twiss de24923ee8 Add Rubocop CI (#7083)
* Rename IgnoredPatterns to AllowedPatterns.

* Exclude docopt.rb (not our code) from Rubocop

* Disable Style/RedundantReturn

* Disable Style/MutableConstant

* Disable Style/NumericLiterals

* Set Layout/IndentationStyle to spaces

* Temporarily disable various cops.

* Add Rubocop CI via Octocop

* Lint tree with rubocop -A -c .rubocop.yml

Co-authored-by: Satadru Pramanik <satadru@gmail.com>
2022-08-22 13:31:25 -04:00

29 lines
1009 B
Ruby

require 'package'
class Android_sdk_tools < Package
description 'Android SDK CLI tools'
homepage 'https://developer.android.com/studio'
version '7583922'
license 'Apache-2.0'
compatibility 'x86_64'
source_url 'https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip'
source_sha256 '124f2d5115eee365df6cf3228ffbca6fc3911d16f8025bebd5b1c6e2fcfa7faf'
depends_on 'jdk11'
def self.install
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/android-sdk-tools"
FileUtils.mv Dir['*'], "#{CREW_DEST_PREFIX}/share/android-sdk-tools"
Dir["#{CREW_DEST_PREFIX}/share/android-sdk-tools/bin/*"].each do |filename|
binary = File.basename(filename)
FileUtils.ln_s "../share/android-sdk-tools/bin/#{binary}", "#{CREW_DEST_PREFIX}/bin/#{binary}"
end
end
def self.postinstall
puts "\nThe available tools are listed below:".lightblue
system "ls #{CREW_PREFIX}/share/android-sdk-tools/bin"
end
end