Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up gradle build file #238

Open
atomfrede opened this issue Apr 8, 2021 · 1 comment
Open

Clean up gradle build file #238

atomfrede opened this issue Apr 8, 2021 · 1 comment
Assignees

Comments

@atomfrede
Copy link
Member

atomfrede commented Apr 8, 2021

Overview of the feature request

With the latest micronaut gradle plugin manual configuration for incremental compilation is not required anymore. We should remove it.

This (we already have) and replaces

micronaut {
    runtime "netty"
    testRuntime "junit5"
    processing {
        incremental true
        annotations "<%= packageName %>.*"
    }
}
tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
    options.compilerArgs.addAll([
        '-parameters',
        // enables incremental compilation
        '-Amicronaut.processing.incremental=true',
        '-Amicronaut.processing.annotations=<%= packageName %>.*',
        "-Amicronaut.processing.group=$project.group",
        "-Amicronaut.processing.module=$project.name",
    ])
}

Furthermore the custom config for continuous compilation we have in the dev profile can be removed I think (need to make sure the profiles are set correctly so maybe we need to keep it or parts of it). See what the application plugin sets: https://github.com/micronaut-projects/micronaut-gradle-plugin/blob/ce80195d88e78cbf2d69d3fe49fb491545aa3a94/src/main/java/io/micronaut/gradle/MicronautApplicationPlugin.java#L116

**tasks.withType(JavaExec) {
    classpath += configurations.developmentOnly
    jvmArgs('-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
    if (System.getProperty("micronaut.environments")) {
        jvmArgs += '-Dmicronaut.environments=' + profiles + ',' + System.getProperty("micronaut.environments")
    } else {
        jvmArgs += '-Dmicronaut.environments=' + profiles
    }
    if (gradle.startParameter.continuous) {
        systemProperties(
            'micronaut.io.watch.restart':'true',
            'micronaut.io.watch.enabled':'true',
            "micronaut.io.watch.paths":"src/main"
        )
    }
}**
Motivation for or Use Case

Try not to move far away from what https://micronaut.io/launch creates

Related issues or PR

None.

@atomfrede atomfrede self-assigned this Apr 9, 2021
@mraible
Copy link
Contributor

mraible commented Apr 2, 2024

@atomfrede Are you still interested in fixing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants