/*
 * Copyright 2019 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.api.artifacts.transform;

import org.gradle.api.Incubating;
import org.gradle.internal.HasInternalProtocol;

import java.io.File;

/**
 * The outputs of the artifact transform.
 *
 * <p>The order in which the methods on this interface are called is important, since the output of a transform is ordered.</p>
 *
 * @since 5.3
 */
@Incubating
@HasInternalProtocol
public interface ArtifactTransformOutputs {
    /**
     * Registers an output file in the workspace of the transform.
     *
     * <p>The order of calls to this method is retained in the result of the transform.</p>
     *
     * @param relativePath relative path of the output to the provided workspace
     * @return determined location of the output
     */
    File registerOutput(String relativePath);

    /**
     * Registers an output file of the transform.
     *
     * <p>This method needs be used when part of the {@link PrimaryInput} is the output of the transform.</p>
     *
     * @param output the output
     */
    void registerOutput(File output);

    /**
     * Registers the provided workspace as the output of the transform.
     *
     * @return location of the workspace directory
     */
    File registerWorkspaceAsOutput();
}

@@ -819,91 +819,189 @@
  %3Cp%3E
-The order in which the methods on this interfac
+%0A *     The final output of the artifact transform is an ordered list of %7B@link File%7Ds.%0A *     In th
 e 
+v
 ar
-e called is important, since the
+iant produced by this transform, each artifact will be replaced by the final
  out
@@ -1007,17 +1007,19 @@
 tput of 
-a
+the
  transfo
@@ -1025,19 +1025,137 @@
 orm 
-is ordered.
+executed on the artifact.%0A *     This is why the order of calls to output registering methods on this interface is important.%0A * 
 %3C/p%3E
@@ -1293,16 +1293,29 @@
 ut file 
+or directory 
 in the w
@@ -1326,103 +1326,8 @@
 pace
- of the transform.%0A     *%0A     * %3Cp%3EThe order of calls to this method is retained in the result
  of 
@@ -1332,36 +1332,32 @@
 f the transform.
-%3C/p%3E
 %0A     *%0A     * @
@@ -1573,16 +1573,29 @@
 ut file 
+or directory 
 of the t
@@ -1637,13 +1637,11 @@
 hod 
-needs
+can
  be 
@@ -1654,16 +1654,8 @@
 hen 
-part of 
 the 
@@ -1678,16 +1678,23 @@
 put%7D is 
+one of 
 the outp
@@ -1687,32 +1687,33 @@
 ne of the output
+s
  of the transfor

Improve Javadoc