lib/dryrun/android_project.rb in dryrun-1.1.4 vs lib/dryrun/android_project.rb in dryrun-1.1.5
- old
+ new
@@ -87,13 +87,11 @@
def execute_command(command)
Dir.chdir @base_path
path = sample_project
- manifest_parsed = parse_manifest(path)
-
- if path == false && manifest_parsed == false or !@launcher_activity
+ if path == false or !@launcher_activity
puts "Couldn't open or there isnt any sample project, sorry!".red
exit 1
end
builder = create_builder
@@ -117,11 +115,11 @@
return @path_to_sample
else
@modules.each do |child|
full_path = File.join(@base_path, child.first)
@path_to_sample = full_path
- return full_path
+ return full_path if parse_manifest(full_path)
end
end
false
end
@@ -139,13 +137,11 @@
return false if manifest_file.nil?
manifest_parser = ManifestParser.new(manifest_file)
@package = manifest_parser.package
@launcher_activity = manifest_parser.launcher_activity
-
- return false unless @launcher_activity
-
manifest_file.close
+ @launcher_activity && @package
end
def get_manifest(path_to_sample)
default_path = File.join(path_to_sample, 'src/main/AndroidManifest.xml')