Class: Dryrun::GradleAdapter
- Inherits:
-
Object
- Object
- Dryrun::GradleAdapter
- Defined in:
- lib/dryrun/gradle_adapter.rb
Instance Method Summary collapse
- #assemble(custom_module, flavour) ⇒ Object
- #clean ⇒ Object
-
#initialize(builder) ⇒ GradleAdapter
constructor
A new instance of GradleAdapter.
- #install(custom_module, flavour) ⇒ Object
- #run_android_tests(custom_module, flavour) ⇒ Object
- #run_unit_tests(custom_module, flavour) ⇒ Object
Constructor Details
#initialize(builder) ⇒ GradleAdapter
Returns a new instance of GradleAdapter.
6 7 8 |
# File 'lib/dryrun/gradle_adapter.rb', line 6 def initialize(builder) @builder = builder end |
Instance Method Details
#assemble(custom_module, flavour) ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/dryrun/gradle_adapter.rb', line 45 def assemble(custom_module, flavour) if custom_module puts "#{@builder} :#{custom_module}:assemble#{flavour}Debug" DryrunUtils.execute("#{@builder} :#{custom_module}:assemble#{flavour}Debug") else puts "#{@builder} assemble#{flavour}Debug" DryrunUtils.execute("#{@builder} assemble#{flavour}Debug") end end |
#clean ⇒ Object
10 11 12 |
# File 'lib/dryrun/gradle_adapter.rb', line 10 def clean DryrunUtils.execute("#{@builder} clean") end |
#install(custom_module, flavour) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/dryrun/gradle_adapter.rb', line 34 def install(custom_module, flavour) if custom_module puts "#{@builder} :#{custom_module}:install#{flavour}Debug" DryrunUtils.execute("#{@builder} :#{custom_module}:install#{flavour}Debug") else puts "#{@builder} install#{flavour}Debug" DryrunUtils.execute("#{@builder} install#{flavour}Debug") end end |
#run_android_tests(custom_module, flavour) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/dryrun/gradle_adapter.rb', line 14 def run_android_tests(custom_module, flavour) if custom_module puts "#{@builder} :#{custom_module}:connected#{flavour}DebugAndroidTest" DryrunUtils.execute("#{@builder} :#{custom_module}:connected#{flavour}DebugAndroidTest") else puts "#{@builder} connected#{flavour}DebugAndroidTest" DryrunUtils.execute("#{@builder} connected#{flavour}DebugAndroidTest") end end |
#run_unit_tests(custom_module, flavour) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/dryrun/gradle_adapter.rb', line 24 def run_unit_tests(custom_module, flavour) if custom_module puts "#{@builder} :#{custom_module}:test#{flavour}DebugUnitTest" DryrunUtils.execute("#{@builder} :#{custom_module}:test#{flavour}DebugUnitTest") else puts "#{@builder} test#{flavour}DebugUnitTest" DryrunUtils.execute("#{@builder} test#{flavour}DebugUnitTest") end end |