commandly 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/.gitignore +16 -0
 - data/.rspec +2 -0
 - data/.travis.yml +5 -0
 - data/Gemfile +4 -0
 - data/LICENSE.txt +21 -0
 - data/README.md +65 -0
 - data/Rakefile +6 -0
 - data/bin/console +14 -0
 - data/bin/setup +8 -0
 - data/commandly.gemspec +40 -0
 - data/exe/commandly +5 -0
 - data/lib/commandly/cli.rb +69 -0
 - data/lib/commandly/generator.rb +71 -0
 - data/lib/commandly/version.rb +3 -0
 - data/lib/commandly.rb +7 -0
 - data/templates/android/.gitignore +135 -0
 - data/templates/android/.idea/gradle.xml +18 -0
 - data/templates/android/.idea/runConfigurations.xml +12 -0
 - data/templates/android/app/.gitignore +1 -0
 - data/templates/android/app/build.gradle +30 -0
 - data/templates/android/app/proguard-rules.pro +25 -0
 - data/templates/android/app/src/androidTest/java/com/vuebly/commandly/ExampleInstrumentedTest.java +26 -0
 - data/templates/android/app/src/main/AndroidManifest.xml +21 -0
 - data/templates/android/app/src/main/java/com/vuebly/commandly/MainActivity.java +13 -0
 - data/templates/android/app/src/main/res/layout/activity_main.xml +18 -0
 - data/templates/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
 - data/templates/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
 - data/templates/android/app/src/main/res/values/colors.xml +6 -0
 - data/templates/android/app/src/main/res/values/strings.xml +3 -0
 - data/templates/android/app/src/main/res/values/styles.xml +11 -0
 - data/templates/android/app/src/test/java/com/vuebly/commandly/ExampleUnitTest.java +17 -0
 - data/templates/android/build.gradle +23 -0
 - data/templates/android/gradle/wrapper/gradle-wrapper.jar +0 -0
 - data/templates/android/gradle/wrapper/gradle-wrapper.properties +6 -0
 - data/templates/android/gradle.properties +17 -0
 - data/templates/android/gradlew +160 -0
 - data/templates/android/gradlew.bat +90 -0
 - data/templates/android/settings.gradle +1 -0
 - data/templates/ios/.gitignore +55 -0
 - data/templates/ios/Commandly/AppDelegate.h +17 -0
 - data/templates/ios/Commandly/AppDelegate.m +51 -0
 - data/templates/ios/Commandly/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
 - data/templates/ios/Commandly/Base.lproj/LaunchScreen.storyboard +27 -0
 - data/templates/ios/Commandly/Base.lproj/Main.storyboard +41 -0
 - data/templates/ios/Commandly/Info.plist +45 -0
 - data/templates/ios/Commandly/ViewController.h +15 -0
 - data/templates/ios/Commandly/ViewController.m +29 -0
 - data/templates/ios/Commandly/main.m +16 -0
 - data/templates/ios/Commandly.xcodeproj/project.pbxproj +429 -0
 - data/templates/ios/CommandlyTests/CommandlyTests.m +39 -0
 - data/templates/ios/CommandlyTests/Info.plist +22 -0
 - metadata +176 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8ea9c2ecf252e1864fbcf935b1f6157a3787db1d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 85db2a757446ce87aa49382ab2d7a2af505c4f56
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 06e290df4d48fa2f4bb9c98ec0c760b366b3d0db6592a4333a1a19c428b89415f571c0c8464a9238a368409d43a8ba4fed0a71fc0b525e6a549be288027352d9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 3185f2b717a8a64c41b4d5d5c5f1ea3a42df1a936d4c69028af43f0e542db0c976914d7c623c066e5519c8a47726871ef30c041fa9ce3a84060f1b7c8c5760ee
         
     | 
    
        data/.gitignore
    ADDED
    
    
    
        data/.rspec
    ADDED
    
    
    
        data/.travis.yml
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            The MIT License (MIT)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Copyright (c) 2017 Louie Bao
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining a copy
         
     | 
| 
      
 6 
     | 
    
         
            +
            of this software and associated documentation files (the "Software"), to deal
         
     | 
| 
      
 7 
     | 
    
         
            +
            in the Software without restriction, including without limitation the rights
         
     | 
| 
      
 8 
     | 
    
         
            +
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         
     | 
| 
      
 9 
     | 
    
         
            +
            copies of the Software, and to permit persons to whom the Software is
         
     | 
| 
      
 10 
     | 
    
         
            +
            furnished to do so, subject to the following conditions:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be included in
         
     | 
| 
      
 13 
     | 
    
         
            +
            all copies or substantial portions of the Software.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         
     | 
| 
      
 16 
     | 
    
         
            +
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         
     | 
| 
      
 17 
     | 
    
         
            +
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         
     | 
| 
      
 18 
     | 
    
         
            +
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         
     | 
| 
      
 19 
     | 
    
         
            +
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
      
 20 
     | 
    
         
            +
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
         
     | 
| 
      
 21 
     | 
    
         
            +
            THE SOFTWARE.
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1,65 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Commandly
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Commandly is a command line tool for creating iOS and/or Android project.
         
     | 
