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 +4 -4
- data/README.md +0 -13
- data/fixtures/gradle.properties +10 -10
- data/fixtures/gradle/wrapper/gradle-wrapper.properties +1 -1
- data/fixtures/{library_module}/build.gradle +4 -4
- data/fixtures/{sample_module}/build.gradle.erb +5 -5
- data/lib/robotkit/cli.rb +21 -13
- data/lib/robotkit/version.rb +1 -1
- data/robotkit.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a225cdc8cb5c7126b7ff836c28b4b2791703d68a
|
4
|
+
data.tar.gz: ae5d0f7c23d4b114bc436296ade95433153d57eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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).
|
data/fixtures/gradle.properties
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
org.gradle.
|
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
|
6
|
-
buildToolsVersion
|
5
|
+
compileSdkVersion compile_sdk_version as int
|
6
|
+
buildToolsVersion build_tools_version
|
7
7
|
defaultConfig {
|
8
|
-
minSdkVersion
|
9
|
-
targetSdkVersion
|
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
|
5
|
-
buildToolsVersion
|
4
|
+
compileSdkVersion compile_sdk_version as int
|
5
|
+
buildToolsVersion build_tools_version
|
6
6
|
defaultConfig {
|
7
7
|
applicationId "<%= sample_package_name %>"
|
8
|
-
minSdkVersion
|
9
|
-
targetSdkVersion
|
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
|
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 '
|
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
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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[:
|
26
|
-
sample_package_name = "#{params[:
|
27
|
-
library_module = params[:
|
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
|
data/lib/robotkit/version.rb
CHANGED
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 '
|
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.
|
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-
|
11
|
+
date: 2017-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
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.
|
156
|
+
rubygems_version: 2.6.8
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Android library template generator
|