package com.github.blindpirate.gogradle.vcs.git;

import com.github.blindpirate.gogradle.core.dependency.AbstractNotationDependency;
import com.github.blindpirate.gogradle.core.dependency.resolve.DependencyResolver;

public class GitNotationDependency extends AbstractNotationDependency {

    public static final String NEWEST_COMMIT = "NEWEST_COMMIT";

    public static final String URL_KEY = "url";
    public static final String COMMIT_KEY = "commit";
    // not implemented yet
    public static final String BRANCH_KEY = "branch";
    public static final String TAG_KEY = "tag";
    private String commit;
    private String tag;
    // url specified by user
    private String url;

    public String getCommit() {
        return commit;
    }

    public String getTag() {
        return tag;
    }

    public void setCommit(String commit) {
        this.commit = commit;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setVersion(String version) {
        this.commit = version;
    }

    @Override
    public String getVersion() {
        return commit;
    }

    @Override
    public Class<? extends DependencyResolver> getResolverClass() {
        return GitDependencyManager.class;
    }

}

@@ -1366,10 +1366,300 @@
 %0A    %7D%0A%0A
+%0A    @Override%0A    public String toString() %7B%0A        return %22GitNotationDependency%7B%22%0A                + %22name='%22 + getName() + '%5C''%0A                + %22, commit='%22 + commit + '%5C''%0A                + %22, tag='%22 + tag + '%5C''%0A                + %22, url='%22 + url + '%5C''%0A                + '%7D';%0A    %7D%0A
 %7D%0A

Add toString()