All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.micronaut.starter.feature.view.gradlePluginJTE Maven / Gradle / Ivy

There is a newer version: 4.7.0
Show newest version
package io.micronaut.starter.feature.view;

import java.io.IOException;
import com.fizzed.rocker.ForIterator;
import com.fizzed.rocker.RenderingException;
import com.fizzed.rocker.RockerContent;
import com.fizzed.rocker.RockerOutput;
import com.fizzed.rocker.runtime.DefaultRockerTemplate;
import com.fizzed.rocker.runtime.PlainTextUnloadedClassLoader;
// import @ [1:1]
import io.micronaut.starter.build.gradle.GradleDsl;

/*
 * Auto generated code to render template io/micronaut/starter/feature/view/gradlePluginJTE.rocker.raw
 * Do not edit this file. Changes will eventually be overwritten by Rocker parser!
 */
@SuppressWarnings("unused")
public class gradlePluginJTE extends com.fizzed.rocker.runtime.DefaultRockerModel {

    static public com.fizzed.rocker.ContentType getContentType() { return com.fizzed.rocker.ContentType.RAW; }
    static public String getTemplateName() { return "gradlePluginJTE.rocker.raw"; }
    static public String getTemplatePackageName() { return "io.micronaut.starter.feature.view"; }
    static public String getHeaderHash() { return "-563775569"; }
    static public String[] getArgumentNames() { return new String[] { "patchKaptOutputs", "dsl", "path" }; }

    // argument @ [2:2]
    private boolean patchKaptOutputs;
    // argument @ [2:2]
    private GradleDsl dsl;
    // argument @ [2:2]
    private String path;

    public gradlePluginJTE patchKaptOutputs(boolean patchKaptOutputs) {
        this.patchKaptOutputs = patchKaptOutputs;
        return this;
    }

    public boolean patchKaptOutputs() {
        return this.patchKaptOutputs;
    }

    public gradlePluginJTE dsl(GradleDsl dsl) {
        this.dsl = dsl;
        return this;
    }

    public GradleDsl dsl() {
        return this.dsl;
    }

    public gradlePluginJTE path(String path) {
        this.path = path;
        return this;
    }

    public String path() {
        return this.path;
    }

    static public gradlePluginJTE template(boolean patchKaptOutputs, GradleDsl dsl, String path) {
        return new gradlePluginJTE()
            .patchKaptOutputs(patchKaptOutputs)
            .dsl(dsl)
            .path(path);
    }

    @Override
    protected DefaultRockerTemplate buildTemplate() throws RenderingException {
        // optimized for performance (via rocker.optimize flag; no auto reloading)
        return new Template(this);
    }

    static public class Template extends com.fizzed.rocker.runtime.DefaultRockerTemplate {

        // jte {\n
        static private final String PLAIN_TEXT_0_0 = "jte {\n";
        //     sourceDirectory.set(file(\"src/main/jte\").toPath())\n
        static private final String PLAIN_TEXT_1_0 = "    sourceDirectory.set(file(\"src/main/jte\").toPath())\n";
        //     sourceDirectory = file(\"
        static private final String PLAIN_TEXT_2_0 = "    sourceDirectory = file(\"";
        // \").toPath()\n
        static private final String PLAIN_TEXT_3_0 = "\").toPath()\n";
        //     generate()\n}\n\n// Gradle requires that generateJte is run before some tasks\ntasks.configureEach {\n    if (
        static private final String PLAIN_TEXT_4_0 = "    generate()\n}\n\n// Gradle requires that generateJte is run before some tasks\ntasks.configureEach {\n    if (";
        // name == \"kaptGenerateStubsKotlin\" || 
        static private final String PLAIN_TEXT_5_0 = "name == \"kaptGenerateStubsKotlin\" || ";
        // name == \"inspectRuntimeClasspath\") {\n        mustRunAfter(\"generateJte\")\n    }\n}\n
        static private final String PLAIN_TEXT_6_0 = "name == \"inspectRuntimeClasspath\") {\n        mustRunAfter(\"generateJte\")\n    }\n}\n";

        // argument @ [2:2]
        protected final boolean patchKaptOutputs;
        // argument @ [2:2]
        protected final GradleDsl dsl;
        // argument @ [2:2]
        protected final String path;

        public Template(gradlePluginJTE model) {
            super(model);
            __internal.setCharset("UTF-8");
            __internal.setContentType(getContentType());
            __internal.setTemplateName(getTemplateName());
            __internal.setTemplatePackageName(getTemplatePackageName());
            this.patchKaptOutputs = model.patchKaptOutputs();
            this.dsl = model.dsl();
            this.path = model.path();
        }

        @Override
        protected void __doRender() throws IOException, RenderingException {
            // PlainText @ [2:60]
            __internal.aboutToExecutePosInTemplate(2, 60);
            __internal.writeValue(PLAIN_TEXT_0_0);
            // IfBlockBegin @ [5:1]
            __internal.aboutToExecutePosInTemplate(5, 1);
            if (dsl == GradleDsl.KOTLIN) {
                // PlainText @ [5:31]
                __internal.aboutToExecutePosInTemplate(5, 31);
                __internal.writeValue(PLAIN_TEXT_1_0);
                // IfBlockEnd @ [5:1]
                __internal.aboutToExecutePosInTemplate(5, 1);
            } // if end @ [5:1]
            // IfBlockBegin @ [8:1]
            __internal.aboutToExecutePosInTemplate(8, 1);
            if (dsl == GradleDsl.GROOVY) {
                // PlainText @ [8:31]
                __internal.aboutToExecutePosInTemplate(8, 31);
                __internal.writeValue(PLAIN_TEXT_2_0);
                // ValueExpression @ [9:29]
                __internal.aboutToExecutePosInTemplate(9, 29);
                __internal.renderValue(path, false);
                // PlainText @ [9:34]
                __internal.aboutToExecutePosInTemplate(9, 34);
                __internal.writeValue(PLAIN_TEXT_3_0);
                // IfBlockEnd @ [8:1]
                __internal.aboutToExecutePosInTemplate(8, 1);
            } // if end @ [8:1]
            // PlainText @ [10:2]
            __internal.aboutToExecutePosInTemplate(10, 2);
            __internal.writeValue(PLAIN_TEXT_4_0);
            // IfBlockBegin @ [16:9]
            __internal.aboutToExecutePosInTemplate(16, 9);
            if (patchKaptOutputs) {
                // PlainText @ [16:33]
                __internal.aboutToExecutePosInTemplate(16, 33);
                __internal.writeValue(PLAIN_TEXT_5_0);
                // IfBlockEnd @ [16:9]
                __internal.aboutToExecutePosInTemplate(16, 9);
            } // if end @ [16:9]
            // PlainText @ [16:71]
            __internal.aboutToExecutePosInTemplate(16, 71);
            __internal.writeValue(PLAIN_TEXT_6_0);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy