Sha256: f87e9c172a9d45f5df0680fe2af18b3601c0654f5388026129e99c1919288691

Contents?: true

Size: 502 Bytes

Versions: 6

Compression:

Stored size: 502 Bytes

Contents

# 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>.+)"/)[:version]
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gonative-cli-1.4.4 lib/gonative/commands/android/helpers/gradle_version_reader.rb
gonative-cli-1.4.3 lib/gonative/commands/android/helpers/gradle_version_reader.rb
gonative-cli-1.4.2 lib/gonative/commands/android/helpers/gradle_version_reader.rb
gonative-cli-1.4.1 lib/gonative/commands/android/helpers/gradle_version_reader.rb
gonative-cli-1.4.0 lib/gonative/commands/android/helpers/gradle_version_reader.rb
gonative-cli-1.3.9 lib/gonative/commands/android/helpers/gradle_version_reader.rb