Coder Social home page Coder Social logo

grails-gradle-plugin's Introduction

Grails Gradle Plugins

Latest API Docs: https://grails.github.io/grails-gradle-plugin/latest/api/

Below are the plugins that are provided by the grails-gradle-plugin dependency.

buildscript {
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsVersion"
    }
}

grails-core

Todo: Add the docs

grails-doc

Todo: Add the docs

grails-gsp

  • Configure GSP Compiling Task

grails-plugin-publish

Todo: Add the docs

grails-plugin

  • Configure Ast Sources
  • Configure Project Name And Version AST Metadata
  • Configure Plugin Resources
  • Configure Plugin Jar Task
  • Configure Sources Jar Task

grails-profile

Todo: Add the docs

grails-web

  • Adds web specific extensions

Typical Project Type Gradle Plugin Includes

Below are typical Gradle plugin applies that certain types of projects should expect. These should be automatically added of you when using grails create-app and grails create-plugin commands. However, if you wish to enhance or change the scope of your plugin or project you may have to change (add or remove) a grails gradle plugin.

Create App

Grails Web Project

----- A project created with a typical `grails create-app --profile=web`
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"

Grails Web API Project

---- A project created with a typical `grails create-app --profile=web-api`
apply plugin: "org.grails.grails-web"

Grails Web Micro Project

A project created with a typical grails create-app --profile=web-micro

There is no plugins used here as this project type creates a stand alone runnable groovy application and no build.gradle file.

Create Plugin

Grails Plugin Web Project

A project created with a typical `grails create-plugin --profile=web-plugin`
apply plugin: "org.grails.grails-plugin"
apply plugin: "org.grails.grails-gsp"

Grails Plugin Web API Project

A project created with a typical `grails create-plugin --profile=web-api`. _Note: No org.grails.grails-plugin include_
apply plugin: "org.grails.grails-web"

Grails Plugin Web Plugin Project

A project created with a typical `grails create-plugin --profile=plugin`.
apply plugin: "org.grails.grails-plugin"

Grails Plugin Web Micro Project

A project created with a typical grails create-plugin --profile=web-micro

