/*
 * Copyright 2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.gradle.jvm.toolchain.internal;

import org.gradle.api.tasks.Input;
import org.gradle.jvm.toolchain.JavaLanguageVersion;
import org.gradle.jvm.toolchain.JavaToolchainSpec;

public class JavaToolchainInput {

    private final JavaToolchainSpec spec;

    public JavaToolchainInput(JavaToolchainSpec spec) {
        this.spec = spec;
    }

    @Input
    JavaLanguageVersion getLanguageVersion() {
        return spec.getLanguageVersion().get();
    }

    @Input
    String getVendor() {
        return spec.getVendor().get().toString();
    }

    @Input
    String getImplementation() {
        return spec.getImplementation().get().toString();
    }

}

@@ -855,109 +855,372 @@
 Java
-ToolchainSpec spec;%0A%0A    public JavaToolchainInput(JavaToolchainSpec spec) %7B%0A        this.spec = spec
+LanguageVersion javaLanguageVersion;%0A    private final String vendor;%0A    private final String implementation;%0A%0A    public JavaToolchainInput(JavaToolchainSpec spec) %7B%0A        this.javaLanguageVersion = spec.getLanguageVersion().get();%0A        this.vendor = spec.getVendor().get().toString();%0A        this.implementation = spec.getImplementation().get().toString()
 ;%0A  
@@ -1297,24 +1297,20 @@
  return 
-spec.get
+java
 Language
@@ -1312,32 +1312,24 @@
 guageVersion
-().get()
 ;%0A    %7D%0A%0A   
@@ -1380,41 +1380,14 @@
 urn 
-spec.getVendor().get().toString()
+vendor
 ;%0A  
@@ -1450,25 +1450,17 @@
  return 
-spec.getI
+i
 mplement
@@ -1464,35 +1464,16 @@
 entation
-().get().toString()
 ;%0A    %7D%0A

Make JavaToolchainInput configuration cache compatible