Skip to content

Commit

Permalink
Make Gradle 7.2 compatible
Browse files Browse the repository at this point in the history
Correctly define @input annotation on Task input
Fixes grails/grails-core#12132
  • Loading branch information
puneetbehl committed Oct 12, 2021
1 parent 2add937 commit dcd12c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
package grails.views.gradle

import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Nested
import org.gradle.api.tasks.compile.GroovyForkOptions

/**
* @author Graeme Rocher
* @since 1.0
*/
class ViewCompileOptions {
class ViewCompileOptions implements Serializable {

private static final long serialVersionUID = 0L;

@Input
String encoding = "UTF-8"

@Nested
GroovyForkOptions forkOptions = new GroovyForkOptions()

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package grails.views.gradle.json

import grails.views.gradle.AbstractGroovyTemplateCompileTask
import groovy.transform.CompileStatic
import org.gradle.api.tasks.Input

/**
* Concrete implementation that compiles JSON templates
Expand All @@ -11,16 +12,19 @@ import groovy.transform.CompileStatic
@CompileStatic
class JsonViewCompilerTask extends AbstractGroovyTemplateCompileTask {

@Input
@Override
String getFileExtension() {
"gson"
}

@Input
@Override
String getScriptBaseName() {
"grails.plugin.json.view.JsonViewTemplate"
}

@Input
@Override
protected String getCompilerName() {
"grails.plugin.json.view.JsonViewCompiler"
Expand Down

0 comments on commit dcd12c1

Please sign in to comment.