There is no plugins used here as this project type creates a stand alone runnable groovy application and no `build.gradle`` file.

grails-gradle-plugin's People

Contributors

alvarosanchez avatar bobbywarner avatar codeconsole avatar ctoestreich avatar davydotcom avatar dependabot-preview[bot] avatar dependabot[bot] avatar erichelgeson avatar graemerocher avatar guillermocalvo avatar ilopmar avatar inicolas avatar jameskleeh avatar jasontypescodes avatar jeremydyoung avatar lhotari avatar matrei avatar nobeans avatar puneetbehl avatar rahulsom avatar rainboyan avatar renovate-bot avatar renovate[bot] avatar rpalcolea avatar sbglasius avatar sdelamo avatar yamkazu avatar zacharyklein avatar zyro23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grails-gradle-plugin's Issues

BUG: GrailsGradlePlugin CRASHES if grails-app folder does not exist.

grails-app folder should be optional.

 ./gradlew clean bootRun --stacktrace
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin 'org.grails.grails-web'.
        at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:173)
        at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:146)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.lambda$applyLegacyPlugin$2(DefaultPluginRequestApplicator.java:160)
        at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugin(DefaultPluginRequestApplicator.java:201)
        ... 164 more
Caused by: org.gradle.internal.operations.BuildOperationInvocationException: /Users/sheiberg/Documents/workspace/sitemesh3/sitemesh-examples-gsp/grails-app
        at org.gradle.internal.operations.DefaultBuildOperationRunner.throwAsBuildOperationInvocationException(DefaultBuildOperationRunner.java:192)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.access$100(DefaultBuildOperationRunner.java:24)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
        at org.gradle.api.internal.plugins.DefaultPluginManager.lambda$doApply$0(DefaultPluginManager.java:167)
        at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:44)
        at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:166)
        ... 167 more
Caused by: java.io.FileNotFoundException: /Users/sheiberg/Documents/workspace/sitemesh3/sitemesh-examples-gsp/grails-app
        at org.grails.gradle.plugin.core.GrailsGradlePlugin.resolveGrailsSourceDirs(GrailsGradlePlugin.groovy:358)

workaround is to have an empty grails-app folder, but that is kind of silly.

Inocompaibility with Gradle 8

While trying to upgrade https://github.com/grails/grails-gsp to Gradle 8, the following error occurs:

Caused by: groovy.lang.MissingPropertyException: Could not set unknown property 'classifier' for task ':grails-plugin-gsp:javadocJar' of type org.gradle.api.tasks.bundling.Jar.
	at org.gradle.internal.metaobject.AbstractDynamicObject.setMissingProperty(AbstractDynamicObject.java:118)
	at org.gradle.internal.metaobject.ConfigureDelegate.setProperty(ConfigureDelegate.java:102)
	at org.gradle.internal.classpath.declarations.GroovyDynamicDispatchInterceptors.intercept_setGroovyObjectProperty(GroovyDynamicDispatchInterceptors.java:57)
	at org.grails.gradle.plugin.core.GrailsPluginGradlePlugin$_configureAstSources_closure7.doCall$original(GrailsPluginGradlePlugin.groovy:177)
	at org.grails.gradle.plugin.core.GrailsPluginGradlePlugin$_configureAstSources_closure7.doCall(GrailsPluginGradlePlugin.groovy)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.gradle.util.internal.ClosureBackedAction.execute(ClosureBackedAction.java:73)
	at org.gradle.util.internal.ConfigureUtil.configureTarget(ConfigureUtil.java:155)
	at org.gradle.util.internal.ConfigureUtil.configureSelf(ConfigureUtil.java:131)
	at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:702)
	at org.gradle.api.DefaultTask.configure(DefaultTask.java:319)
	at org.gradle.api.Task$configure.call(Unknown Source)
	at org.grails.gradle.plugin.core.GrailsPluginGradlePlugin.configureAstSources(GrailsPluginGradlePlugin.groovy:176)
	at org.grails.gradle.plugin.core.GrailsPluginGradlePlugin.apply(GrailsPluginGradlePlugin.groovy:64)
	at org.grails.gradle.plugin.core.GrailsPluginGradlePlugin.apply(GrailsPluginGradlePlugin.groovy)
	at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:43)
	at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:51)
	at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:190)
	at org.gradle.api.internal.plugins.DefaultPluginManager.access$100(DefaultPluginManager.java:54)
	at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:285)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
	at org.gradle.api.internal.plugins.DefaultPluginManager.lambda$doApply$0(DefaultPluginManager.java:170)
	at org.gradle.internal.code.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
	at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:169)
	... 246 more


Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

Support for configuring SpringBoot/SpringFramework version

We have received multiple CVE tickets against Spring-Core used in grails services where the grails-gradle-plugin is a must have:
CVE-2023-20860
CVE-2023-20863
However we are not able to override the SpringBoot/SpringFramework version because of the dependency import from the plugin dominates the versions.

Please provide configurations to manually set the dependency versions to resolve CVEs as necessary, or if it is configurable instructions are deeply appreciated.

BUG 6.1.1 - compiled gsps missing from views.properties

Previously worked in Grails 5.x and Grails 6.0.0

Broken beginning with 6.1.0

GSPs in /src/main/webapp compiled, but not included in views.properties

Demo https://github.com/codeconsole/grails6bugs

git clone https://github.com/codeconsole/grails6bugs
cd grails6bugs
./gradlew clean bootJar
# notice src/main/webapp/test/hello.gsp was correctly compiled
unzip -l build/libs/grails6bugs-0.1.jar|grep hello_gsp\.class
# notice hello.gsp is missing from views.properties
unzip -p build/libs/grails6bugs-0.1.jar BOOT-INF/classes/gsp/views.properties|grep hello_gsp

Notice /test/hello.gsp gsp is missing in /build/gsp-classes/main/gsp/views.properties

#Precompiled views for grails6bugs
#Mon Nov 20 10:23:18 CST 2023
/WEB-INF/grails-app/views/error.gsp=gsp_grails6bugserror_gsp
/WEB-INF/grails-app/views/index.gsp=gsp_grails6bugsindex_gsp
/WEB-INF/grails-app/views/layouts/main.gsp=gsp_grails6bugs_layoutsmain_gsp
/WEB-INF/grails-app/views/notFound.gsp=gsp_grails6bugsnotFound_gsp

Now verify it worked in Grails 6.0.0

git checkout fix
./gradlew clean bootJar
unzip -p build/libs/grails6bugs-0.1.jar BOOT-INF/classes/gsp/views.properties|grep hello_gsp

Notice /test/hello.gsp is now listed

#Precompiled views for grails6bugs
#Mon Nov 20 10:24:09 CST 2023
/WEB-INF/grails-app/views/error.gsp=gsp_grails6bugserror_gsp
/WEB-INF/grails-app/views/index.gsp=gsp_grails6bugsindex_gsp
/WEB-INF/grails-app/views/layouts/main.gsp=gsp_grails6bugs_layoutsmain_gsp
/test/hello.gsp=gsp_grails6bugs_testhello_gsp
/WEB-INF/grails-app/views/notFound.gsp=gsp_grails6bugsnotFound_gsp

http://localhost:8080/test/hello.gsp

Error releasing new version

After using Gradle java-gradle-plugin we see the following error:

Multiple publications with coordinates 'org.grails:grails-gradle-plugin:5.1.3' are published to repository 'sonatype'. The publications will overwrite each other!
[98](https://github.com/grails/grails-gradle-plugin/runs/5335625667?check_suite_focus=true#step:12:98)

See build log here for more details.

GrailsGradlePlugin.enableFileWatch should only include micronaut-inject-groovy in developmentOnly

Thanks for reporting an issue for Grails framework, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.

NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/grails) or Slack (http://slack-signup.grails.org). DO NOT use the issue tracker to ask questions.

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

The GrailsGradlePlugin.enableFileWatch() method currently brings in the micronaut-inject-groovy into the runtime configuration. It should only be included for developmentOnly. This occurs when you are building the Grails application into an executable JAR/WAR.

Backport the change from the 5.0 branch to 4.0.x so that the method is changed from:

protected void enableFileWatch(Environment environment, Project project) {
       if (environment.isReloadEnabled()) {
            project.configurations {
                agent
            }
            final String micronautVersion = project.properties['micronautVersion']
            project.dependencies.add("runtimeOnly", "io.micronaut:micronaut-inject-groovy:${micronautVersion?:defaultMicronautVersion}")
            project.afterEvaluate(new AgentTasksEnhancer())
        }
    }

to:

    protected void enableFileWatch(Environment environment, Project project) {
        if (environment.isReloadEnabled()) {
            project.configurations {
                agent
            }
            final String micronautVersion = project.properties['micronautVersion']
            if (project.configurations.findByName("developmentOnly")) {
                project.dependencies.add("developmentOnly", "io.micronaut:micronaut-inject-groovy:${micronautVersion?:defaultMicronautVersion}")
            }
            project.afterEvaluate(new AgentTasksEnhancer())
        }
    }

Expected Behaviour

micronaut-inject-groovy should not be inside of a production WAR/JAR file.

Actual Behaviour

when you assemble a WAR file, the micronaut-inject-groovy jar is included in the WAR which slows everything down.

Environment Information

  • Operating System: OSX Catalina
  • Grails Version: 4.0.10
  • JDK Version: AdoptOpenJDK 11
  • Container Version (If Applicable): N/A

Example Application

Gradle plugin 5.1.x compile profile errors

I created a profile project by Grails v4.0.13, but when update to Grails 5.1.2, it build fail.

* What went wrong:
Execution failed for task ':compileProfile'.
> Receiver class org.grails.cli.profile.commands.script.GroovyScriptCommandTransform does not define or inherit an implementation of the resolved method 'abstract java.lang.Object getProperty(java.lang.String)' of interface groovy.lang.GroovyObject.

This project only have one script command:

description( "Hello world" ) {
    usage "grails hello [NAME]"
    argument name:'Name', description:"The name of the man", required: false
}

console.updateStatus "Hello ${commandLine.remainingArgs[0] ?: 'World'}"

Grails Version

  • Grails 4.0.13
  • Grails 5.1.2
  • Java openjdk version "11.0.14" 2022-01-18 LTS
  • MacOS 16.11 M1

Demo project here

The plugin is not compatible with Gradle 7.x in strict mode

With Gradle 7.x running with strict warning mode

org.gradle.warning.mode= fail

Grails plugin can not be applied:

The AbstractArchiveTask.appendix property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the archiveAppendix property instead. See https://docs.gradle.org/7.6/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:appendix for more details.
	at org.gradle.api.tasks.bundling.AbstractArchiveTask.setAppendix(AbstractArchiveTask.java:304)
	at org.gradle.api.tasks.bundling.Jar_Decorated.setAppendix(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.gradle.api.tasks.bundling.Jar_Decorated.setProperty(Unknown Source)
	at org.grails.gradle.plugin.core.GrailsGradlePlugin$_createPathingJarTask_closure20.doCall(GrailsGradlePlugin.groovy:587)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)

BUG: excludeDependencies - Global Configuration Exclude Results in Very Messy Plugin Poms

The following code

    protected void excludeDependencies(Project project) {
        project.configurations.all ({ Configuration configuration ->
            configuration.exclude group:"org.slf4j", module: "slf4j-simple"
        })
    }

results in really nasty plugin poms.

if you create a Grails plugin, that exclude gets added to EVERY dependency (including dependences that don't even have slf4j!):

For example, look at this mess:

 <artifactId>grails-plugin-sitemesh3</artifactId>
  <version>2.0.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  <dependencies>
    <dependency>
      <groupId>org.sitemesh</groupId>
      <artifactId>spring-boot-starter-sitemesh</artifactId>
      <version>3.1.0-M2</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.sitemesh</groupId>
      <artifactId>sitemesh</artifactId>
      <version>3.1.0-M2</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-core</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-logging</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-encoder</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-web-common</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-web-gsp</artifactId>
      <version>6.0.2</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>5.3.27</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-autoconfigure</artifactId>
      <version>2.7.12</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
      <version>2.7.12</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
      <version>2.7.12</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-plugin-databinding</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-plugin-i18n</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-plugin-interceptors</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-plugin-rest</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-plugin-services</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-plugin-url-mappings</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-web-boot</artifactId>
      <version>6.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails.plugins</groupId>
      <artifactId>gsp</artifactId>
      <version>6.0.1</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails.plugins</groupId>
      <artifactId>hibernate5</artifactId>
      <version>8.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.grails.plugins</groupId>
      <artifactId>scaffolding</artifactId>
      <version>5.0.0</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>5.6.15.Final</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-logging</artifactId>
      <version>2.7.12</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
      <version>2.7.12</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
      <version>2.7.12</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.bertramlabs.plugins</groupId>
      <artifactId>asset-pipeline-grails</artifactId>
      <version>3.4.7</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.200</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.3.1</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jdbc</artifactId>
      <version>9.0.75</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.fusesource.jansi</groupId>
      <artifactId>jansi</artifactId>
      <version>1.18</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.glassfish.web</groupId>
      <artifactId>el-impl</artifactId>
      <version>2.2.1-b05</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.2</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-jasper</artifactId>
      <version>9.0.76</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.grails</groupId>
        <artifactId>grails-bom</artifactId>
        <version>6.0.0</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.grails</groupId>
        <artifactId>grails-bom</artifactId>
        <version>6.0.0</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>2.7.12</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>

@puneetbehl
Is there another way of going about this? There should not be a global exclusion like this.
An exclusion:

      <exclusions>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>

should only exist when library is actually dependent on slf4j-simple.

Releases 5.1.4 to 5.1.6 missing?

README.md describes how to add grails-gradle-plugin to the gradle dependencies.

buildscript {
	dependencies {
		classpath "org.grails:grails-gradle-plugin:$grailsVersion"
	}
}

So obviously there's supposed to exist a grails-gradle-plugin version for any official grails version.

So I wonder why isn't there a grails-gradle-plugin release 5.1.4, 5.1.5 and 5.1.6?

war contents for WEB-INF/classes/META-INF/services are wrong after updating to grails-gradle-plugin 5.1.3

Our app (https://github.com/rundeck/rundeck) uses grails 5.1.2, and we were upgrading to 5.1.4. We simultaneously attempted to update grails-gradle-plugin version from 5.1.1 to 5.1.3 and encountered an error:

The war file contents now are incorrect. Previously the /WEB-INF/classes/META-INF/services path contained the java service definitions. When building with grails-gradle-plugin 5.1.3, it seems the service definitions are instead placed in /META-INF/services/. Reverting to grails-gradle-plugin 5.1.2 seems to restore the correct behavior.

Using 5.1.3:

 jar tvf rundeckapp/build/libs/rundeck-4.0.0-SNAPSHOT.war  | grep META-INF/services
     0 Tue Mar 29 16:45:26 PDT 2022 META-INF/services/
   124 Tue Mar 29 16:44:00 PDT 2022 META-INF/services/org.grails.datastore.mapping.services.Service
   133 Tue Mar 29 15:58:16 PDT 2022 META-INF/services/com.dtolabs.rundeck.core.encrypter.PasswordUtilityEncrypter
   179 Tue Mar 29 15:58:16 PDT 2022 META-INF/services/org.rundeck.app.bootstrap.PreBootstrap
    47 Tue Mar 29 15:58:16 PDT 2022 META-INF/services/org.eclipse.jetty.util.security.CredentialProvider
   485 Tue Mar 29 15:58:16 PDT 2022 META-INF/services/org.rundeck.core.plugins.PluginProviderServices
     0 Tue Mar 29 16:44:00 PDT 2022 WEB-INF/classes/META-INF/services/

Reverting to 5.1.1 (or 5.1.2):

jar tvf rundeckapp/build/libs/rundeck-4.0.0-SNAPSHOT.war  | grep META-INF/services
     0 Tue Mar 29 16:40:50 PDT 2022 WEB-INF/classes/META-INF/services/
   124 Tue Mar 29 16:40:50 PDT 2022 WEB-INF/classes/META-INF/services/org.grails.datastore.mapping.services.Service
   133 Tue Mar 29 15:58:16 PDT 2022 WEB-INF/classes/META-INF/services/com.dtolabs.rundeck.core.encrypter.PasswordUtilityEncrypter
   179 Tue Mar 29 15:58:16 PDT 2022 WEB-INF/classes/META-INF/services/org.rundeck.app.bootstrap.PreBootstrap
    47 Tue Mar 29 15:58:16 PDT 2022 WEB-INF/classes/META-INF/services/org.eclipse.jetty.util.security.CredentialProvider
   485 Tue Mar 29 15:58:16 PDT 2022 WEB-INF/classes/META-INF/services/org.rundeck.core.plugins.PluginProviderServices
     

Versions out of sync

In JFrog, I see the current version of grails core is 5.1.6 but the current version of grails gradle plugin is 5.1.3. Are the two compatible or is there going to be a pending release of 5.1.6 for gradle plugin?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/gradle.yml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v3
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v3
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v3
  • grails/github-pages-deploy-action v2
.github/workflows/release-notes.yml
  • actions/checkout v4
  • release-drafter/release-drafter v6
  • ncipollo/release-action v1
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v3
  • actions/upload-artifact v4
  • gradle/gradle-build-action v3
  • actions/checkout v4
  • actions/setup-java v4
  • actions/checkout v4
  • gradle/gradle-build-action v3
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v3
  • grails/github-pages-deploy-action v2
gradle
gradle.properties
  • org.grails:grails-bootstrap 6.2.0
  • org.grails:grails-gradle-model 6.2.0
  • org.springframework.boot:spring-boot-gradle-plugin 2.7.18
settings.gradle
  • com.gradle.enterprise 3.17.2
  • com.gradle.common-custom-user-data-gradle-plugin 2.0.1
build.gradle
  • io.github.gradle-nexus:publish-plugin 2.0.0
  • io.github.gradle-nexus:publish-plugin 2.0.0
  • com.bmuschko:gradle-nexus-plugin 2.3.1
  • io.spring.gradle:dependency-management-plugin 1.1.4
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 7.6.4

  • Check this box to trigger a request for Renovate to run again on this repository

Gradle plugin using deprecated compile scope for AST sourceSet when including project.configurations

Grails/Gradle plugin 5.0.0.RC1

When trying to switch to using the new scopes for Gradle, I found that our custom AST classes in src/ast/groovy did not have the correct compile classpath once switching from compile to implementation as per Gradle suggestions.

The issue is that the sourceSets need to include the compileClasspath and not compile (or maybe in addition to for backwards compatibility).

For instance, this line:

Should use configurations.compileClasspath and not configurations.compile.

Support set springBootVersion in Gradle

When the new version of Spring Boot was released, to align with Grails and Spring Boot, grails-gradle-plugin must need to be released too.

Like this:

grailsVersion=5.1.5
grailsGradlePluginVersion=5.1.3
springBootVersion=2.6.6
groovyVersion=3.0.7
gorm.version=7.2.1

Suggestion for Grails 5+: supersede/deprecate some of the grails-gradle-plugin features with Gradle native implementation

I believe some of the grails-gradle-plugin features can now be used with Gradle natively. To be future proof and reduce maintenance I think it would be nice to rewrite some of the current grails-gradle-plugin implementation with the Gradle native variants.

Some examples:

  • remove pathingJar as this is now implemented in Gradle itself
  • I think the exploded classpath (for multi-module projects) could be replaced by Gradle's variant attributes
  • with variant attributes the Grails specific plugin-dependencies block could surely be dropped (use the standard Gradle dependency block)

Grails 5.0.2 projects are never up to date as findMainClass does not declare outputs

Steps to Reproduce

  1. Create a vanilla Grails 5.0.2 project
    • NOTE: MUST fix the gson-views dependency to 2.1.1
  2. Build the project
    ./gradlew build --info
    # snip
    BUILD SUCCESSFUL in 1m 56s
    11 actionable tasks: 10 executed, 1 up-to-date
  3. Rebuild the project without making any changes
     ./gradlew build --info
     # snip
     > Task :findMainClass
     Caching disabled for task ':findMainClass' because:
       Build cache is disabled
     Task ':findMainClass' is not up-to-date because:
       Task has not declared any outputs despite executing actions.
     :findMainClass (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.
     # snip
     BUILD SUCCESSFUL in 42s
     10 actionable tasks: 1 executed, 9 up-to-date

Expected Behaviour

Gradle up-to-date checks should identify that there have been no changes and the project should not need rebuilding

Actual Behaviour

Gradle is identifying that :findMainClass is never up to date, and always rebuilds it and it's dependents:

> Task :findMainClass
Caching disabled for task ':findMainClass' because:
  Build cache is disabled
Task ':findMainClass' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
:findMainClass (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.

Environment Information

  • Operating System: Mac OS 11
  • Grails Version: 5.0.2
  • JDK Version: 11.0.8
  • Container Version (If Applicable): N/A

Example Application

  • Use any vanilla Grails 5.0.2 application

plugins can overwrite message bundles in integration tests

OS: macOS Sonoma 14.0 (23A344)
JDK: Eclipse Temurin JDK 17.0.6+10 (aarch64)
Grails: 6.0.0 installed through SDKman

The order of resources on the classpath from plugins seems to have changed between version 5.3.0 and 6.0.0. Before the project resources came first, but now the plugins come first.
This causes integration tests to load message bundles from the plugin, instead of the application's grails-app/i18n/ folder.

Example project with reproduction here: https://github.com/matthijsbierman/grails6-i18n-bug

If you remove the dependency on the mail plugin, the test will pass. Downgrading to implementation("org.grails:grails-gradle-plugin:5.3.0") in buildSrc/build.gradle will also result in a passing test.

Upgrade grails plugin/versions to latest

We have received a CVE ticket against commons-fileupload used in grails services comming from grails-web 5.3.0:
CVE-2023-24998
However we are not able to override the grails version because of the dependency import from the plugin dominates the versions.

Please provide configurations to manually set the dependency versions to resolve CVEs as necessary, or if it is configurable instructions are deeply appreciated.

Do not attempt to serialize project.version in task of type Test

This line is incorrect

task.systemProperty Metadata.APPLICATION_VERSION, project.version

You do the correct thing when creating the properties in buildProperties task.

Line 407 should also have the same conditional.

NOTE: This bug breaks buildscripts that apply Grails plugins and a pluging that use Grolifant 2.x.

The only workaround in such situations is to add

gradle.taskGraph.whenReady {
    project.tasks.withType(Test).configureEach {
        it.systemProperties['info.app.version'] = project.version.toString()
    }
}

or

gradle.taskGraph.whenReady {
    project.tasks.withType(Test).configureEach {
        it.systemProperties['info.app.version'] = grolifant.versionProvider.get()
    }
}

Undo `api` -> `implementation` of Spring Boot and Dependency management plugin

I don't understand the reasoning behind 42ba793

(Besides, this was done in a patch version of Grails and broke my build, that shouldn't happen)

My thinking:

  • I want to use the Spring Boot version that the specific Grails version that I am using is compiled against. (Seems obvious)
  • Newer versions of Gradle, and also the Grails starter recently, have pushed the use of buildSrc.
  • Using buildSrc, it is idiomatic to have some references to e.g. org.springframework.boot.gradle.plugin.SpringBootPlugin, e.g. for dependency management
  • For references to the above class, org.springframework.boot:spring-boot-gradle-plugin needs to be on the compile classpath of buildSrc
  • Before Grails 6.1.2, where org.springframework.boot:spring-boot-gradle-plugin was still api, I could do the following:
dependencies {
  implementation("org.grails:grails-gradle-plugin:${project.property("grailsVersion")}")
  implementation("org.springframework.boot:spring-boot-gradle-plugin")
  implementation("io.spring.gradle:dependency-management-plugin")
}

I didn't have to specify versions for the other two plugins.

  • Since Grails 6.1.2 because of 42ba793 I now have to manually lookup what versions I have to use which is cumbersome.

Upgrade to Gradle 7

Gradle 7.0 was released for a while. Gradle support JDK 16 and use Groovy 3 in Groovy DSL build scripts.
And here‘s a Gradle upgrade guide about upgrading build and plugins to be compatible with Groovy 3.

Upgrade to 7.0 will also remove some warnings from Gradle:

The AbstractArchiveTask.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the destinationDirectory property instead. See https://docs.gradle.org/6.9.1/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:destinationDir for more details.
...
Adding a Configuration as a dependency is a confusing behavior which isn't recommended. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. If you're interested in inheriting the dependencies from the Configuration you are adding, you should use Configuration#extendsFrom instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.Configuration.html#org.gradle.api.artifacts.Configuration:extendsFrom(org.gradle.api.artifacts.Configuration[]) for more details.
...
The Report.enabled property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the required property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled for more details.
...
The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
...
The AbstractCompile.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the destinationDirectory property instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.2/userguide/upgrading_version_7.html#compile_task_wiring
...
The AbstractArchiveTask.appendix property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the archiveAppendix property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:appendix for more details.

Support for Java 17

With

buildscript {
	dependencies {
		classpath "org.grails:grails-gradle-plugin:5.1.4"
	}
}

sourceCompatibility = 17
targetCompatibility = 17

on JDK 17, we get an error on ./gradlew assemble.

* What went wrong:
Execution failed for task ':my-service:findMainClass'.
> Unsupported class file major version 61

With

buildscript {
	dependencies {
		classpath "org.grails:grails-gradle-plugin:5.1.4"
		// To support JDK 17. Try to remove each time you upgrade grails-gradle-plugin.
		classpath "org.codehaus.groovy:groovy:3.0.10"
	}
}

it works.

Please remove the need to manually add classpath "org.codehaus.groovy:groovy:3.0.10" line.


./gradlew --version

------------------------------------------------------------
Gradle 7.4.2
------------------------------------------------------------

Build time:   2022-03-31 15:25:29 UTC
Revision:     540473b8118064efcc264694cbcaa4b677f61041

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.3 (Azul Systems, Inc. 17.0.3+7-LTS)
OS:           Linux 5.11.0-37-generic amd64

`:integrationTest` also executes `:test`

Steps to reproduce:

  1. Create new project at start.grails.org
  2. Add test class to src/test/groovy
  3. Execute ./gradlew clean :integrationTest --tests com.example.DemoSpec

What I expect:

Only com.example.DemoSpec integration test is executed.

What happens:

:test is executed as well.

$ ./gradlew clean :integrationTest --tests com.example.DemoSpec

> Task :integrationTest

Gradle Test Executor 12 STANDARD_OUT
    16:30:43,354 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
    16:30:43,354 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/fesc/Downloads/demo%202/build/resources/integrationTest/logback.xml]
    16:30:43,354 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
    16:30:43,354 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/fesc/Downloads/demo%202/build/resources/integrationTest/logback.xml]
    16:30:43,354 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/fesc/Downloads/demo%202/build/resources/main/logback.xml]
    16:30:43,382 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
    16:30:43,383 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word clr with class [org.springframework.boot.logging.logback.ColorConverter]
    16:30:43,383 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wex with class [org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter]
    16:30:43,383 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
    16:30:43,386 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
    16:30:43,388 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
    16:30:43,399 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to ERROR
    16:30:43,399 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
    16:30:43,400 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
    16:30:43,400 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@24855019 - Registering current configuration as safe fallback point


DemoSpec STANDARD_OUT
    Grails application running at http://localhost:49332 in environment: test

DemoSpec > test something PASSED

> Task :test

UnitSpec > test something STANDARD_OUT
    foo

UnitSpec > test something PASSED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 8s
11 actionable tasks: 9 executed, 1 from cache, 1 up-to-date

Example project

https://github.com/felixscheinost/showcase-grails-bug-gradle-integration-test-also-executes-unit-test

Improvement: allow grails-profile plugin contains groovy source files

Current version grails profile Gradle plugin don't allow project contain groovy source files, when apply groovy plugin, it has below errors.

FAILURE: Build failed with an exception.

* Where:
Build file '/grails-demos/web-profile-command-demo/build.gradle' line: 12

* What went wrong:
A problem occurred evaluating root project 'web-profile-command-demo'.
> Failed to apply plugin 'org.grails.grails-profile'.
   > Cannot add task 'processResources' as a task with that name already exists.

Demo project

Environment:

  • Grails 5.1.2
  • Java OpenJDK 64-Bit Server VM Zulu11.54+23-CA (build 11.0.14+9-LTS, mixed mode)

Drop Spring Dependency Management plugin in favor of Gradle's platform

The Spring Dependency Management plugin provides some strange behavior. For example, it's very difficult to fix Log4Shell issue as the plugin still forces the old versions from the Spring's BOM. Gradle's platform works well as a substitute. See for example Micronaut Gradle plugins implementation:

https://github.com/micronaut-projects/micronaut-gradle-plugin/blob/6e4bbc1825aa3ed4210c0c0a69150add2c0ce2d7/src/main/java/io/micronaut/gradle/MicronautLibraryPlugin.java#L92-L98

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.