lib/dryrun/android_project.rb in dryrun-0.2.1 vs lib/dryrun/android_project.rb in dryrun-0.2.2
- old
+ new
@@ -31,30 +31,29 @@
# ./gradlew clean installDebug
def clean_install
Dir.chdir @base_path
- #self.uninstall
-
- # clean assemble and install
-
path, execute_line = self.sample_project
-
if path == false and execute_line==false
puts "Couldn't open, sorry!".red
exit 1
end
- if !File.exist?("gradlew")
- system("gradle clean assembleDebug installDebug")
- else
+ builder = "gradle"
+
+ if File.exist?("gradlew")
system("chmod +x gradlew")
- system("./gradlew clean assembleDebug installDebug")
+ builder = "./gradlew"
end
+ self.uninstall
+ system("#{builder} clean assembleDebug installDebug")
+
+
puts "Installing #{@package.green}...\n"
puts "executing: #{execute_line}"
system(execute_line)
end
@@ -65,13 +64,11 @@
full_path = "#{@base_path}#{child.first}"
execute_line = get_execute_line("#{full_path}/src/main/AndroidManifest.xml")
if execute_line
- puts "\nTHE SAMPLE IS HERE #{full_path.green}:\n"
-
- system("tree #{full_path}")
-
+ #puts "\nTHE SAMPLE IS HERE #{full_path.green}:\n"
+ #system("tree #{full_path}")
return full_path, execute_line
end
end
return false, false