| 
      
 4 
     | 
    
         
            +
            It lets you create projects from a local or remote template, it's simple to use and easy to customize.
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Install it yourself as:
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                $ gem install commandly
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            Or add this line to your application's Gemfile:
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 15 
     | 
    
         
            +
            gem 'commandly'
         
     | 
| 
      
 16 
     | 
    
         
            +
            ```
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            And then execute:
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                $ bundle
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            ## Usage
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            ```
         
     | 
| 
      
 26 
     | 
    
         
            +
            Usage:
         
     | 
| 
      
 27 
     | 
    
         
            +
            $ commandly new PROJECT_NAME
         
     | 
| 
      
 28 
     | 
    
         
            +
            ```
         
     | 
| 
      
 29 
     | 
    
         
            +
            ```
         
     | 
| 
      
 30 
     | 
    
         
            +
            Options:
         
     | 
| 
      
 31 
     | 
    
         
            +
              -a, [--android], [--no-android]
         
     | 
| 
      
 32 
     | 
    
         
            +
              -i, [--ios], [--no-ios]
         
     | 
| 
      
 33 
     | 
    
         
            +
              -t, [--templateURL=TEMPLATEURL]
         
     | 
| 
      
 34 
     | 
    
         
            +
                  [--verbose], [--no-verbose]
         
     | 
| 
      
 35 
     | 
    
         
            +
            ```
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            ## Examples
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            ```
         
     | 
| 
      
 40 
     | 
    
         
            +
            # Create a new Android & iOS project called 'NextProject' from an embeded template
         
     | 
| 
      
 41 
     | 
    
         
            +
            $ commandly new NextProject
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            # Create a new iOS project called 'NextProject' from an embeded template
         
     | 
| 
      
 44 
     | 
    
         
            +
            $ commandly new NextProject -i
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            # Create a new Android project called 'NextProject' from a remote git repository template
         
     | 
| 
      
 47 
     | 
    
         
            +
            $ commandly new NextProject -a -t https://github.com/louie007/vuebly-templates.git
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            # Create a new Android project called 'NextProject' from a local git repository template
         
     | 
| 
      
 50 
     | 
    
         
            +
            $ commandly new NextProject -a -t file:///Users/vuebly/repos/this-a-template/.git
         
     | 
