package com.github.blindpirate.gogradle.task;

import com.github.blindpirate.gogradle.GolangPluginSetting;
import com.github.blindpirate.gogradle.core.cache.GlobalCacheManager;
import com.github.blindpirate.gogradle.crossplatform.GoBinaryManager;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.TaskAction;

import javax.inject.Inject;

/**
 * This task perform preparation such as Go executable and GOPATH.
 */
public class PrepareTask extends DefaultTask {

    @Inject
    private GoBinaryManager goBinaryManager;

    @Inject
    private GlobalCacheManager globalCacheManager;

    @Inject
    private GolangPluginSetting setting;

    @TaskAction
    public void prepare() {
    }

}

@@ -100,16 +100,75 @@
 etting;%0A
+import com.github.blindpirate.gogradle.build.BuildManager;%0A
 import c
@@ -712,46 +712,138 @@
    @
-TaskAction%0A    public void prepare() %7B
+Inject%0A    private BuildManager buildManager;%0A%0A    @TaskAction%0A    public void prepare() %7B%0A        buildManager.prepareForBuild();
 %0A   

Prepare for build directory in PrepareTask