Skip to content

Commit

Permalink
fix(jsontemplates): change mongodb lib as compileOnly (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetbehl committed Apr 4, 2024
1 parent 2bf8a9b commit a5765fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions json-templates/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
// The templates expect classes from this library as models
// but I'm not sure in what context these templates are used
// They were previously compileOnly
implementation libs.grails.datastore.gorm.mongodb
compileOnly libs.grails.datastore.gorm.mongodb

compileOnly libs.slf4j.nop // Get rid of warning about missing slf4j implementation during compileGsonViews task
}
Expand Down Expand Up @@ -52,4 +52,4 @@ apply from: rootProject.layout.projectDirectory.file('gradle/publishing.gradle')
// This is a workaround as a javadoc jar is required for publishing.
tasks.named('javadocJar', Jar) {
from 'src/templates'
}
}

3 comments on commit a5765fa

@matrei
Copy link
Contributor

@matrei matrei commented on a5765fa Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@puneetbehl I'm not sure this is the correct thing to do.
The problem with the failing test in https://github.com/grails/grails-functional-tests is that the issue-views-182 project pulls in org.grails.plugins:views-json-templates.
It should not do that.

From the grails-views documentation:

If you are also using MongoDB you may want to add the views-json-templates dependency too which includes support for GeoJSON

@puneetbehl
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matrei I am not sure why or how this is exposed. I tried to find it out from the dependencyInsights task but I could not trace it. Following are the commands:

➜  grails-functional-tests git:(renovate/grails-views-monorepo) ./gradlew -q :issue-views-182:dependencyInsight --configuration testRuntimeClasspath --dependency views-json-templates
No dependencies matching given input were found in configuration ':issue-views-182:testRuntimeClasspath'
➜  grails-functional-tests git:(renovate/grails-views-monorepo) ./gradlew -q :issue-views-182:dependencyInsight --configuration compileClasspath --dependency views-json-templates
No dependencies matching given input were found in configuration ':issue-views-182:compileClasspath'
➜  grails-functional-tests git:(renovate/grails-views-monorepo) ./gradlew -q :issue-views-182:dependencyInsight --configuration testCompileClasspath --dependency views-json-templates
No dependencies matching given input were found in configuration ':issue-views-182:testCompileClasspath'

@matrei
Copy link
Contributor

@matrei matrei commented on a5765fa Apr 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@puneetbehl We already removed it yesterday with grails/grails-functional-tests#220

Please sign in to comment.