| 
      
 51 
     | 
    
         
            +
            ```
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            ## Development
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
            After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
            To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            ## Contributing
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            Bug reports and pull requests are welcome on GitHub at https://github.com/louie007/commandly.
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            ## License
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
            The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
         
     | 
    
        data/Rakefile
    ADDED
    
    
    
        data/bin/console
    ADDED
    
    | 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            #!/usr/bin/env ruby
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "bundler/setup"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "commandly"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            # You can add fixtures and/or initialization code here to make experimenting
         
     | 
| 
      
 7 
     | 
    
         
            +
            # with your gem easier. You can also use a different console, if you like.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            # (If you use this, don't forget to add pry to your Gemfile!)
         
     | 
| 
      
 10 
     | 
    
         
            +
            # require "pry"
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Pry.start
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require "irb"
         
     | 
| 
      
 14 
     | 
    
         
            +
            IRB.start(__FILE__)
         
     | 
    
        data/bin/setup
    ADDED
    
    
    
        data/commandly.gemspec
    ADDED
    
    | 
         @@ -0,0 +1,40 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # coding: utf-8
         
     | 
| 
      
 2 
     | 
    
         
            +
            lib = File.expand_path("../lib", __FILE__)
         
     | 
| 
      
 3 
     | 
    
         
            +
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "commandly/version"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            Gem::Specification.new do |spec|
         
     | 
| 
      
 7 
     | 
    
         
            +
              spec.name          = "commandly"
         
     | 
| 
      
 8 
     | 
    
         
            +
              spec.version       = Commandly::VERSION
         
     | 
| 
      
 9 
     | 
    
         
            +
              spec.authors       = ["Louie Bao"]
         
     | 
| 
      
 10 
     | 
    
         
            +
              spec.email         = ["louie.bao@vuebly.com"]
         
     | 
| 
      
 11 
     | 
    
         
            +
              spec.summary       = "A ruby gem for creating iOS & Android project from template"
         
     | 
| 
      
 12 
     | 
    
         
            +
              spec.homepage      = "https://github.com/louie007/commandly"
         
     | 
| 
      
 13 
     | 
    
         
            +
              spec.license       = "MIT"
         
     | 
| 
      
 14 
     | 
    
         
            +
              spec.description   = <<-EOM
         
     | 
| 
      
 15 
     | 
    
         
            +
                                    Commandly is a command line tool for creating iOS and/or Android project.
         
     | 
| 
      
 16 
     | 
    
         
            +
                                    It lets you create projects from a local or remote template, it's simple to use and easy to customize.
         
     | 
| 
      
 17 
     | 
    
         
            +
                                    EOM
         
     | 
| 
      
 18 
     | 
    
         
            +
              # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
         
     | 
| 
      
 19 
     | 
    
         
            +
              # to allow pushing to a single host or delete this section to allow pushing to any host.
         
     | 
| 
      
 20 
     | 
    
         
            +
              # if spec.respond_to?(:metadata)
         
     | 
| 
      
 21 
     | 
    
         
            +
              #   spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
         
     | 
| 
      
 22 
     | 
    
         
            +
              # else
         
     | 
| 
      
 23 
     | 
    
         
            +
              #   raise "RubyGems 2.0 or newer is required to protect against " \
         
     | 
| 
      
 24 
     | 
    
         
            +
              #     "public gem pushes."
         
     | 
| 
      
 25 
     | 
    
         
            +
              # end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              spec.files         = `git ls-files -z`.split("\x0").reject do |f|
         
     | 
| 
      
 28 
     | 
    
         
            +
                f.match(%r{^(test|spec|features)/})
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
              spec.bindir        = "exe"
         
     | 
| 
      
 31 
     | 
    
         
            +
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
      
 32 
     | 
    
         
            +
              spec.require_paths = ["lib"]
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              spec.add_development_dependency "bundler", "~> 1.15"
         
     | 
| 
      
 35 
     | 
    
         
            +
              spec.add_development_dependency "rake", "~> 10.0"
         
     | 
| 
      
 36 
     | 
    
         
            +
              spec.add_development_dependency "rspec", "~> 3.0"
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
              spec.add_dependency 'thor', "~> 0.19.0"
         
     | 
| 
      
 39 
     | 
    
         
            +
              spec.add_dependency 'git', "~> 1.3.0"
         
     | 
| 
      
 40 
     | 
    
         
            +
            end
         
     | 
    
        data/exe/commandly
    ADDED
    
    
| 
         @@ -0,0 +1,69 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'thor'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'git'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require_relative 'generator'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            class Commandly::CLI < Thor
         
     | 
| 
      
 6 
     | 
    
         
            +
              # Reject invalid options
         
     | 
| 
      
 7 
     | 
    
         
            +
              check_unknown_options!
         
     | 
| 
      
 8 
     | 
    
         
            +
              # Set exit code of failing command if failure
         
     | 
| 
      
 9 
     | 
    
         
            +
              def self.exit_on_failure?
         
     | 
| 
      
 10 
     | 
    
         
            +
                true
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              # Set Verbose class option
         
     | 
| 
      
 14 
     | 
    
         
            +
              class_option 'verbose', :type => :boolean, :default => false
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              desc 'version', 'Display version'
         
     | 
| 
      
 17 
     | 
    
         
            +
              map %w[-v --version] => :version
         
     | 
| 
      
 18 
     | 
    
         
            +
              def version
         
     | 
| 
      
 19 
     | 
    
         
            +
                say "commandly v#{Commandly::VERSION}"
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              desc 'new PROJECT_NAME', 'Create a new project from template'
         
     | 
| 
      
 23 
     | 
    
         
            +
              option :android, :type => :boolean, :aliases => '-a'
         
     | 
| 
      
 24 
     | 
    
         
            +
              option :ios, :type => :boolean, :aliases => '-i'
         
     | 
| 
      
 25 
     | 
    
         
            +
              option :templateURL, :aliases => '-t'
         
     | 
| 
      
 26 
     | 
    
         
            +
              def new(project_name)
         
     | 
| 
      
 27 
     | 
    
         
            +
                project_path = File.expand_path(project_name)
         
     | 
| 
      
 28 
     | 
    
         
            +
                raise Error, set_color("ERROR: #{project_path} already exists.", :red) if File.exist?(project_path)
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                generator = Commandly::Generator.new
         
     | 
| 
      
 31 
     | 
    
         
            +
                generator.destination_root = project_path
         
     | 
| 
      
 32 
     | 
    
         
            +
                remote = false
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                if options[:templateURL]
         
     | 
| 
      
 35 
     | 
    
         
            +
                  remote = true
         
     | 
| 
      
 36 
     | 
    
         
            +
                  say "Git cloning from git repository: #{options[:templateURL]}"
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Git.clone(options[:templateURL], project_path)
         
     | 
| 
      
 38 
     | 
    
         
            +
                  # Remove .git directory
         
     | 
| 
      
 39 
     | 
    
         
            +
                  `rm -rf #{project_path}/.git`
         
     | 
| 
      
 40 
     | 
    
         
            +
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                if options[:ios]
         
     | 
| 
      
 43 
     | 
    
         
            +
                  say "Creating iOS project at #{project_path}"
         
     | 
| 
      
 44 
     | 
    
         
            +
                  generator.invoke(:copy_ios_templates) unless remote
         
     | 
| 
      
 45 
     | 
    
         
            +
                  generator.invoke(:find_replace_ios_text)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  generator.invoke(:rename_ios_files)
         
     | 
| 
      
 47 
     | 
    
         
            +
                  `rm -rf #{project_path}/android` unless options[:android]
         
     | 
| 
      
 48 
     | 
    
         
            +
                end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                if options[:android]
         
     | 
| 
      
 51 
     | 
    
         
            +
                  say "Creating Android project at #{project_path}"
         
     | 
