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

import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.blindpirate.gogradle.GogradleGlobal;

import java.util.List;
import java.util.Map;

public class GogradleLockModel {
    @JsonProperty("apiVersion")
    private String apiVersion;
    @JsonProperty("dependencies")
    private List<Map<String, Object>> dependencies;

    public static GogradleLockModel of(List<Map<String, Object>> notations) {
        GogradleLockModel ret = new GogradleLockModel();
        ret.apiVersion = GogradleGlobal.GOGRADLE_VERSION;
        ret.dependencies = notations;
        return ret;
    }

    public String getApiVersion() {
        return apiVersion;
    }

    public List<Map<String, Object>> getDependencies() {
        return dependencies;
    }
}

@@ -169,52 +169,245 @@
 al;%0A
-%0Aimport java.util.List;%0Aimport java.util.Map
+import com.google.common.collect.ImmutableMap;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport static com.github.blindpirate.gogradle.build.Configuration.BUILD;%0Aimport static com.github.blindpirate.gogradle.build.Configuration.TEST
 ;%0A%0Ap
@@ -546,16 +546,28 @@
  private
+ Map%3CString,
  List%3CMa
@@ -584,16 +584,17 @@
 Object%3E%3E
+%3E
  depende
@@ -666,17 +666,102 @@
 bject%3E%3E 
-n
+buildNotations,%0A                                       List%3CMap%3CString, Object%3E%3E testN
 otations
@@ -910,17 +910,102 @@
 s = 
-n
+ImmutableMap.of(BUILD.getName(), buildNotations,%0A                TEST.getName(), testN
 otations
 ;%0A  
@@ -1000,16 +1000,17 @@
 otations
+)
 ;%0A      
@@ -1153,16 +1153,40 @@
 dencies(
+String configurationName
 ) %7B%0A    
@@ -1208,16 +1208,39 @@
 ndencies
+.get(configurationName)
 ;%0A    %7D%0A

Support test dependencies