// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/FileUtils.java
// @Nullable
// public static Path toPath(@Nullable String plain) {
//     return plain != null ? Paths.get(plain) : null;
// }


import org.gradle.api.Project;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import java.nio.file.Path;
import static org.echocat.gradle.plugins.golang.utils.FileUtils.toPath;
package org.echocat.gradle.plugins.golang.model;




public class TestingSettings {

    @SuppressWarnings({"FieldCanBeLocal", "unused"})
    @Nonnull
    private final Project _project;

    private Boolean _skip;

    private String[] _packages;
    private String[] _includes;
    private String[] _excludes;
    private String[] _testArguments;
    private String[] _arguments;

    /**
     * Write a coverage profile to the file after all tests have passed.
     * Sets -cover.
     */
    private Path _coverProfile;
    /**
     * Write a coverage profile as HTML to the file after all tests have passed.
     * Sets -cover.
     */
    private Path _coverProfileHtml;

    /**
     * If set to an non <code>null</code> value the test output will
     * will be stored in the specified file location.
     *
     * Default is: ${buildDir}/testing/test.log
     */
    private Path _log;

    /**
     * If set to an non <code>null</code> value the test output will
     * transformed into a junit report and will be written to this file location.
     *
     * Default is: ${buildDir}/testing/junit_report.xml
     */
    private Path _junitReport;

    @Inject
    public TestingSettings(boolean initialize, @Nonnull Project project) {
        _project = project;
        if (initialize) {
            _includes = new String[]{
                "**/*_test.go"
            };
            _excludes = new String[]{
                ".git/**", ".svn/**", "build.gradle", "build/**", ".gradle/**", "gradle/**", "vendor/**"
            };
// Path: src/main/java/org/echocat/gradle/plugins/golang/utils/FileUtils.java
// @Nullable
// public static Path toPath(@Nullable String plain) {
//     return plain != null ? Paths.get(plain) : null;
// }


// Path: src/main/java/org/echocat/gradle/plugins/golang/model/TestingSettings.java
import org.gradle.api.Project;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import java.nio.file.Path;
import static org.echocat.gradle.plugins.golang.utils.FileUtils.toPath;

package org.echocat.gradle.plugins.golang.model;




public class TestingSettings {

    @SuppressWarnings({"FieldCanBeLocal", "unused"})
    @Nonnull
    private final Project _project;

    private Boolean _skip;

    private String[] _packages;
    private String[] _includes;
    private String[] _excludes;
    private String[] _testArguments;
    private String[] _arguments;

    /**
     * Write a coverage profile to the file after all tests have passed.
     * Sets -cover.
     */
    private Path _coverProfile;
    /**
     * Write a coverage profile as HTML to the file after all tests have passed.
     * Sets -cover.
     */
    private Path _coverProfileHtml;

    /**
     * If set to an non <code>null</code> value the test output will
     * will be stored in the specified file location.
     *
     * Default is: ${buildDir}/testing/test.log
     */
    private Path _log;

    /**
     * If set to an non <code>null</code> value the test output will
     * transformed into a junit report and will be written to this file location.
     *
     * Default is: ${buildDir}/testing/junit_report.xml
     */
    private Path _junitReport;

    @Inject
    public TestingSettings(boolean initialize, @Nonnull Project project) {
        _project = project;
        if (initialize) {
            _includes = new String[]{
                "**/*_test.go"
            };
            _excludes = new String[]{
                ".git/**", ".svn/**", "build.gradle", "build/**", ".gradle/**", "gradle/**", "vendor/**"
            };
            _log = project.getBuildDir().toPath().resolve("testing").resolve("test.log");