| 
      
 52 
     | 
    
         
            +
                  generator.invoke(:copy_android_templates) unless remote
         
     | 
| 
      
 53 
     | 
    
         
            +
                  generator.invoke(:find_replace_android_text)
         
     | 
| 
      
 54 
     | 
    
         
            +
                  generator.invoke(:rename_android_files)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  `rm -rf #{project_path}/ios` unless options[:ios]
         
     | 
| 
      
 56 
     | 
    
         
            +
                end
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                if options[:ios].nil? && options[:android].nil?
         
     | 
| 
      
 59 
     | 
    
         
            +
                  say "Creating iOS and Android project at #{project_path}"
         
     | 
| 
      
 60 
     | 
    
         
            +
                  generator.invoke(:copy_ios_templates) unless remote
         
     | 
| 
      
 61 
     | 
    
         
            +
                  generator.invoke(:find_replace_ios_text)
         
     | 
| 
      
 62 
     | 
    
         
            +
                  generator.invoke(:rename_ios_files)
         
     | 
| 
      
 63 
     | 
    
         
            +
                  generator.invoke(:copy_android_templates) unless remote
         
     | 
| 
      
 64 
     | 
    
         
            +
                  generator.invoke(:find_replace_android_text)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  generator.invoke(:rename_android_files)
         
     | 
| 
      
 66 
     | 
    
         
            +
                end
         
     | 
| 
      
 67 
     | 
    
         
            +
              end
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,71 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'thor'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'thor/group'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            class Commandly::Generator < Thor::Group
         
     | 
| 
      
 5 
     | 
    
         
            +
              include Thor::Actions
         
     | 
| 
      
 6 
     | 
    
         
            +
              desc 'Generate a new project filesystem structure'
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              def self.source_root
         
     | 
| 
      
 9 
     | 
    
         
            +
                File.dirname(__FILE__) + '/../../templates'
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              def copy_ios_templates
         
     | 
| 
      
 13 
     | 
    
         
            +
                directory "ios", "ios"
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              def find_replace_ios_text
         
     | 
| 
      
 17 
     | 
    
         
            +
                project_name = File.basename(destination_root)
         
     | 
| 
      
 18 
     | 
    
         
            +
                Dir.glob(destination_root + "/ios/**/**").each do |name|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  next if Dir.exists? name
         
     | 
| 
      
 20 
     | 
    
         
            +
                  text = File.read(name)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  text = text.gsub("Commandly", project_name)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  File.open(name, "w") { |file| file.puts text }
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              def rename_ios_files
         
     | 
| 
      
 27 
     | 
    
         
            +
                project_name = File.basename(destination_root)
         
     | 
| 
      
 28 
     | 
    
         
            +
                if Dir.exist? destination_root + "/ios/Commandly.xcodeproj"
         
     | 
| 
      
 29 
     | 
    
         
            +
                  File.rename(destination_root + "/ios/Commandly.xcodeproj", destination_root + "/ios/" + project_name + ".xcodeproj")
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
                if Dir.exist? destination_root + "/ios/Commandly"
         
     | 
| 
      
 32 
     | 
    
         
            +
                  File.rename(destination_root + "/ios/Commandly", destination_root + "/ios/" + project_name)
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
                if Dir.exist? destination_root + "/ios/CommandlyTests"
         
     | 
| 
      
 35 
     | 
    
         
            +
                  File.rename(destination_root + "/ios/CommandlyTests/CommandlyTests.m", destination_root + "/ios/CommandlyTests/" + project_name + "Tests.m")
         
     | 
| 
      
 36 
     | 
    
         
            +
                  File.rename(destination_root + "/ios/CommandlyTests", destination_root + "/ios/" + project_name + "Tests")
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
                if Dir.exist? destination_root + "/ios/CommandlyUITests"
         
     | 
| 
      
 39 
     | 
    
         
            +
                  File.rename(destination_root + "/ios/CommandlyUITests/CommandlyUITests.m", "/ios/CommandlyTests/" + project_name + "UITests.m")
         
     | 
| 
      
 40 
     | 
    
         
            +
                  File.rename(destination_root + "/ios/CommandlyUITests", destination_root + "/ios/" + project_name + "UITests")
         
     | 
| 
      
 41 
     | 
    
         
            +
                end
         
     | 
| 
      
 42 
     | 
    
         
            +
              end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              def copy_android_templates
         
     | 
| 
      
 45 
     | 
    
         
            +
                directory "android", "android"
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
              def find_replace_android_text
         
     | 
| 
      
 49 
     | 
    
         
            +
                project_name = File.basename(destination_root)
         
     | 
| 
      
 50 
     | 
    
         
            +
                Dir.glob(destination_root + "/android/**/**").each do |name|
         
     | 
| 
      
 51 
     | 
    
         
            +
                  next if Dir.exists? name
         
     | 
| 
      
 52 
     | 
    
         
            +
                  text = File.read(name)
         
     | 
| 
      
 53 
     | 
    
         
            +
                  text = text.gsub("Commandly", project_name)
         
     | 
| 
      
 54 
     | 
    
         
            +
                  text = text.gsub("commandly", project_name.downcase)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  File.open(name, "w") { |file| file.puts text }
         
     | 
