├── .github └── stale.yml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── .travis.yml ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── bin └── dryrun ├── docs ├── css │ └── main.css ├── index.html ├── js │ ├── index.js │ └── vendor │ │ └── .keep └── res │ └── .keep ├── dryrun.gemspec ├── extras ├── gift.gif ├── logo.png ├── ss.gif ├── usage.gif ├── usage_v2.gif ├── usage_v3.gif └── usage_v4.gif ├── facelift.json ├── lib ├── dryrun.rb └── dryrun │ ├── android_project.rb │ ├── android_utils.rb │ ├── device.rb │ ├── dryrun_utils.rb │ ├── github.rb │ ├── gradle_adapter.rb │ ├── install_application_command.rb │ ├── manifest_parser.rb │ ├── test_application_command.rb │ └── version.rb └── spec ├── dryrun_spec.rb ├── github_spec.rb └── spec_helper.rb /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 30 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bundle/ 2 | /.yardoc 3 | /_yardoc/ 4 | /coverage/ 5 | /doc/ 6 | /pkg/ 7 | /spec/reports/ 8 | /tmp/ 9 | .idea/ 10 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | --tty 3 | --color 4 | --format documentation 5 | --format html -o "tmp/rspec_result.html" 6 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | Style/Encoding: 2 | Enabled: false 3 | 4 | Metrics/LineLength: 5 | Enabled: false 6 | 7 | Metrics/MethodLength: 8 | Enabled: false 9 | 10 | Metrics/ClassLength: 11 | Enabled: false 12 | 13 | Metrics/PerceivedComplexity: 14 | Enabled: false 15 | 16 | Metrics/AbcSize: 17 | Enabled: false 18 | 19 | Metrics/CyclomaticComplexity: 20 | Enabled: false 21 | 22 | AllCops: 23 | TargetRubyVersion: 2.0 24 | 25 | Documentation: 26 | Enabled: false 27 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | sudo: false 3 | rvm: 4 | - 2.3.0 5 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in sinderella.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | dryrun (1.3.2) 5 | bundler 6 | colorize 7 | highline 8 | oga 9 | rjb 10 | 11 | GEM 12 | remote: https://rubygems.org/ 13 | specs: 14 | ansi (1.5.0) 15 | ast (2.4.1) 16 | byebug (11.1.3) 17 | coderay (1.1.3) 18 | colorize (0.8.1) 19 | diff-lcs (1.4.4) 20 | highline (2.0.3) 21 | method_source (1.0.0) 22 | oga (3.3) 23 | ast 24 | ruby-ll (~> 2.1) 25 | pry (0.13.1) 26 | coderay (~> 1.1) 27 | method_source (~> 1.0) 28 | pry-byebug (3.9.0) 29 | byebug (~> 11.0) 30 | pry (~> 0.13.0) 31 | rake (13.0.1) 32 | rjb (1.6.2) 33 | rspec (3.9.0) 34 | rspec-core (~> 3.9.0) 35 | rspec-expectations (~> 3.9.0) 36 | rspec-mocks (~> 3.9.0) 37 | rspec-core (3.9.2) 38 | rspec-support (~> 3.9.3) 39 | rspec-expectations (3.9.2) 40 | diff-lcs (>= 1.2.0, < 2.0) 41 | rspec-support (~> 3.9.0) 42 | rspec-mocks (3.9.1) 43 | diff-lcs (>= 1.2.0, < 2.0) 44 | rspec-support (~> 3.9.0) 45 | rspec-support (3.9.3) 46 | ruby-ll (2.1.2) 47 | ansi 48 | ast 49 | 50 | PLATFORMS 51 | ruby 52 | 53 | DEPENDENCIES 54 | dryrun! 55 | pry-byebug 56 | rake 57 | rspec 58 | 59 | BUNDLED WITH 60 | 2.1.4 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 César Ferreira 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 all 13 | 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 THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 6 |

dryrun

7 |

Try any android library hosted online directly from the command line

8 |

9 | downloads 10 | npm 11 | Android Weekly 12 | Codacy Badge 13 | Closed 14 | 15 |

16 | 17 |

18 | 19 |

