Migrate project to Gradle

* Upgrade all the dependencies to the latest versions
* Fix some incompatibilities
* Fix some warnings
This commit is contained in:
Artem Bilan
2023-11-23 15:45:29 -05:00
parent 7e4954df78
commit 19f904eb66
187 changed files with 1361 additions and 5254 deletions

View File

@@ -0,0 +1,18 @@
dependencies {
api project(':payload-converter-function')
api 'org.springframework.integration:spring-integration-mongodb'
api 'org.springframework.integration:spring-integration-redis'
api 'org.springframework.integration:spring-integration-jdbc'
runtimeOnly 'org.springframework.boot:spring-boot-starter-data-redis'
runtimeOnly 'org.springframework.boot:spring-boot-starter-data-mongodb'
runtimeOnly 'org.springframework.boot:spring-boot-starter-jdbc'
runtimeOnly 'org.hsqldb:hsqldb'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
runtimeOnly 'org.postgresql:postgresql'
testImplementation 'org.testcontainers:mongodb'
testImplementation project(':mongodb-consumer').sourceSets.test.output
testImplementation project(':redis-consumer').sourceSets.test.output
}

View File

@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud.fn</groupId>
<artifactId>spring-functions-parent</artifactId>
<version>4.0.1-SNAPSHOT</version>
<relativePath>../../spring-functions-parent/pom.xml</relativePath>
</parent>
<artifactId>aggregator-function</artifactId>
<name>aggregator-function</name>
<description>Spring Native Function for Aggregator</description>
<dependencies>
<dependency>
<groupId>org.springframework.cloud.fn</groupId>
<artifactId>payload-converter-function</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
</dependency>
<!--MongoDb-->
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mongodb</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud.fn</groupId>
<artifactId>mongodb-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--Redis-->
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud.fn</groupId>
<artifactId>redis-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--JDBC-->
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>

View File

@@ -24,7 +24,7 @@ import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo;
import org.springframework.cloud.fn.common.mongo.MongoDbTestContainerSupport;
import org.springframework.cloud.fn.consumer.mongo.MongoDbTestContainerSupport;
import org.springframework.integration.mongodb.store.ConfigurableMongoDbMessageStore;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.messaging.Message;

View File

@@ -42,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@TestPropertySource(properties = "aggregator.message-store-type=redis")
public class RedisMessageStoreAggregatorTests extends AbstractAggregatorFunctionTests implements RedisTestContainerSupport {
@DynamicPropertySource
static void redisProperties(DynamicPropertyRegistry registry) {
registry.add("spring.data.redis.url", RedisTestContainerSupport::getUri);