| 
      
 56 
     | 
    
         
            +
                end
         
     | 
| 
      
 57 
     | 
    
         
            +
              end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
              def rename_android_files
         
     | 
| 
      
 60 
     | 
    
         
            +
                project_name = File.basename(destination_root)
         
     | 
| 
      
 61 
     | 
    
         
            +
                if Dir.exist? destination_root + "/android/app/src/androidTest/java/com/vuebly/commandly"
         
     | 
| 
      
 62 
     | 
    
         
            +
                  File.rename(destination_root + "/android/app/src/androidTest/java/com/vuebly/commandly", destination_root + "/android/app/src/androidTest/java/com/vuebly/" + project_name.downcase)
         
     | 
| 
      
 63 
     | 
    
         
            +
                end
         
     | 
| 
      
 64 
     | 
    
         
            +
                if Dir.exist? destination_root + "/android/app/src/main/java/com/vuebly/commandly"
         
     | 
| 
      
 65 
     | 
    
         
            +
                  File.rename(destination_root + "/android/app/src/main/java/com/vuebly/commandly", destination_root + "/android/app/src/main/java/com/vuebly/" + project_name.downcase)
         
     | 
| 
      
 66 
     | 
    
         
            +
                end
         
     | 
| 
      
 67 
     | 
    
         
            +
                if Dir.exist? destination_root + "/android/app/src/test/java/com/vuebly/commandly"
         
     | 
| 
      
 68 
     | 
    
         
            +
                  File.rename(destination_root + "/android/app/src/test/java/com/vuebly/commandly", destination_root + "/android/app/src/test/java/com/vuebly/" + project_name.downcase)
         
     | 
| 
      
 69 
     | 
    
         
            +
                end
         
     | 
| 
      
 70 
     | 
    
         
            +
              end
         
     | 
| 
      
 71 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/commandly.rb
    ADDED
    
    
| 
         @@ -0,0 +1,135 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            # Created by https://www.gitignore.io/api/androidstudio
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            ### AndroidStudio ###
         
     | 
| 
      
 5 
     | 
    
         
            +
            # Covers files to be ignored for android development using Android Studio.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            # Built application files
         
     | 
| 
      
 8 
     | 
    
         
            +
            *.apk
         
     | 
| 
      
 9 
     | 
    
         
            +
            *.ap_
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            # Files for the ART/Dalvik VM
         
     | 
| 
      
 12 
     | 
    
         
            +
            *.dex
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            # Java class files
         
     | 
| 
      
 15 
     | 
    
         
            +
            *.class
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            # Generated files
         
     | 
| 
      
 18 
     | 
    
         
            +
            bin/
         
     | 
| 
      
 19 
     | 
    
         
            +
            gen/
         
     | 
| 
      
 20 
     | 
    
         
            +
            out/
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            # Gradle files
         
     | 
| 
      
 23 
     | 
    
         
            +
            .gradle
         
     | 
| 
      
 24 
     | 
    
         
            +
            .gradle/
         
     | 
| 
      
 25 
     | 
    
         
            +
            build/
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            # Signing files
         
     | 
| 
      
 28 
     | 
    
         
            +
            .signing/
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            # Local configuration file (sdk path, etc)
         
     | 
| 
      
 31 
     | 
    
         
            +
            local.properties
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            # Proguard folder generated by Eclipse
         
     | 
| 
      
 34 
     | 
    
         
            +
            proguard/
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            # Log Files
         
     | 
| 
      
 37 
     | 
    
         
            +
            *.log
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            # Android Studio
         
     | 
| 
      
 40 
     | 
    
         
            +
            /*/build/
         
     | 
| 
      
 41 
     | 
    
         
            +
            /*/local.properties
         
     | 
| 
      
 42 
     | 
    
         
            +
            /*/out
         
     | 
| 
      
 43 
     | 
    
         
            +
            /*/*/build
         
     | 
| 
      
 44 
     | 
    
         
            +
            /*/*/production
         
     | 
| 
      
 45 
     | 
    
         
            +
            captures/
         
     | 
| 
      
 46 
     | 
    
         
            +
            .navigation/
         
     | 
| 
      
 47 
     | 
    
         
            +
            *.ipr
         
     | 
| 
      
 48 
     | 
    
         
            +
            *~
         
     | 
| 
      
 49 
     | 
    
         
            +
            *.swp
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
            # Android Patch
         
     | 
| 
      
 52 
     | 
    
         
            +
            gen-external-apklibs
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
            # External native build folder generated in Android Studio 2.2 and later
         
     | 
| 
      
 55 
     | 
    
         
            +
            .externalNativeBuild
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
            # NDK
         
     | 
| 
      
 58 
     | 
    
         
            +
            obj/
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
            # IntelliJ IDEA
         
     | 
| 
      
 61 
     | 
    
         
            +
            *.iml
         
     | 
| 
      
 62 
     | 
    
         
            +
            *.iws
         
     | 
| 
      
 63 
     | 
    
         
            +
            /out/
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
            # User-specific configurations
         
     | 
| 
      
 66 
     | 
    
         
            +
            .idea/libraries/
         
     | 
