Sha256: 28a7ab622b9f9903d262f983b9a05109d7c89a2f6e5fb35aa524e35d7f76b7a1

Contents?: true

Size: 554 Bytes

Versions: 7

Compression:

Stored size: 554 Bytes

Contents

module Vx
  module Builder
    class Script

      class Java < Base

        def call(env)
          if java(env)
            do_cache_key(env) do |i|
              i << "jdk-#{java env}"
            end

            do_before_install(env) do |i|
              i << "source $(which jdk_switcher.sh)"
              i << trace_sh_command("jdk_switcher use #{java env}")
            end
          end

          app.call(env)
        end

        private

          def java(env)
            env.source.jdk.first
          end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vx-builder-0.3.3 lib/vx/builder/script_builder/java.rb-e
vx-builder-0.3.2 lib/vx/builder/script_builder/java.rb-e
vx-builder-0.3.1 lib/vx/builder/script_builder/java.rb-e
vx-builder-0.3.0 lib/vx/builder/script_builder/java.rb-e
vx-builder-0.2.2 lib/vx/builder/script/java.rb
vx-builder-0.2.1 lib/vx/builder/script/java.rb
vx-builder-0.2.0 lib/vx/builder/script/java.rb