20 | 21 | ## Install 22 | 23 | ```sh 24 | gem install dryrun 25 | ``` 26 | 27 | ## Usage 28 | 29 | ```bash 30 | dryrun https://github.com/cesarferreira/android-helloworld 31 | ``` 32 | 33 | Wait a few seconds and the app is now opened on your phone :smiley: 34 | 35 | ```bash 36 | $ dryrun -h 37 | Usage: dryrun GIT_URL [OPTIONS] 38 | 39 | Options 40 | -m, --module MODULE_NAME Custom module to run 41 | -b, --branch BRANCH_NAME Checkout custom branch to run 42 | -f, --flavour FLAVOUR Custom flavour (e.g. dev, qa, prod) 43 | -p, --path PATH Custom path to android project 44 | -t, --tag TAG Checkout tag/commit hash to clone (e.g. "v0.4.5", "6f7dd4b") 45 | -c, --cleanup Clean the temporary folder before cloning the project 46 | -w, --wipe Wipe the temporary dryrun folder 47 | -h, --help Displays help 48 | -v, --version Displays the version 49 | -a, --android-test Execute android tests 50 | ``` 51 | 52 | ## Alternative scenario (if you don't use `dryrun`) 53 | 54 | 1. Find the github's repository url 55 | 2. Click the `download zip` 56 | 3. Extract the `zip file` 57 | 4. Open Android Studio 58 | 5. Import the project you just downloaded 59 | 6. Sync gradle 60 | 7. Run the project 61 | 8. Choose the device you want to run 62 | 9. Test all you want 63 | 10. Delete the `project folder` and the `zip file` when you don't want it anymore 64 | 65 | ## Goodies 66 | 67 | - Private repos can be tested too :smiley: 68 | ``` 69 | $ dryrun git@github.com:cesarferreira/android-helloworld.git 70 | ``` 71 | - No need to cleanup after you test the library. 72 | - No need to wait for **Android Studio** to load. 73 | 74 | 75 | ## Notes 76 | 77 | Be aware that `$ANDROID_SDK_ROOT` environment variable needs to be set. See more in [here](https://developer.android.com/studio/command-line/variables#set) 78 | 79 | Additionally, on windows in order to use git commands, the following path should be on the environment variable 80 | - ```...\Git\cmd ``` 81 | 82 | ## Created by 83 | [Cesar Ferreira](https://cesarferreira.com) 84 | 85 | ## License 86 | MIT © [Cesar Ferreira](http://cesarferreira.com) 87 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'bundler/gem_tasks' 2 | require 'rspec/core/rake_task' 3 | 4 | task default: :test 5 | RSpec::Core::RakeTask.new(:test) 6 | -------------------------------------------------------------------------------- /bin/dryrun: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'bundler/setup' 4 | require 'dryrun' 5 | 6 | Dryrun::MainApp.new(ARGV).call 7 | -------------------------------------------------------------------------------- /docs/css/main.css: -------------------------------------------------------------------------------- 1 | div.notification.notification-producthunt { 2 | border-radius: 0 !important; 3 | background: #da552f; 4 | } 5 | 6 | p.install-text code { 7 | border-radius: 5px; 8 | padding: 0.75rem; 9 | } 10 | 11 | p.install-text code::before { 12 | content: '$ '; 13 | } 14 | 15 | p.install-text code:hover { 16 | cursor: text; 17 | } 18 | 19 | p.install-text code:hover span { 20 | background: pink; 21 | } 22 | 23 | .hero .hero-foot { 24 | margin-bottom: 1rem; 25 | } 26 | 27 | #madeWithBulma { 28 | vertical-align: bottom; 29 | } 30 | 31 | div.column.has-content-vcentered { 32 | display: flex; 33 | flex-direction: column; 34 | justify-content: center; 35 | } 36 | 37 | div.notification.copy-notification { 38 | position: absolute; 39 | top: 0; 40 | right: 0; 41 | z-index: 999; 42 | } 43 | 44 | .makerlink { 45 | font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; 46 | right: 0px; 47 | bottom: 0px; 48 | position: fixed; 49 | z-index: 100; 50 | border-top-left-radius: 5px; 51 | color: rgb(111, 111, 111); 52 | padding: 6px; 53 | border-top: 1px solid rgb(239, 239, 239); 54 | border-left: 1px solid rgb(239, 239, 239); 55 | background: rgb(255, 255, 255); 56 | text-decoration: none; 57 | } 58 | 59 | .makerlink .makerlink__img { 60 | width: 22px; 61 | vertical-align: middle; 62 | border-radius: 100%; 63 | } 64 | 65 | .makerlink .makerlink__author { 66 | vertical-align: middle; 67 | display: inline; 68 | font-weight: 500; 69 | font-size: 14px; 70 | margin: 0px 0px 0px 7px; 71 | } 72 | 73 | h1 a { 74 | color:inherit; 75 | text-decoration: none; 76 | } -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | dryrun - ☁️ Try the demo project of any Android Library 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 |
25 |
26 | 27 |
28 |

dryrun

29 |

☁️ Try the demo project of any Android Library

30 |
31 |

32 | gem install dryrun 33 |

34 | 35 |
36 | 37 |
38 | Features 39 |
    40 |
  • Try any android library hosted online directly from the command line
  • 41 |
  • Specify any custom branch to run
  • 42 |
  • Specify any flavour to run
  • 43 |
  • Specify any app module to run
  • 44 |
  • Checkout tag/commit hash to clone (e.g. "v0.4.5", "6f7dd4b")
  • 45 |
46 |
47 |
48 | Links 49 | 53 |
54 | 55 |
56 | 57 |
58 |
59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/js/index.js: -------------------------------------------------------------------------------- 1 | // `copyToClipboard()` courtesy @chalarangelo (Angelos Chalaris) 2 | // refs: https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f 3 | const copyToClipboard = (str) => { 4 | const el = document.createElement('textarea'); // Create a