| 
      
 67 
     | 
    
         
            +
            .idea/workspace.xml
         
     | 
| 
      
 68 
     | 
    
         
            +
            .idea/tasks.xml
         
     | 
| 
      
 69 
     | 
    
         
            +
            .idea/.name
         
     | 
| 
      
 70 
     | 
    
         
            +
            .idea/compiler.xml
         
     | 
| 
      
 71 
     | 
    
         
            +
            .idea/copyright/profiles_settings.xml
         
     | 
| 
      
 72 
     | 
    
         
            +
            .idea/encodings.xml
         
     | 
| 
      
 73 
     | 
    
         
            +
            .idea/misc.xml
         
     | 
| 
      
 74 
     | 
    
         
            +
            .idea/modules.xml
         
     | 
| 
      
 75 
     | 
    
         
            +
            .idea/scopes/scope_settings.xml
         
     | 
| 
      
 76 
     | 
    
         
            +
            .idea/dictionaries
         
     | 
| 
      
 77 
     | 
    
         
            +
            .idea/vcs.xml
         
     | 
| 
      
 78 
     | 
    
         
            +
            .idea/jsLibraryMappings.xml
         
     | 
| 
      
 79 
     | 
    
         
            +
            .idea/datasources.xml
         
     | 
| 
      
 80 
     | 
    
         
            +
            .idea/dataSources.ids
         
     | 
| 
      
 81 
     | 
    
         
            +
            .idea/sqlDataSources.xml
         
     | 
| 
      
 82 
     | 
    
         
            +
            .idea/dynamic.xml
         
     | 
| 
      
 83 
     | 
    
         
            +
            .idea/uiDesigner.xml
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
            # Keystore files
         
     | 
| 
      
 86 
     | 
    
         
            +
            *.jks
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
            # OS-specific files
         
     | 
| 
      
 89 
     | 
    
         
            +
            .DS_Store
         
     | 
| 
      
 90 
     | 
    
         
            +
            .DS_Store?
         
     | 
| 
      
 91 
     | 
    
         
            +
            ._*
         
     | 
| 
      
 92 
     | 
    
         
            +
            .Spotlight-V100
         
     | 
| 
      
 93 
     | 
    
         
            +
            .Trashes
         
     | 
| 
      
 94 
     | 
    
         
            +
            ehthumbs.db
         
     | 
| 
      
 95 
     | 
    
         
            +
            Thumbs.db
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            # Legacy Eclipse project files
         
     | 
| 
      
 98 
     | 
    
         
            +
            .classpath
         
     | 
| 
      
 99 
     | 
    
         
            +
            .project
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
            # Mobile Tools for Java (J2ME)
         
     | 
| 
      
 102 
     | 
    
         
            +
            .mtj.tmp/
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            # Package Files #
         
     | 
| 
      
 105 
     | 
    
         
            +
            *.jar
         
     | 
| 
      
 106 
     | 
    
         
            +
            *.war
         
     | 
| 
      
 107 
     | 
    
         
            +
            *.ear
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
            # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
         
     | 
| 
      
 110 
     | 
    
         
            +
            hs_err_pid*
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
            ## Plugin-specific files:
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
            # mpeltonen/sbt-idea plugin
         
     | 
| 
      
 115 
     | 
    
         
            +
            .idea_modules/
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
            # JIRA plugin
         
     | 
| 
      
 118 
     | 
    
         
            +
            atlassian-ide-plugin.xml
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
            # Mongo Explorer plugin
         
     | 
| 
      
 121 
     | 
    
         
            +
            .idea/mongoSettings.xml
         
     | 
| 
      
 122 
     | 
    
         
            +
             
     | 
| 
      
 123 
     | 
    
         
            +
            # Crashlytics plugin (for Android Studio and IntelliJ)
         
     | 
| 
      
 124 
     | 
    
         
            +
            com_crashlytics_export_strings.xml
         
     | 
| 
      
 125 
     | 
    
         
            +
            crashlytics.properties
         
     | 
| 
      
 126 
     | 
    
         
            +
            crashlytics-build.properties
         
     | 
| 
      
 127 
     | 
    
         
            +
            fabric.properties
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
            ### AndroidStudio Patch ###
         
     | 
| 
      
 130 
     | 
    
         
            +
            # Google Services plugin
         
     | 
| 
      
 131 
     | 
    
         
            +
            google-services.json
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
            !/gradle/wrapper/gradle-wrapper.jar
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
            # End of https://www.gitignore.io/api/androidstudio
         
     | 
| 
         @@ -0,0 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <project version="4">
         
     | 
| 
      
 3 
     | 
    
         
            +
              <component name="GradleSettings">
         
     | 
| 
      
 4 
     | 
    
         
            +
                <option name="linkedExternalProjectsSettings">
         
     | 
| 
      
 5 
     | 
    
         
            +
                  <GradleProjectSettings>
         
     | 
| 
      
 6 
     | 
    
         
            +
                    <option name="distributionType" value="DEFAULT_WRAPPED" />
         
     | 
| 
      
 7 
     | 
    
         
            +
                    <option name="externalProjectPath" value="$PROJECT_DIR$" />
         
     | 
