package com.github.blindpirate.gogradle.core.dependency;

import java.io.File;
import java.util.Map;

public interface ResolvedDependency extends GolangDependency {

    /**
     * The update time of a dependency. It will be used in resolving package conflict.
     * Generally speaking, package with newest update time will win.
     *
     * @return the update time determined by the package. It may be the last modified time
     * of a file on filesystem or in scm.
     */
    long getUpdateTime();

    /**
     * Get transitive dependencies of this package.
     *
     * @return the transitive dependencies
     */
    GolangDependencySet getDependencies();

    Map<String, Object> toLockedNotation();

    void installTo(File targetDirectory);

    String formatVersion();

    @Override
    default ResolvedDependency resolve() {
        return this;
    }
}

package com.github.blindpirate.gogradle.core.dependency;

import java.io.File;
import java.util.Map;

public interface ResolvedDependency extends GolangDependency {

    /**
     * The update time of a dependency. It will be used in resolving package conflict.
     * Generally speaking, package with newest update time will win.
     *
     * @return the update time determined by the package. It may be the last modified time
     * of a file on filesystem or in scm.
     */
    long getUpdateTime();

    /**
     * Get transitive dependencies of this package.
     *
     * @return the transitive dependencies
     */
    GolangDependencySet getDependencies();

    Map<String, Object> toLockedNotation();

    void installTo(File targetDirectory);

    String formatVersion();

}

Remove redundant default method in ResolvedDependency