Skip to content

Commit

Permalink
More updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfredley committed Sep 17, 2024
1 parent 01d465e commit 199f68a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ allprojects {
details.useVersion(micronautVersion)
}
}

resolutionStrategy.dependencySubstitution {

//update fields plugin used by scaffolding
substitute(module("org.grails.plugins:fields:3.0.0.RC1")).using(module("io.github.gpc:fields:5.0.3"))
}
}


}

subprojects { Project subproject ->
Expand Down
6 changes: 2 additions & 4 deletions examples/test-data-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ apply plugin: "java"

dependencies {
profile "org.grails.profiles:rest-api"
compileOnly "org.grails.plugins:views-json:$grailsViewsVersion"
compileOnly "org.grails.plugins:views-json-templates:$grailsViewsVersion"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core:$grailsVersion"
Expand All @@ -31,8 +29,8 @@ dependencies {
implementation "org.grails.plugins:events"
implementation project(":grails-plugin")
implementation "org.mongodb:mongodb-driver-sync:$mongodbDriverVersion"
implementation "org.grails.plugins:views-json"
implementation "org.grails.plugins:views-json-templates"
implementation "org.grails.plugins:views-json:$grailsViewsVersion"
implementation "org.grails.plugins:views-json-templates:$grailsViewsVersion"
implementation 'org.grails.plugins:spring-security-core:4.0.3'
implementation 'org.grails.plugins:spring-security-rest:3.0.1'
testImplementation "org.grails:grails-gorm-testing-support:$testingSupportVersion"
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
assetPipelineVersion=4.5.1
assetPipelineVersion=5.0.1
caffeineVersion=2.9.3
datastoreVersion=9.0.0-SNAPSHOT
gebVersion=7.0
gebPluginVersion=4.0.0
gormVersion=9.0.0-SNAPSHOT
grailsGradlePluginVersion=7.0.0-SNAPSHOT
grailsShellVersion=7.0.0-SNAPSHOT
grailsViewsVersion=3.2.3
grailsViewsVersion=4.0.0-SNAPSHOT
groovyVersion=4.0.22
h2Version=1.4.200
hibernateCoreVersion=5.6.15.Final
Expand Down Expand Up @@ -41,7 +41,7 @@ nettyVersion=4.1.112.Final
fieldsVersion=5.0.3
grailsVersion=7.0.0-SNAPSHOT
micrometer.version=1.8.0
scaffoldingVersion=5.0.1
scaffoldingVersion=6.0.0-SNAPSHOT
testingSupportVersion=4.0.0-SNAPSHOT
org.gradle.caching=true
org.gradle.parallel=false
Expand Down
1 change: 1 addition & 0 deletions grails-datastore-gorm-mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies {
api "org.grails:grails-datastore-gorm:$datastoreVersion"
api project(":grails-datastore-gorm-bson")

implementation "org.grails:grails-core:$grailsVersion"
implementation "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"

compileOnly "org.grails:grails-datastore-gorm-support:$datastoreVersion", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.mongodb.client.MongoIterable;
import com.mongodb.client.model.IndexOptions;
import grails.gorm.multitenancy.Tenants;
import grails.util.GrailsMessageSourceUtils;
import groovy.lang.Closure;
import org.bson.Document;
import org.bson.codecs.Codec;
Expand Down Expand Up @@ -65,9 +66,11 @@
import org.grails.datastore.mapping.transactions.DatastoreTransactionManager;
import org.grails.datastore.mapping.transactions.TransactionCapableDatastore;
import org.grails.datastore.mapping.validation.ValidatorRegistry;
import org.grails.spring.context.support.PluginAwareResourceBundleMessageSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.MessageSource;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.context.support.StaticMessageSource;
import org.springframework.core.env.PropertyResolver;
import org.springframework.transaction.PlatformTransactionManager;
Expand Down Expand Up @@ -575,10 +578,14 @@ public void setCodecs(List<Codec<?>> codecs) {
/**
* The message source used for validation messages
*
* @param messageSource The message source
* @param messageSources The message source
*/
@Autowired(required = false)
public void setMessageSource(@Qualifier("PluginAwareResourceBundleMessageSource") MessageSource messageSource) {
public void setMessageSource(List<MessageSource> messageSources) {
setMessageSource(GrailsMessageSourceUtils.findPreferredMessageSource(messageSources));
}

public void setMessageSource(MessageSource messageSource) {
if(messageSource != null) {
configureValidatorRegistry(connectionSources.getDefaultConnectionSource().getSettings(), (MongoMappingContext) mappingContext, messageSource);
}
Expand Down

0 comments on commit 199f68a

Please sign in to comment.