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

Grails 7: grails-views: Failed to apply plugin 'org.grails.plugins.views-json' #587

Closed
jamesfredley opened this issue Sep 29, 2024 · 8 comments · Fixed by #588
Closed

Grails 7: grails-views: Failed to apply plugin 'org.grails.plugins.views-json' #587

jamesfredley opened this issue Sep 29, 2024 · 8 comments · Fixed by #588
Assignees

Comments

@jamesfredley
Copy link
Contributor

jamesfredley commented Sep 29, 2024

org.grails.plugins:views-json:4.0.0-SNAPSHOT

apply plugin: "org.grails.plugins.views-json"

A problem occurred evaluating root project 'testing-support'.
> Failed to apply plugin 'org.grails.plugins.views-json'.
   > Could not create task ':examples-demo33:compileGsonViews'.
      > Could not create task of type 'JsonViewCompilerTask'.
         > grails.views.gradle.AbstractGroovyTemplateCompileTask: method 'void <init>()' not found
@jamesfredley
Copy link
Contributor Author

jamesfredley commented Oct 1, 2024

All that is required to get views-json to render .gson views is:

buildscript {
    repositories {
        maven { url "https://repo.grails.org/grails/core" }
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT"
    }
}

apply plugin: "org.grails.grails-web"

dependencies {
    // other normal dependencies
    implementation "org.grails.plugins:views-json:4.0.0-SNAPSHOT"
}

apply plugin: "org.grails.plugins.views-json" is not required

@jamesfredley
Copy link
Contributor Author

https://github.com/grails/grails-functional-tests/blob/7.0.x/issue-views-182/build.gradle is a good sample project.

classpath "org.grails.plugins:views-gradle:$viewsVersion" is not required for gson views to render

@jamesfredley jamesfredley moved this from Todo to Done in Grails 7 Oct 2, 2024
@jamesfredley jamesfredley closed this as completed by moving to Done in Grails 7 Oct 2, 2024
@jamesfredley jamesfredley linked a pull request Oct 2, 2024 that will close this issue
@jamesfredley
Copy link
Contributor Author

@jamesfredley
Copy link
Contributor Author

@jamesfredley
Copy link
Contributor Author

grails/grails-async#151

@james-criscuolo
Copy link

@jamesfredley I posted on the PR, but is there any chance this gets backported to 3.2.x? Gradle 8 support was brought to the recent 6.2 release of grails-core, and in attempting that update I run into this issue.

@jamesfredley
Copy link
Contributor Author

jamesfredley commented Oct 10, 2024

@james-criscuolo possibly, but the bigger issue will be grail-gradle-plugin which has had numerous Gradle 8 changes in the 7.0.x branch. There have also been Gradle 8 changes in the Grails 7 branches for a few other modules.

https://github.com/grails/grails-gradle-plugin/pulls?q=is%3Apr+is%3Aclosed+gradle

@james-criscuolo
Copy link

Understood, yea it would definitely be a concerted effort to bring Gradle 8 support to the existing releases. Seems like it's probably a bit heavy, thank you for the fast response!

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

Successfully merging a pull request may close this issue.

3 participants