Skip to content

Commit

Permalink
Declarative R2DBC SPI implementation (#9447)
Browse files Browse the repository at this point in the history
Avoid usage of `com.google.auto.service:auto-service`.
  • Loading branch information
eddumelendez authored Oct 22, 2024
1 parent e7fc113 commit 7c024ed
Show file tree
Hide file tree
Showing 21 changed files with 7 additions and 35 deletions.
3 changes: 0 additions & 3 deletions modules/mariadb/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
description = "Testcontainers :: JDBC :: MariaDB"

dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'

api project(':jdbc')

compileOnly project(':r2dbc')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.testcontainers.containers;

import com.google.auto.service.AutoService;
import io.r2dbc.spi.ConnectionFactoryMetadata;
import io.r2dbc.spi.ConnectionFactoryOptions;
import org.mariadb.r2dbc.MariadbConnectionFactoryProvider;
Expand All @@ -9,7 +8,6 @@

import javax.annotation.Nullable;

@AutoService(R2DBCDatabaseContainerProvider.class)
public class MariaDBR2DBCDatabaseContainerProvider implements R2DBCDatabaseContainerProvider {

static final String DRIVER = MariadbConnectionFactoryProvider.MARIADB_DRIVER;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.testcontainers.containers.MariaDBR2DBCDatabaseContainerProvider
3 changes: 0 additions & 3 deletions modules/mssqlserver/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
description = "Testcontainers :: MS SQL Server"

dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'

api project(':jdbc')

compileOnly project(':r2dbc')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.testcontainers.containers;

import com.google.auto.service.AutoService;
import io.r2dbc.mssql.MssqlConnectionFactoryProvider;
import io.r2dbc.spi.ConnectionFactoryMetadata;
import io.r2dbc.spi.ConnectionFactoryOptions;
Expand All @@ -9,7 +8,6 @@

import javax.annotation.Nullable;

@AutoService(R2DBCDatabaseContainerProvider.class)
public class MSSQLR2DBCDatabaseContainerProvider implements R2DBCDatabaseContainerProvider {

static final String DRIVER = MssqlConnectionFactoryProvider.MSSQL_DRIVER;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.testcontainers.containers.MSSQLR2DBCDatabaseContainerProvider
3 changes: 0 additions & 3 deletions modules/mysql/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
description = "Testcontainers :: JDBC :: MySQL"

dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'

api project(':jdbc')

compileOnly project(':r2dbc')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.testcontainers.containers;

import com.google.auto.service.AutoService;
import io.asyncer.r2dbc.mysql.MySqlConnectionFactoryProvider;
import io.r2dbc.spi.ConnectionFactoryMetadata;
import io.r2dbc.spi.ConnectionFactoryOptions;
Expand All @@ -9,7 +8,6 @@

import javax.annotation.Nullable;

@AutoService(R2DBCDatabaseContainerProvider.class)
public class MySQLR2DBCDatabaseContainerProvider implements R2DBCDatabaseContainerProvider {

static final String DRIVER = MySqlConnectionFactoryProvider.MYSQL_DRIVER;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.testcontainers.containers.MySQLR2DBCDatabaseContainerProvider
3 changes: 0 additions & 3 deletions modules/oracle-free/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
description = "Testcontainers :: JDBC :: Oracle Database Free"

dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'

api project(':jdbc')

compileOnly project(':r2dbc')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.testcontainers.oracle;

import com.google.auto.service.AutoService;
import io.r2dbc.spi.ConnectionFactoryMetadata;
import io.r2dbc.spi.ConnectionFactoryOptions;
import org.jetbrains.annotations.Nullable;
import org.testcontainers.r2dbc.R2DBCDatabaseContainer;
import org.testcontainers.r2dbc.R2DBCDatabaseContainerProvider;

@AutoService(R2DBCDatabaseContainerProvider.class)
public class OracleR2DBCDatabaseContainerProvider implements R2DBCDatabaseContainerProvider {

static final String DRIVER = "oracle";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.testcontainers.oracle.OracleR2DBCDatabaseContainerProvider
3 changes: 0 additions & 3 deletions modules/oracle-xe/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
description = "Testcontainers :: JDBC :: Oracle XE"

dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'

api project(':jdbc')

compileOnly project(':r2dbc')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.testcontainers.containers;

import com.google.auto.service.AutoService;
import io.r2dbc.spi.ConnectionFactoryMetadata;
import io.r2dbc.spi.ConnectionFactoryOptions;
import org.jetbrains.annotations.Nullable;
import org.testcontainers.r2dbc.R2DBCDatabaseContainer;
import org.testcontainers.r2dbc.R2DBCDatabaseContainerProvider;

@AutoService(R2DBCDatabaseContainerProvider.class)
public class OracleR2DBCDatabaseContainerProvider implements R2DBCDatabaseContainerProvider {

static final String DRIVER = "oracle";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.testcontainers.containers.OracleR2DBCDatabaseContainerProvider
3 changes: 0 additions & 3 deletions modules/postgresql/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
description = "Testcontainers :: JDBC :: PostgreSQL"

dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'

api project(':jdbc')

compileOnly project(':r2dbc')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.testcontainers.containers;

import com.google.auto.service.AutoService;
import io.r2dbc.postgresql.PostgresqlConnectionFactoryProvider;
import io.r2dbc.spi.ConnectionFactoryMetadata;
import io.r2dbc.spi.ConnectionFactoryOptions;
Expand All @@ -9,7 +8,6 @@

import javax.annotation.Nullable;

@AutoService(R2DBCDatabaseContainerProvider.class)
public final class PostgreSQLR2DBCDatabaseContainerProvider implements R2DBCDatabaseContainerProvider {

static final String DRIVER = PostgresqlConnectionFactoryProvider.POSTGRESQL_DRIVER;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.testcontainers.containers.PostgreSQLR2DBCDatabaseContainerProvider
3 changes: 0 additions & 3 deletions modules/r2dbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ plugins {
description = "Testcontainers :: R2DBC"

dependencies {
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
compileOnly 'com.google.auto.service:auto-service:1.1.1'

api project(':testcontainers')
api 'io.r2dbc:r2dbc-spi:0.9.0.RELEASE'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.testcontainers.r2dbc;

import com.google.auto.service.AutoService;
import io.r2dbc.spi.ConnectionFactory;
import io.r2dbc.spi.ConnectionFactoryOptions;
import io.r2dbc.spi.ConnectionFactoryProvider;
Expand All @@ -10,7 +9,6 @@
*/
class Hidden {

@AutoService(ConnectionFactoryProvider.class)
public static final class TestcontainersR2DBCConnectionFactoryProvider implements ConnectionFactoryProvider {

public static final String DRIVER = "tc";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.testcontainers.r2dbc.Hidden$TestcontainersR2DBCConnectionFactoryProvider

0 comments on commit 7c024ed

Please # to comment.