| 
      
 8 
     | 
    
         
            +
                    <option name="modules">
         
     | 
| 
      
 9 
     | 
    
         
            +
                      <set>
         
     | 
| 
      
 10 
     | 
    
         
            +
                        <option value="$PROJECT_DIR$" />
         
     | 
| 
      
 11 
     | 
    
         
            +
                        <option value="$PROJECT_DIR$/app" />
         
     | 
| 
      
 12 
     | 
    
         
            +
                      </set>
         
     | 
| 
      
 13 
     | 
    
         
            +
                    </option>
         
     | 
| 
      
 14 
     | 
    
         
            +
                    <option name="resolveModulePerSourceSet" value="false" />
         
     | 
| 
      
 15 
     | 
    
         
            +
                  </GradleProjectSettings>
         
     | 
| 
      
 16 
     | 
    
         
            +
                </option>
         
     | 
| 
      
 17 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 18 
     | 
    
         
            +
            </project>
         
     | 
| 
         @@ -0,0 +1,12 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <project version="4">
         
     | 
| 
      
 3 
     | 
    
         
            +
              <component name="RunConfigurationProducerService">
         
     | 
| 
      
 4 
     | 
    
         
            +
                <option name="ignoredProducers">
         
     | 
| 
      
 5 
     | 
    
         
            +
                  <set>
         
     | 
| 
      
 6 
     | 
    
         
            +
                    <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
         
     | 
| 
      
 7 
     | 
    
         
            +
                    <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
         
     | 
| 
      
 8 
     | 
    
         
            +
                    <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
         
     | 
| 
      
 9 
     | 
    
         
            +
                  </set>
         
     | 
| 
      
 10 
     | 
    
         
            +
                </option>
         
     | 
| 
      
 11 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 12 
     | 
    
         
            +
            </project>
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /build
         
     | 
| 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            apply plugin: 'com.android.application'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            android {
         
     | 
| 
      
 4 
     | 
    
         
            +
                compileSdkVersion 26
         
     | 
| 
      
 5 
     | 
    
         
            +
                buildToolsVersion "26.0.0"
         
     | 
| 
      
 6 
     | 
    
         
            +
                defaultConfig {
         
     | 
| 
      
 7 
     | 
    
         
            +
                    applicationId "com.vuebly.commandly"
         
     | 
| 
      
 8 
     | 
    
         
            +
                    minSdkVersion 16
         
     | 
| 
      
 9 
     | 
    
         
            +
                    targetSdkVersion 26
         
     | 
| 
      
 10 
     | 
    
         
            +
                    versionCode 1
         
     | 
| 
      
 11 
     | 
    
         
            +
                    versionName "1.0"
         
     | 
| 
      
 12 
     | 
    
         
            +
                    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         
     | 
| 
      
 13 
     | 
    
         
            +
                }
         
     | 
| 
      
 14 
     | 
    
         
            +
                buildTypes {
         
     | 
| 
      
 15 
     | 
    
         
            +
                    release {
         
     | 
| 
      
 16 
     | 
    
         
            +
                        minifyEnabled false
         
     | 
| 
      
 17 
     | 
    
         
            +
                        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         
     | 
| 
      
 18 
     | 
    
         
            +
                    }
         
     | 
| 
      
 19 
     | 
    
         
            +
                }
         
     | 
| 
      
 20 
     | 
    
         
            +
            }
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            dependencies {
         
     | 
| 
      
 23 
     | 
    
         
            +
                compile fileTree(dir: 'libs', include: ['*.jar'])
         
     | 
| 
      
 24 
     | 
    
         
            +
                androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
         
     | 
| 
      
 25 
     | 
    
         
            +
                    exclude group: 'com.android.support', module: 'support-annotations'
         
     | 
| 
      
 26 
     | 
    
         
            +
                })
         
     | 
| 
      
 27 
     | 
    
         
            +
                compile 'com.android.support:appcompat-v7:26.+'
         
     | 
| 
      
 28 
     | 
    
         
            +
                compile 'com.android.support.constraint:constraint-layout:1.0.2'
         
     | 
| 
      
 29 
     | 
    
         
            +
                testCompile 'junit:junit:4.12'
         
     | 
| 
      
 30 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,25 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Add project specific ProGuard rules here.
         
     | 
| 
      
 2 
     | 
    
         
            +
            # By default, the flags in this file are appended to flags specified
         
     | 
| 
      
 3 
     | 
    
         
            +
            # in /Users/vuebly/Library/Android/sdk/tools/proguard/proguard-android.txt
         
     | 
| 
      
 4 
     | 
    
         
            +
            # You can edit the include path and order by changing the proguardFiles
         
     | 
| 
      
 5 
     | 
    
         
            +
            # directive in build.gradle.
         
     | 
| 
      
 6 
     | 
    
         
            +
            #
         
     | 
| 
      
 7 
     | 
    
         
            +
            # For more details, see
         
     | 
| 
      
 8 
     | 
    
         
            +
            #   http://developer.android.com/guide/developing/tools/proguard.html
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            # Add any project specific keep options here:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            # If your project uses WebView with JS, uncomment the following
         
     | 
