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

import com.github.blindpirate.gogradle.core.GolangPackageModule;

/**
 * Manages global dependency register.
 * When a dependency is resolved, its repo information will be registered here.
 * Later, resolving dependency of same repo can be faster.
 */
public interface DependencyRegistry {
    /**
     * Registers a dependency
     *
     * @param dependency
     * @return true if the dependency is newer than existing dependency with same name.
     */
    boolean register(GolangPackageModule dependency);
}

@@ -55,74 +55,8 @@
 y;%0A%0A
-import com.github.blindpirate.gogradle.core.GolangPackageModule;%0A%0A
 /**%0A
@@ -466,38 +466,83 @@
 ter(
-GolangPackageModule dependency
+ResolvedDependency dependency);%0A%0A    ResolvedDependency retrive(String name
 );%0A%7D

add method to DependencyRegistry