robotkit 0.2.1 → 0.3.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
  SHA1:
3
- metadata.gz: a80dc4e0ca7e8d29606e712a42c00a0f1342e897
4
- data.tar.gz: d1f8956c066bf9644849c9fec4c837708e7766fc
3
+ metadata.gz: a225cdc8cb5c7126b7ff836c28b4b2791703d68a
4
+ data.tar.gz: ae5d0f7c23d4b114bc436296ade95433153d57eb
5
5
  SHA512:
6
- metadata.gz: f78d97e1826786fad9b3b201923b68e623021eb7a15c804b0440a32bc156eedc7a11f526701e030aa0d7bc1457657f2059475bf94b9d44f80ccdbb993a07057c
7
- data.tar.gz: b675caac0bd7b0d9b4ef0dd4bbbb404e1f0cef64c7af37ad77ed95c0a287a65e6891a68b31020100a2a3ac3871953c590558e8d48c148e613485da540ec9daf8
6
+ metadata.gz: 372b0b14efe51332e1ea88f73745a2a4885874b13c8ca80ce83f33c05cd88e39021aa6e497c51195724a05919bb5023238b41866bbf5bc64a725f8cae24e7546
7
+ data.tar.gz: d01646b28ffa7f6541a74f39b03f1c2d2269e7adb69986adf695b9f90f17a58e66760cc562271e0cd1d58fd0e3ae479f7366ae071079ac065b963696e01b49b9
data/README.md CHANGED
@@ -4,19 +4,6 @@
4
4
 
5
5
  `gem install robotkit`
6
6
 
7
- Or add this line `gem 'robotkit'` to your application's Gemfile and execute `bundle`
8
-
9
- ## Usage
10
-
11
- `robotkit create :output_dir --package your.package.name`
12
-
13
- Options
14
- ```
15
- option :package, required: true
16
- option :library_module, desc: "library module_name (default: library)"
17
- option :sample_module, desc: "sample module_name (default: sample)"
18
- ```
19
-
20
7
  ## License
21
8
 
22
9
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -1,12 +1,12 @@
1
- # Project-wide Gradle settings.
2
- # IDE (e.g. Android Studio) users:
3
- # Gradle settings configured through the IDE *will override*
4
- # any settings specified in this file.
5
-
6
- # For more details on how to configure your build environment visit
7
- # http://www.gradle.org/docs/current/userguide/build_environment.html
8
-
9
- org.gradle.daemon=true
10
- org.gradle.jvmargs=-Xmx4096M
1
+ # SDK versions
2
+ compile_sdk_version=25
3
+ build_tools_version=25.0.2
4
+ min_sdk_version=15
5
+ target_sdk_version=25
6
+ # Library versions
7
+ support_lib_version=25.3.1
8
+ # Build options
9
+ org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
11
10
  org.gradle.parallel=true
11
+ org.gradle.daemon=true
12
12
  org.gradle.configureondemand=true
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
@@ -2,11 +2,11 @@ apply plugin: 'com.android.library'
2
2
  apply plugin: 'com.github.dcendents.android-maven'
3
3
 
4
4
  android {
5
- compileSdkVersion 25
6
- buildToolsVersion "25.0.2"
5
+ compileSdkVersion compile_sdk_version as int
6
+ buildToolsVersion build_tools_version
7
7
  defaultConfig {
8
- minSdkVersion 15
9
- targetSdkVersion 25
8
+ minSdkVersion min_sdk_version
9
+ targetSdkVersion target_sdk_version
10
10
  versionCode 1
11
11
  versionName "1.0"
12
12
  }
@@ -1,12 +1,12 @@
1
1
  apply plugin: 'com.android.application'
2
2
 
3
3
  android {
4
- compileSdkVersion 25
5
- buildToolsVersion "25.0.2"
4
+ compileSdkVersion compile_sdk_version as int
5
+ buildToolsVersion build_tools_version
6
6
  defaultConfig {
7
7
  applicationId "<%= sample_package_name %>"
8
- minSdkVersion 15
9
- targetSdkVersion 25
8
+ minSdkVersion min_sdk_version
9
+ targetSdkVersion target_sdk_version
10
10
  versionCode 1
11
11
  versionName "1.0"
12
12
  jackOptions {
@@ -20,6 +20,6 @@ android {
20
20
  }
21
21
 
22
22
  dependencies {
23
- compile 'com.android.support:appcompat-v7:25.2.0'
23
+ compile "com.android.support:appcompat-v7:$support_lib_version"
24
24
  compile project(':<%= library_module%>')
25
25
  }
data/lib/robotkit/cli.rb CHANGED
@@ -1,20 +1,28 @@
1
1
  require 'robotkit'
2
- require 'thor'
2
+ require 'tty-prompt'
3
3
  require "fileutils"
4
4
  require "erb"
5
5
 
6
6
  module Robotkit
7
7
  PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
8
8
  IGNORE_FILES = %w(. .. .DS_Store)
9
- class CLI < Thor
10
- desc "create :output_dir", "Create Android library project."
11
- option :package, required: true
12
- option :library_module
13
- option :sample_module
14
- option :fixtures_dir
15
- def create(output_dir)
16
- puts output_dir
17
- Robotkit.exec(options.merge({output_dir: output_dir}))
9
+ class CLI
10
+ def self.start
11
+ options = {}
12
+ prompt = TTY::Prompt.new(help_color: :cyan)
13
+ options[:output_dir] = prompt.ask('What is library name?', default: 'SampleLibrary')
14
+ options[:package_name] = prompt.ask('What is package name?', default: 'com.android.sample')
15
+ options[:module_name] = prompt.ask('What is module name?', default: options[:output_dir].downcase)
16
+ # options[:min_sdk] = prompt.ask('Type min_sdk version', default: 16)
17
+ # options[:target_sdk] = prompt.ask('Type target_sdk version', default: 25)
18
+ #
19
+ # library_choices = %w(maven-gradle-plugin jack)
20
+ # options[:selected_library_options] = prompt.multi_select("Select library module options: ", library_choices)
21
+ #
22
+ # sample_choices = %w(jack rxjava1 rxjava2)
23
+ # options[:selected_sample_options] = prompt.multi_select("Select sample module options: ", sample_choices)
24
+ Robotkit.exec(options)
25
+ puts "#{options[:output_dir]} created"
18
26
  end
19
27
  end
20
28
 
@@ -22,9 +30,9 @@ module Robotkit
22
30
  fixtures_dir = params[:fixtures_dir] || File.join(PROJECT_ROOT_PATH, "fixtures")
23
31
  output_dir = params[:output_dir]
24
32
  project_name = params[:output_dir]
25
- library_package_name = params[:package]
26
- sample_package_name = "#{params[:package]}.sample"
27
- library_module = params[:library_module] || "library"
33
+ library_package_name = params[:package_name]
34
+ sample_package_name = "#{params[:package_name]}.sample"
35
+ library_module = params[:module_name] || "library"
28
36
  sample_module = params[:sample_module] || "sample"
29
37
 
30
38
  # copy from fixtues dir to output dir
@@ -1,3 +1,3 @@
1
1
  module Robotkit
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/robotkit.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_dependency 'thor'
24
+ spec.add_dependency 'tty'
25
25
 
26
26
  spec.add_development_dependency "bundler", "~> 1.13"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robotkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kazuki-yoshida
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: thor
14
+ name: tty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.5.2
156
+ rubygems_version: 2.6.8
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Android library template generator