| 
      
 13 
     | 
    
         
            +
            # and specify the fully qualified class name to the JavaScript interface
         
     | 
| 
      
 14 
     | 
    
         
            +
            # class:
         
     | 
| 
      
 15 
     | 
    
         
            +
            #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
         
     | 
| 
      
 16 
     | 
    
         
            +
            #   public *;
         
     | 
| 
      
 17 
     | 
    
         
            +
            #}
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            # Uncomment this to preserve the line number information for
         
     | 
| 
      
 20 
     | 
    
         
            +
            # debugging stack traces.
         
     | 
| 
      
 21 
     | 
    
         
            +
            #-keepattributes SourceFile,LineNumberTable
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            # If you keep the line number information, uncomment this to
         
     | 
| 
      
 24 
     | 
    
         
            +
            # hide the original source file name.
         
     | 
| 
      
 25 
     | 
    
         
            +
            #-renamesourcefileattribute SourceFile
         
     | 
    
        data/templates/android/app/src/androidTest/java/com/vuebly/commandly/ExampleInstrumentedTest.java
    ADDED
    
    | 
         @@ -0,0 +1,26 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            package com.vuebly.commandly;
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            import android.content.Context;
         
     | 
| 
      
 4 
     | 
    
         
            +
            import android.support.test.InstrumentationRegistry;
         
     | 
| 
      
 5 
     | 
    
         
            +
            import android.support.test.runner.AndroidJUnit4;
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            import org.junit.Test;
         
     | 
| 
      
 8 
     | 
    
         
            +
            import org.junit.runner.RunWith;
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            import static org.junit.Assert.*;
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            /**
         
     | 
| 
      
 13 
     | 
    
         
            +
             * Instrumentation test, which will execute on an Android device.
         
     | 
| 
      
 14 
     | 
    
         
            +
             *
         
     | 
| 
      
 15 
     | 
    
         
            +
             * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
         
     | 
| 
      
 16 
     | 
    
         
            +
             */
         
     | 
| 
      
 17 
     | 
    
         
            +
            @RunWith(AndroidJUnit4.class)
         
     | 
| 
      
 18 
     | 
    
         
            +
            public class ExampleInstrumentedTest {
         
     | 
| 
      
 19 
     | 
    
         
            +
                @Test
         
     | 
| 
      
 20 
     | 
    
         
            +
                public void useAppContext() throws Exception {
         
     | 
| 
      
 21 
     | 
    
         
            +
                    // Context of the app under test.
         
     | 
| 
      
 22 
     | 
    
         
            +
                    Context appContext = InstrumentationRegistry.getTargetContext();
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                    assertEquals("com.vuebly.commandly", appContext.getPackageName());
         
     | 
| 
      
 25 
     | 
    
         
            +
                }
         
     | 
| 
      
 26 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="utf-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         
     | 
| 
      
 3 
     | 
    
         
            +
                package="com.vuebly.commandly">
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                <application
         
     | 
| 
      
 6 
     | 
    
         
            +
                    android:allowBackup="true"
         
     | 
| 
      
 7 
     | 
    
         
            +
                    android:icon="@mipmap/ic_launcher"
         
     | 
| 
      
 8 
     | 
    
         
            +
                    android:label="@string/app_name"
         
     | 
| 
      
 9 
     | 
    
         
            +
                    android:roundIcon="@mipmap/ic_launcher_round"
         
     | 
| 
      
 10 
     | 
    
         
            +
                    android:supportsRtl="true"
         
     | 
| 
      
 11 
     | 
    
         
            +
                    android:theme="@style/AppTheme">
         
     | 
| 
      
 12 
     | 
    
         
            +
                    <activity android:name=".MainActivity">
         
     | 
| 
      
 13 
     | 
    
         
            +
                        <intent-filter>
         
     | 
| 
      
 14 
     | 
    
         
            +
                            <action android:name="android.intent.action.MAIN" />
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                            <category android:name="android.intent.category.LAUNCHER" />
         
     | 
| 
      
 17 
     | 
    
         
            +
                        </intent-filter>
         
     | 
| 
      
 18 
     | 
    
         
            +
                    </activity>
         
     | 
| 
      
 19 
     | 
    
         
            +
                </application>
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            </manifest>
         
     | 
| 
         @@ -0,0 +1,13 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            package com.vuebly.commandly;
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            import android.support.v7.app.AppCompatActivity;
         
     | 
| 
      
 4 
     | 
    
         
            +
            import android.os.Bundle;
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            public class MainActivity extends AppCompatActivity {
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                @Override
         
     | 
| 
      
 9 
     | 
    
         
            +
                protected void onCreate(Bundle savedInstanceState) {
         
     | 
| 
      
 10 
     | 
    
         
            +
                    super.onCreate(savedInstanceState);
         
     | 
| 
      
 11 
     | 
    
         
            +
                    setContentView(R.layout.activity_main);
         
     | 
| 
      
 12 
     | 
    
         
            +
                }
         
     | 
| 
      
 13 
     | 
    
         
            +
            }
         
     |