Module: GoNative::Commands::Android::Helpers::GradleVersionReader
- Defined in:
- lib/gonative/commands/android/helpers/gradle_version_reader.rb
Instance Method Summary collapse
Instance Method Details
#gradle_file ⇒ Object
8 9 10 |
# File 'lib/gonative/commands/android/helpers/gradle_version_reader.rb', line 8 def gradle_file @gradle_file ||= `find . -maxdepth 2 -iname build.gradle`.split("\n").first end |
#version ⇒ Object
12 13 14 15 16 17 |
# File 'lib/gonative/commands/android/helpers/gradle_version_reader.rb', line 12 def version return @version if @version str = IO.read(gradle_file) @version = str.match(/versionName\s+"(?<version>.+)"/)[:version] end |