-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for sdk25 #2
Changes from all commits
5ddec19
47d08e1
04ac4ea
5ef234b
23aae55
586bb82
69ec362
a27931a
e877e10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,88 +8,98 @@ provisioner: | |
require_chef_omnibus: latest | ||
|
||
platforms: | ||
|
||
- name: ubuntu-12.04 | ||
driver: | ||
customize: | ||
memory: 384 | ||
- name: ubuntu-12.04 | ||
driver: | ||
customize: | ||
memory: 384 | ||
run_list: | ||
- recipe[apt] | ||
|
||
- name: ubuntu-14.04 | ||
driver: | ||
customize: | ||
memory: 384 | ||
- name: ubuntu-14.04 | ||
driver: | ||
customize: | ||
memory: 384 | ||
run_list: | ||
- recipe[apt] | ||
|
||
- name: centos-7.1 | ||
driver: | ||
customize: | ||
memory: 512 | ||
- name: centos-7.1 | ||
driver: | ||
customize: | ||
memory: 512 | ||
run_list: | ||
- recipe[yum] | ||
- recipe[yum-centos] | ||
|
||
- name: mac_el_capitan | ||
os_type: mac_os_x | ||
driver: | ||
box: jhcook/osx-elcapitan-10.11 | ||
boot_timeout: 1800 | ||
customize: | ||
cpuexecutioncap: 80 # % max of total cpu power | ||
- name: mac_el_capitan | ||
os_type: mac_os_x | ||
driver: | ||
box: jhcook/osx-elcapitan-10.11 | ||
boot_timeout: 1800 | ||
cache_directory: false | ||
customize: | ||
cpuexecutioncap: 80 # % max of total cpu power | ||
|
||
- name: windows-2012R2 | ||
os_type: windows | ||
driver: | ||
box: mwrock/Windows2012R2 | ||
boot_timeout: 1800 | ||
attributes: | ||
seven_zip: | ||
home: 'C:\7-zip' | ||
java: | ||
oracle: | ||
accept_oracle_download_terms: true | ||
windows: | ||
url: 'http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-windows-x64.exe' | ||
package_name: 'Java SE Development Kit 7 Update 79 (64-bit)' | ||
java_home: 'C:\\Program Files\\Java\\jdk1.7.0_79' | ||
android-sdk: | ||
owner: vagrant | ||
group: vagrant | ||
setup_root: 'C:/Users/vagrant/google' | ||
license: | ||
default_answer: y | ||
- name: windows-2012R2 | ||
os_type: windows | ||
driver: | ||
box: mwrock/Windows2012R2 | ||
boot_timeout: 1800 | ||
attributes: | ||
seven_zip: | ||
home: 'C:\7-zip' | ||
java: | ||
oracle: | ||
accept_oracle_download_terms: true | ||
windows: | ||
url: 'http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-windows-x64.exe' | ||
package_name: 'Java SE Development Kit 7 Update 79 (64-bit)' | ||
java_home: 'C:\\Program Files\\Java\\jdk1.7.0_79' | ||
android-sdk: | ||
owner: vagrant | ||
group: vagrant | ||
setup_root: 'C:/Users/vagrant/google' | ||
license: | ||
default_answer: y | ||
|
||
suites: | ||
## WIP | ||
#- name: wip # be prepared to work on https://github.com/gildegoma/chef-android-sdk/issues/14 (maven-android-sdk-deployer) | ||
# excludes: | ||
# - windows-2012R2 | ||
# - mac_el_capitan | ||
# run_list: | ||
# - recipe[git] | ||
# - recipe[maven] | ||
# - recipe[android-sdk] | ||
# attributes: | ||
# android-sdk: | ||
# owner: vagrant | ||
# group: vagrant | ||
# components: | ||
# - build-tools-22.1.0 | ||
# - android-22 | ||
# - sysimg-22 | ||
# java: | ||
# jdk_version: 7 | ||
|
||
- name: wip # be prepared to work on https://github.com/gildegoma/chef-android-sdk/issues/14 (maven-android-sdk-deployer) | ||
excludes: | ||
- windows-2012R2 | ||
- mac_el_capitan | ||
run_list: | ||
- recipe[git] | ||
- recipe[maven] | ||
- recipe[android-sdk] | ||
attributes: | ||
android-sdk: | ||
owner: vagrant | ||
group: vagrant | ||
components: | ||
- build-tools-22.1.0 | ||
- android-22 | ||
- sysimg-22 | ||
java: | ||
jdk_version: 7 | ||
|
||
- name: default | ||
- name: legacy | ||
run_list: | ||
- recipe[android-sdk] | ||
attributes: | ||
java: | ||
jdk_version: 7 | ||
android-sdk: | ||
version: '24.4' | ||
checksum: | ||
linux: 47b0462b9935b0b9685857eeea407434ee2a47bcdee6bda64b7026f2c22ab341 | ||
mac_os_x: 78efef51598cbbdd417b50e00864a86a1f50c63b50599ecf40d20b179be66a71 | ||
windows: 12cb4a05e518ec4b816645d8571af3637ba63241c47b15eea7feba5b6804da28 | ||
components: | ||
- platform-tools | ||
- build-tools-22.0.1 | ||
- android-22 | ||
- sys-img-armeabi-v7a-android-22 | ||
|
||
- name: default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suite to check the latest SDK and default recipe without modification attributes |
||
run_list: | ||
- recipe[android-sdk] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ AllCops: | |
- 'vendor/**/*' | ||
|
||
Metrics/LineLength: | ||
Max: 150 | ||
Max: 155 | ||
|
||
Metrics/BlockLength: | ||
Max: 30 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'berkshelf', '~> 4.3' | ||
gem 'chef', '~> 12.11' | ||
gem 'chefspec', '~> 4.7' | ||
gem 'foodcritic', '>= 5.0.0' | ||
gem 'rake' | ||
gem 'rubocop' | ||
gem 'tailor' | ||
gem 'berkshelf', '~> 5.6', '>= 5.6.3' | ||
gem 'chef', '~> 12.18' | ||
gem 'chefspec', '~> 6.0' | ||
gem 'foodcritic', '~> 9.0' | ||
gem 'rake', '~> 12.0' | ||
gem 'rubocop', '~> 0.47.1' | ||
|
||
group :integration do | ||
gem 'kitchen-vagrant', '~> 0.20.0' | ||
gem 'test-kitchen', '~> 1.10' | ||
gem 'kitchen-vagrant', '~> 1.0' | ||
gem 'test-kitchen', '~> 1.15' | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,40 +2,13 @@ | |
|
||
require 'foodcritic' | ||
require 'rake/testtask' | ||
require 'tailor/rake_task' | ||
require 'rubocop/rake_task' | ||
require 'rspec/core/rake_task' | ||
|
||
# TODO: add chefspec | ||
task default: [:tailor, :rubocop, :foodcritic, :knife, :serverspec] | ||
task default: [:rubocop, :foodcritic, :knife, :serverspec] | ||
|
||
desc 'Lint Ruby code' | ||
task :tailor do | ||
Tailor::RakeTask.new do |task| | ||
task.file_set('attributes/**/*.rb', 'attributes') do |style| | ||
style.max_line_length 160, level: :warn | ||
end | ||
# task.file_set('definitions/**/*.rb', "definitions") | ||
# task.file_set('libraries/**/*.rb', "libraries") | ||
task.file_set('metadata.rb', 'metadata') do |style| | ||
style.max_line_length 80, level: :warn | ||
end | ||
# task.file_set('providers/**/*.rb', "providers") | ||
task.file_set('recipes/**/*.rb', 'recipes') do |style| | ||
style.max_line_length 160, level: :warn | ||
end | ||
# task.file_set('resources/**/*.rb', "resources") | ||
|
||
# Template analysis is currently disabled, | ||
# because I have no idea how 'ruby -c' could support ERB markers like '<%' | ||
# task.file_set('templates/**/*.erb', "templates") | ||
|
||
task.file_set('spec/**/*.rb', 'chefspec') do |style| | ||
style.max_line_length 160, level: :warn | ||
end | ||
end | ||
end | ||
|
||
RuboCop::RakeTask.new | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why removal? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rubocop checks the the same and even more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and also we execute foodcritic ;) |
||
FoodCritic::Rake::LintTask.new do |t| | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ | |
# | ||
# Install required libraries | ||
# | ||
include_recipe 'ark::default' | ||
|
||
if node['platform'] == 'ubuntu' | ||
package 'libgl1-mesa-dev' | ||
|
||
|
@@ -71,17 +73,10 @@ | |
owner node['android-sdk']['owner'] | ||
group node['android-sdk']['group'] | ||
backup node['android-sdk']['backup_archive'] | ||
strip_components 0 | ||
action node['android-sdk']['with_symlink'] ? :install : :put | ||
end | ||
|
||
# | ||
# Fix non-friendly 0750 permissions in order to make android-sdk available to all system users | ||
# | ||
%w(add-ons platforms tools).each do |subfolder| | ||
directory File.join(android_home, subfolder) do | ||
mode '0755' | ||
end | ||
end | ||
# TODO: find a way to handle 'chmod stuff' below with own chef resource (idempotence stuff...) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't need this anymore :) by default in archive |
||
execute 'Grant all users to read android files' do | ||
command "chmod -R a+r #{android_home}/*" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suite to check the backward compatibility