# frozen_string_literal: true module GoNative module Commands module Android module Helpers module GradleVersionReader def gradle_file @gradle_file ||= `find . -maxdepth 2 -iname build.gradle`.split("\n").first end def version return @version if @version str = IO.read(gradle_file) @version = str.match(/versionName\s+"(?.+)"/)[:version] end end end end end end