// Path: src/main/java/org/moe/gradle/AbstractMoeExtension.java
// public abstract class AbstractMoeExtension {
// 
//     @NotNull
//     public final AbstractMoePlugin plugin;
// 
//     @NotNull
//     public final NatjgenOptions natjgen;
// 
//     @NotNull
//     public final JavaProcessOptions javaProcess;
// 
//     public AbstractMoeExtension(@NotNull AbstractMoePlugin plugin, @NotNull Instantiator instantiator) {
//         this.plugin = Require.nonNull(plugin);
//         Require.nonNull(instantiator);
//         this.javaProcess = instantiator.newInstance(JavaProcessOptions.class);
//         this.natjgen = instantiator.newInstance(NatjgenOptions.class);
//     }
// 
//     @NotNull
//     @IgnoreUnused
//     // Add this variant of the method so we can access it from Gradle as 'sdk'
//     public MoeSDK getSdk() {
//         return plugin.getSDK();
//     }
// 
//     @NotNull
//     @IgnoreUnused
//     public MoeSDK getSDK() {
//         return plugin.getSDK();
//     }
// 
//     @IgnoreUnused
//     public void javaProcess(Action<JavaProcessOptions> action) {
//         Require.nonNull(action).execute(javaProcess);
//     }
// 
//     @IgnoreUnused
//     public void natjgen(Action<NatjgenOptions> action) {
//         Require.nonNull(action).execute(natjgen);
//     }
// 
//     @Nullable
//     public abstract File getPlatformJar();
// 
//     @NotNull
//     public static AbstractMoeExtension getInstance(@NotNull Project project) {
//         return Require.nonNull((AbstractMoeExtension) project.getExtensions().findByName(AbstractMoePlugin.MOE));
//     }
// }
// 
// Path: src/main/java/org/moe/gradle/AbstractMoePlugin.java
// public static final String MOE = "moe";


import java.util.List;
import static org.moe.gradle.AbstractMoePlugin.MOE;
import org.gradle.api.GradleException;
import org.gradle.api.Task;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.Optional;
import org.moe.gradle.AbstractMoeExtension;
import org.moe.gradle.anns.IgnoreUnused;
import org.moe.gradle.anns.Nullable;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;

    @Input
    @Optional
    @Nullable
    public String getNatjgenOutput() {
        return nullableGetOrConvention(config, CONVENTION_NATJGEN_LOG_OUTPUT);
    }

    @IgnoreUnused
    public void setNatjgenOutput(@Nullable String output) {
        this.natjgenOutput = output;
    }

    @Override
    protected void run() {

        String bindingConfiguration = getConfig();

        String propertyConf = System.getProperty("moe.binding.conf");

        final String configuration = propertyConf == null ? bindingConfiguration : propertyConf;

        boolean isTest = Boolean.valueOf(System.getProperty("moe.natjgen.testrun"));

        if (configuration == null || configuration.isEmpty()) {
            throw new GradleException("Missing binding configuration settings");
        }

        String natjLogOutput = getNatjgenOutput();

// Path: src/main/java/org/moe/gradle/AbstractMoeExtension.java
// public abstract class AbstractMoeExtension {
// 
//     @NotNull
//     public final AbstractMoePlugin plugin;
// 
//     @NotNull
//     public final NatjgenOptions natjgen;
// 
//     @NotNull
//     public final JavaProcessOptions javaProcess;
// 
//     public AbstractMoeExtension(@NotNull AbstractMoePlugin plugin, @NotNull Instantiator instantiator) {
//         this.plugin = Require.nonNull(plugin);
//         Require.nonNull(instantiator);
//         this.javaProcess = instantiator.newInstance(JavaProcessOptions.class);
//         this.natjgen = instantiator.newInstance(NatjgenOptions.class);
//     }
// 
//     @NotNull
//     @IgnoreUnused
//     // Add this variant of the method so we can access it from Gradle as 'sdk'
//     public MoeSDK getSdk() {
//         return plugin.getSDK();
//     }
// 
//     @NotNull
//     @IgnoreUnused
//     public MoeSDK getSDK() {
//         return plugin.getSDK();
//     }
// 
//     @IgnoreUnused
//     public void javaProcess(Action<JavaProcessOptions> action) {
//         Require.nonNull(action).execute(javaProcess);
//     }
// 
//     @IgnoreUnused
//     public void natjgen(Action<NatjgenOptions> action) {
//         Require.nonNull(action).execute(natjgen);
//     }
// 
//     @Nullable
//     public abstract File getPlatformJar();
// 
//     @NotNull
//     public static AbstractMoeExtension getInstance(@NotNull Project project) {
//         return Require.nonNull((AbstractMoeExtension) project.getExtensions().findByName(AbstractMoePlugin.MOE));
//     }
// }
// 
// Path: src/main/java/org/moe/gradle/AbstractMoePlugin.java
// public static final String MOE = "moe";


// Path: src/main/java/org/moe/gradle/tasks/NatJGen.java
import java.util.List;
import static org.moe.gradle.AbstractMoePlugin.MOE;
import org.gradle.api.GradleException;
import org.gradle.api.Task;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.Optional;
import org.moe.gradle.AbstractMoeExtension;
import org.moe.gradle.anns.IgnoreUnused;
import org.moe.gradle.anns.Nullable;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;


    @Input
    @Optional
    @Nullable
    public String getNatjgenOutput() {
        return nullableGetOrConvention(config, CONVENTION_NATJGEN_LOG_OUTPUT);
    }

    @IgnoreUnused
    public void setNatjgenOutput(@Nullable String output) {
        this.natjgenOutput = output;
    }

    @Override
    protected void run() {

        String bindingConfiguration = getConfig();

        String propertyConf = System.getProperty("moe.binding.conf");

        final String configuration = propertyConf == null ? bindingConfiguration : propertyConf;

        boolean isTest = Boolean.valueOf(System.getProperty("moe.natjgen.testrun"));

        if (configuration == null || configuration.isEmpty()) {
            throw new GradleException("Missing binding configuration settings");
        }

        String natjLogOutput = getNatjgenOutput();

        final AbstractMoeExtension ext = getExtension();