Skip to content

Commit

Permalink
Merge branch '7.0.x' into feature/7.0.0/13655-dot-notation
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty authored Dec 1, 2024
2 parents b92fc87 + 0ab0d9b commit 682e7db
Show file tree
Hide file tree
Showing 20 changed files with 208 additions and 198 deletions.
34 changes: 5 additions & 29 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,21 @@
version: 2
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 0
target-branch: 3.3.x
labels:
- "type: dependency upgrade"
- "relates-to: v3"
- package-ecosystem: gradle
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 0
target-branch: 4.1.x
labels:
- "type: dependency upgrade"
- "relates-to: v4"
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-minor", "version-update:semver-major" ]
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: 5.4.x
target-branch: 6.2.x
labels:
- "type: dependency upgrade"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: 6.0.x
target-branch: 7.0.x
labels:
- "type: dependency upgrade"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
4 changes: 3 additions & 1 deletion dependabot/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated on Mon Oct 21 14:36:55 PDT 2024 by: ./gradlew :grails-bom:dependabotBuild
// Generated on Fri Nov 22 09:58:56 CET 2024 by: ./gradlew :grails-bom:dependabotBuild
plugins {
id 'java-library'
}
Expand All @@ -7,6 +7,7 @@ dependencies {
api "org.apache.ant:ant:${project['ant.version']}"
api "org.apache.ant:ant-junit:${project['ant.version']}"
api "org.asciidoctor:asciidoctorj:${project['asciidoctorj.version']}"
api "com.bertramlabs.plugins:asset-pipeline-gradle:${project['asset-pipeline-gradle.version']}"
api "com.bertramlabs.plugins:asset-pipeline-grails:${project['asset-pipeline-grails.version']}"
api "net.bytebuddy:byte-buddy:${project['byte-buddy.version']}"
api "commons-codec:commons-codec:${project['commons-codec.version']}"
Expand All @@ -24,6 +25,7 @@ dependencies {
api "org.grails:grails-events-rxjava:${project['grails-async.version']}"
api "org.grails:grails-events-rxjava2:${project['grails-async.version']}"
api "org.grails:grails-datastore-gorm-hibernate5:${project['grails-datastore-gorm-hibernate5.version']}"
api "org.grails:grails-datastore-gorm-mongodb:${project['grails-datastore-gorm-mongodb.version']}"
api "org.grails:grails-datastore-async:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-core:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-gorm:${project['grails-datastore.version']}"
Expand Down
12 changes: 7 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gradleNexusPluginVersion=2.3.1
gradleNexusPublishPluginVersion=2.0.0
gradleExtraConfigurationsPluginVersion=10.0.1
gradleLicensePluginVersion=0.16.1
gradleToolingApiVersion=8.10.2
gradleToolingApiVersion=8.11.1
groovyVersion=4.0.24
joptSimpleVersion=5.0.4
plexusComponentApiVersion=1.0-alpha-33
Expand All @@ -21,10 +21,11 @@ org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1536M -XX:MaxMetaspaceSize=1024M

# Generated on Tue Oct 22 16:16:30 EDT 2024 by: ./gradlew :grails-bom:syncProps
# Generated on Fri Nov 22 09:58:56 CET 2024 by: ./gradlew :grails-bom:syncProps
# Only version value modifications allowed after this point. Do not insert or change version names.
ant.version=1.10.15
asciidoctorj.version=3.0.0
asset-pipeline-gradle.version=5.0.1
asset-pipeline-grails.version=5.0.1
byte-buddy.version=1.15.5
commons-codec.version=1.17.1
Expand All @@ -36,18 +37,19 @@ geb-spock.version=7.0
grails-async.version=6.0.0-SNAPSHOT
grails-datastore.version=9.0.0-SNAPSHOT
grails-datastore-gorm-hibernate5.version=9.0.0-SNAPSHOT
grails-datastore-gorm-mongodb.version=9.0.0-SNAPSHOT
grails-gdoc-engine.version=1.0.1
grails-gradle-plugin.version=7.0.0-SNAPSHOT
grails-testing-support.version=4.0.0-SNAPSHOT
groovy.version=4.0.24
gsp.version=7.0.0-SNAPSHOT
h2.version=2.3.232
jackson.version=2.18.0
jackson.version=2.18.2
jansi.version=1.18
javaparser-core.version=3.26.2
jline.version=2.14.6
jna.version=5.15.0
jsoup.version=1.18.1
jsoup.version=1.18.2
mongodb.version=5.1.4
objenesis.version=3.4
plugins-cache.version=8.0.0-SNAPSHOT
Expand Down Expand Up @@ -75,6 +77,6 @@ profiles-web.version=7.0.1-SNAPSHOT
profiles-web-plugin.version=7.0.1-SNAPSHOT
spock.version=2.3-groovy-4.0
spotbugs-annotations.version=4.8.6
spring-boot.version=3.4.0-RC1
spring-boot.version=3.4.0
springloaded.version=1.2.8.RELEASE
views-json-testing-support.version=4.0.0-SNAPSHOT
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 2 additions & 0 deletions grails-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ext {
// version name = versionNameOverride ?: artifactId-prefixes[0]
dependenciesOverview = """\
com.bertramlabs.plugins:asset-pipeline-grails::
com.bertramlabs.plugins:asset-pipeline-gradle::
com.fasterxml.jackson:jackson-bom:::jackson
com.github.javaparser:javaparser-core::
com.h2database:h2::
Expand All @@ -45,6 +46,7 @@ ext {
org.grails.plugins:gsp::
org.grails:grails-async,grails-events:gpars,rxjava,rxjava2::grails-async
org.grails:grails-datastore-gorm-hibernate5::
org.grails:grails-datastore-gorm-mongodb::
org.grails:grails-datastore:async,core,gorm,gorm-async,gorm-support,gorm-rx,gorm-test,gorm-validation,web:
org.grails:grails-gdoc-engine::
org.grails:grails-gradle-plugin::
Expand Down
1 change: 1 addition & 0 deletions grails-bom/plugins.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ neo4j=8.1.0
rxjava=1.1.1
rxjava2=2.0.0
scaffolding=6.0.0-SNAPSHOT
views-gradle=4.0.0-SNAPSHOT
views-json=4.0.0-SNAPSHOT
views-json-templates=4.0.0-SNAPSHOT
views-markup=4.0.0-SNAPSHOT
9 changes: 2 additions & 7 deletions grails-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
configurations.all {
resolutionStrategy {
force "org.hamcrest:hamcrest-core:1.3"
}
}

dependencies {
compileOnly "org.aspectj:aspectjrt", "org.aspectj:aspectjweaver"
api "jakarta.inject:jakarta.inject-api"
Expand All @@ -16,6 +10,7 @@ dependencies {
api "org.springframework:spring-tx"
api "org.springframework:spring-beans"
api "org.springframework:spring-context"
api "org.springframework.boot:spring-boot-autoconfigure"

compileOnly "org.springframework:spring-test"
compileOnly "org.apache.groovy:groovy-templates"
Expand All @@ -27,7 +22,7 @@ dependencies {

testImplementation "org.springframework:spring-jdbc"

testImplementation "org.hamcrest:hamcrest-core:1.3"
testImplementation "org.hamcrest:hamcrest"

testRuntimeOnly "com.h2database:h2"
testRuntimeOnly "com.fasterxml.jackson.core:jackson-databind"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import org.grails.spring.DefaultRuntimeSpringConfiguration
import org.grails.spring.RuntimeSpringConfiguration
import org.grails.spring.aop.autoproxy.GroovyAwareAspectJAwareAdvisorAutoProxyCreator
import org.grails.spring.aop.autoproxy.GroovyAwareInfrastructureAdvisorAutoProxyCreator
import org.grails.spring.context.support.GrailsPlaceholderConfigurer
import org.grails.spring.context.support.MapBasedSmartPropertyOverrideConfigurer
import org.grails.spring.RuntimeSpringConfigUtilities
import org.grails.core.io.DefaultResourceLocator
Expand Down Expand Up @@ -66,17 +65,12 @@ class CoreGrailsPlugin extends Plugin {

// Grails config as properties
def config = application.config
def placeHolderPrefix = config.getProperty(Settings.SPRING_PLACEHOLDER_PREFIX, '${')


// enable post-processing of @Configuration beans defined by plugins
grailsConfigurationClassPostProcessor ConfigurationClassPostProcessor
grailsBeanOverrideConfigurer(MapBasedSmartPropertyOverrideConfigurer) {
delegate.grailsApplication = application
}
propertySourcesPlaceholderConfigurer(GrailsPlaceholderConfigurer) {
placeholderPrefix = placeHolderPrefix
}

Class proxyCreatorClazz = null
// replace AutoProxy advisor with Groovy aware one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,9 @@ public void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)
BeanBuilder bb = new BeanBuilder(getParentCtx(),springConfig, grailsApplication.getClassLoader());
bb.setBinding(b);
c.setDelegate(bb);
c.setResolveStrategy(Closure.OWNER_FIRST);
bb.invokeMethod("beans", new Object[]{c});
}
}
else {

} else {
if (!pluginBean.isReadableProperty(DO_WITH_SPRING)) {
return;
}
Expand All @@ -559,7 +556,6 @@ public void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)
BeanBuilder bb = new BeanBuilder(getParentCtx(),springConfig, grailsApplication.getClassLoader());
bb.setBinding(b);
c.setDelegate(bb);
c.setResolveStrategy(Closure.DELEGATE_FIRST);
bb.invokeMethod("beans", new Object[]{c});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright 2004-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.grails.plugins.core;

import grails.config.ConfigProperties;
import grails.config.Settings;
import grails.core.GrailsApplication;
import org.grails.spring.context.support.GrailsPlaceholderConfigurer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.Ordered;

/**
* Core beans.
*
* @author graemerocher
* @since 4.0
*/
@AutoConfiguration(before = { PropertyPlaceholderAutoConfiguration.class })
@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE)
public class CoreAutoConfiguration {

@Value("${" + Settings.SPRING_PLACEHOLDER_PREFIX + ":#{null}}")
private String placeholderPrefix;

@Bean
@Primary
public ClassLoader classLoader(GrailsApplication grailsApplication) {
return grailsApplication.getClassLoader();
}

@Bean
@Primary
public ConfigProperties grailsConfigProperties(GrailsApplication grailsApplication) {
return new ConfigProperties(grailsApplication.getConfig());
}

@Bean
@Primary
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
GrailsPlaceholderConfigurer grailsPlaceholderConfigurer = new GrailsPlaceholderConfigurer();
if (placeholderPrefix != null) {
grailsPlaceholderConfigurer.setPlaceholderPrefix(placeholderPrefix);
}
return grailsPlaceholderConfigurer;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.grails.plugins.core.CoreConfiguration
org.grails.plugins.core.CoreAutoConfiguration
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package grails.spring

import grails.core.DefaultGrailsApplication
import org.grails.plugins.CoreGrailsPlugin
import org.grails.spring.context.support.GrailsPlaceholderConfigurer
import spock.lang.Issue
import spock.lang.Specification

Expand Down Expand Up @@ -29,6 +30,7 @@ class GrailsPlaceHolderConfigurerCorePluginRuntimeSpec extends Specification{
plugin.grailsApplication = app
bb.beans plugin.doWithSpring()
bb.beans {
propertySourcesPlaceholderConfigurer(GrailsPlaceholderConfigurer)
testBean(ReplacePropertyBean) {
foo = '${foo.bar}'
}
Expand Down
Loading

0 comments on commit 682e7db

Please sign in to comment.