diff --git a/.gitignore b/.gitignore index 8a93e93..42ae54e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 .idea .gradle +build # User-specific stuff diff --git a/.gradle/8.4/checksums/checksums.lock b/.gradle/8.4/checksums/checksums.lock deleted file mode 100644 index 4763b00..0000000 Binary files a/.gradle/8.4/checksums/checksums.lock and /dev/null differ diff --git a/.gradle/8.4/checksums/md5-checksums.bin b/.gradle/8.4/checksums/md5-checksums.bin deleted file mode 100644 index 7a4c584..0000000 Binary files a/.gradle/8.4/checksums/md5-checksums.bin and /dev/null differ diff --git a/.gradle/8.4/checksums/sha1-checksums.bin b/.gradle/8.4/checksums/sha1-checksums.bin deleted file mode 100644 index d701806..0000000 Binary files a/.gradle/8.4/checksums/sha1-checksums.bin and /dev/null differ diff --git a/.gradle/8.4/dependencies-accessors/b6735f406f36c51adcd843f79dd8920e367718e7/sources/org/gradle/accessors/dm/LibrariesForLibs.java b/.gradle/8.4/dependencies-accessors/b6735f406f36c51adcd843f79dd8920e367718e7/sources/org/gradle/accessors/dm/LibrariesForLibs.java deleted file mode 100644 index fa1d63e..0000000 --- a/.gradle/8.4/dependencies-accessors/b6735f406f36c51adcd843f79dd8920e367718e7/sources/org/gradle/accessors/dm/LibrariesForLibs.java +++ /dev/null @@ -1,791 +0,0 @@ -package org.gradle.accessors.dm; - -import org.gradle.api.NonNullApi; -import org.gradle.api.artifacts.MinimalExternalModuleDependency; -import org.gradle.plugin.use.PluginDependency; -import org.gradle.api.artifacts.ExternalModuleDependencyBundle; -import org.gradle.api.artifacts.MutableVersionConstraint; -import org.gradle.api.provider.Provider; -import org.gradle.api.model.ObjectFactory; -import org.gradle.api.provider.ProviderFactory; -import org.gradle.api.internal.catalog.AbstractExternalDependencyFactory; -import org.gradle.api.internal.catalog.DefaultVersionCatalog; -import java.util.Map; -import org.gradle.api.internal.attributes.ImmutableAttributesFactory; -import org.gradle.api.internal.artifacts.dsl.CapabilityNotationParser; -import javax.inject.Inject; - -/** - * A catalog of dependencies accessible via the `libs` extension. - */ -@NonNullApi -public class LibrariesForLibs extends AbstractExternalDependencyFactory { - - private final AbstractExternalDependencyFactory owner = this; - private final FixtureLibraryAccessors laccForFixtureLibraryAccessors = new FixtureLibraryAccessors(owner); - private final JacksonLibraryAccessors laccForJacksonLibraryAccessors = new JacksonLibraryAccessors(owner); - private final MicrometerLibraryAccessors laccForMicrometerLibraryAccessors = new MicrometerLibraryAccessors(owner); - private final MysqlLibraryAccessors laccForMysqlLibraryAccessors = new MysqlLibraryAccessors(owner); - private final SpringLibraryAccessors laccForSpringLibraryAccessors = new SpringLibraryAccessors(owner); - private final TestLibraryAccessors laccForTestLibraryAccessors = new TestLibraryAccessors(owner); - private final VersionAccessors vaccForVersionAccessors = new VersionAccessors(providers, config); - private final BundleAccessors baccForBundleAccessors = new BundleAccessors(objects, providers, config, attributesFactory, capabilityNotationParser); - private final PluginAccessors paccForPluginAccessors = new PluginAccessors(providers, config); - - @Inject - public LibrariesForLibs(DefaultVersionCatalog config, ProviderFactory providers, ObjectFactory objects, ImmutableAttributesFactory attributesFactory, CapabilityNotationParser capabilityNotationParser) { - super(config, providers, objects, attributesFactory, capabilityNotationParser); - } - - /** - * Creates a dependency provider for assertj (org.assertj:assertj-core) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getAssertj() { - return create("assertj"); - } - - /** - * Creates a dependency provider for h2 (com.h2database:h2) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getH2() { - return create("h2"); - } - - /** - * Creates a dependency provider for lombok (org.projectlombok:lombok) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getLombok() { - return create("lombok"); - } - - /** - * Returns the group of libraries at fixture - */ - public FixtureLibraryAccessors getFixture() { - return laccForFixtureLibraryAccessors; - } - - /** - * Returns the group of libraries at jackson - */ - public JacksonLibraryAccessors getJackson() { - return laccForJacksonLibraryAccessors; - } - - /** - * Returns the group of libraries at micrometer - */ - public MicrometerLibraryAccessors getMicrometer() { - return laccForMicrometerLibraryAccessors; - } - - /** - * Returns the group of libraries at mysql - */ - public MysqlLibraryAccessors getMysql() { - return laccForMysqlLibraryAccessors; - } - - /** - * Returns the group of libraries at spring - */ - public SpringLibraryAccessors getSpring() { - return laccForSpringLibraryAccessors; - } - - /** - * Returns the group of libraries at test - */ - public TestLibraryAccessors getTest() { - return laccForTestLibraryAccessors; - } - - /** - * Returns the group of versions at versions - */ - public VersionAccessors getVersions() { - return vaccForVersionAccessors; - } - - /** - * Returns the group of bundles at bundles - */ - public BundleAccessors getBundles() { - return baccForBundleAccessors; - } - - /** - * Returns the group of plugins at plugins - */ - public PluginAccessors getPlugins() { - return paccForPluginAccessors; - } - - public static class FixtureLibraryAccessors extends SubDependencyFactory { - private final FixtureMonkeyLibraryAccessors laccForFixtureMonkeyLibraryAccessors = new FixtureMonkeyLibraryAccessors(owner); - - public FixtureLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at fixture.monkey - */ - public FixtureMonkeyLibraryAccessors getMonkey() { - return laccForFixtureMonkeyLibraryAccessors; - } - - } - - public static class FixtureMonkeyLibraryAccessors extends SubDependencyFactory { - private final FixtureMonkeyStarterLibraryAccessors laccForFixtureMonkeyStarterLibraryAccessors = new FixtureMonkeyStarterLibraryAccessors(owner); - - public FixtureMonkeyLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at fixture.monkey.starter - */ - public FixtureMonkeyStarterLibraryAccessors getStarter() { - return laccForFixtureMonkeyStarterLibraryAccessors; - } - - } - - public static class FixtureMonkeyStarterLibraryAccessors extends SubDependencyFactory { - - public FixtureMonkeyStarterLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for kotlin (com.navercorp.fixturemonkey:fixture-monkey-starter-kotlin) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getKotlin() { - return create("fixture.monkey.starter.kotlin"); - } - - } - - public static class JacksonLibraryAccessors extends SubDependencyFactory { - - public JacksonLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for kotlin (com.fasterxml.jackson.module:jackson-module-kotlin) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getKotlin() { - return create("jackson.kotlin"); - } - - } - - public static class MicrometerLibraryAccessors extends SubDependencyFactory { - private final MicrometerRegistryLibraryAccessors laccForMicrometerRegistryLibraryAccessors = new MicrometerRegistryLibraryAccessors(owner); - private final MicrometerTracingLibraryAccessors laccForMicrometerTracingLibraryAccessors = new MicrometerTracingLibraryAccessors(owner); - - public MicrometerLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at micrometer.registry - */ - public MicrometerRegistryLibraryAccessors getRegistry() { - return laccForMicrometerRegistryLibraryAccessors; - } - - /** - * Returns the group of libraries at micrometer.tracing - */ - public MicrometerTracingLibraryAccessors getTracing() { - return laccForMicrometerTracingLibraryAccessors; - } - - } - - public static class MicrometerRegistryLibraryAccessors extends SubDependencyFactory { - - public MicrometerRegistryLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for prometheus (io.micrometer:micrometer-registry-prometheus) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getPrometheus() { - return create("micrometer.registry.prometheus"); - } - - } - - public static class MicrometerTracingLibraryAccessors extends SubDependencyFactory { - private final MicrometerTracingBridgeLibraryAccessors laccForMicrometerTracingBridgeLibraryAccessors = new MicrometerTracingBridgeLibraryAccessors(owner); - - public MicrometerTracingLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at micrometer.tracing.bridge - */ - public MicrometerTracingBridgeLibraryAccessors getBridge() { - return laccForMicrometerTracingBridgeLibraryAccessors; - } - - } - - public static class MicrometerTracingBridgeLibraryAccessors extends SubDependencyFactory { - - public MicrometerTracingBridgeLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for brave (io.micrometer:micrometer-tracing-bridge-brave) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getBrave() { - return create("micrometer.tracing.bridge.brave"); - } - - } - - public static class MysqlLibraryAccessors extends SubDependencyFactory { - - public MysqlLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for connector (com.mysql:mysql-connector-j) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getConnector() { - return create("mysql.connector"); - } - - } - - public static class SpringLibraryAccessors extends SubDependencyFactory { - private final SpringBootLibraryAccessors laccForSpringBootLibraryAccessors = new SpringBootLibraryAccessors(owner); - private final SpringCloudLibraryAccessors laccForSpringCloudLibraryAccessors = new SpringCloudLibraryAccessors(owner); - - public SpringLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for context (org.springframework:spring-context) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getContext() { - return create("spring.context"); - } - - /** - * Creates a dependency provider for mockk (com.ninja-squad:springmockk) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getMockk() { - return create("spring.mockk"); - } - - /** - * Returns the group of libraries at spring.boot - */ - public SpringBootLibraryAccessors getBoot() { - return laccForSpringBootLibraryAccessors; - } - - /** - * Returns the group of libraries at spring.cloud - */ - public SpringCloudLibraryAccessors getCloud() { - return laccForSpringCloudLibraryAccessors; - } - - } - - public static class SpringBootLibraryAccessors extends SubDependencyFactory { - private final SpringBootConfigurationLibraryAccessors laccForSpringBootConfigurationLibraryAccessors = new SpringBootConfigurationLibraryAccessors(owner); - private final SpringBootStarterLibraryAccessors laccForSpringBootStarterLibraryAccessors = new SpringBootStarterLibraryAccessors(owner); - - public SpringBootLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for dependencies (org.springframework.boot:spring-boot-dependencies) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getDependencies() { - return create("spring.boot.dependencies"); - } - - /** - * Creates a dependency provider for testcontainers (org.springframework.boot:spring-boot-testcontainers) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getTestcontainers() { - return create("spring.boot.testcontainers"); - } - - /** - * Returns the group of libraries at spring.boot.configuration - */ - public SpringBootConfigurationLibraryAccessors getConfiguration() { - return laccForSpringBootConfigurationLibraryAccessors; - } - - /** - * Returns the group of libraries at spring.boot.starter - */ - public SpringBootStarterLibraryAccessors getStarter() { - return laccForSpringBootStarterLibraryAccessors; - } - - } - - public static class SpringBootConfigurationLibraryAccessors extends SubDependencyFactory { - - public SpringBootConfigurationLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for processor (org.springframework.boot:spring-boot-configuration-processor) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getProcessor() { - return create("spring.boot.configuration.processor"); - } - - } - - public static class SpringBootStarterLibraryAccessors extends SubDependencyFactory { - private final SpringBootStarterDataLibraryAccessors laccForSpringBootStarterDataLibraryAccessors = new SpringBootStarterDataLibraryAccessors(owner); - - public SpringBootStarterLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for actuator (org.springframework.boot:spring-boot-starter-actuator) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getActuator() { - return create("spring.boot.starter.actuator"); - } - - /** - * Creates a dependency provider for test (org.springframework.boot:spring-boot-starter-test) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getTest() { - return create("spring.boot.starter.test"); - } - - /** - * Creates a dependency provider for web (org.springframework.boot:spring-boot-starter-web) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getWeb() { - return create("spring.boot.starter.web"); - } - - /** - * Returns the group of libraries at spring.boot.starter.data - */ - public SpringBootStarterDataLibraryAccessors getData() { - return laccForSpringBootStarterDataLibraryAccessors; - } - - } - - public static class SpringBootStarterDataLibraryAccessors extends SubDependencyFactory { - - public SpringBootStarterDataLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for jpa (org.springframework.boot:spring-boot-starter-data-jpa) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getJpa() { - return create("spring.boot.starter.data.jpa"); - } - - } - - public static class SpringCloudLibraryAccessors extends SubDependencyFactory { - - public SpringCloudLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for dependencies (org.springframework.cloud:spring-cloud-dependencies) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getDependencies() { - return create("spring.cloud.dependencies"); - } - - } - - public static class TestLibraryAccessors extends SubDependencyFactory { - private final TestContainersLibraryAccessors laccForTestContainersLibraryAccessors = new TestContainersLibraryAccessors(owner); - - public TestLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at test.containers - */ - public TestContainersLibraryAccessors getContainers() { - return laccForTestContainersLibraryAccessors; - } - - } - - public static class TestContainersLibraryAccessors extends SubDependencyFactory { - private final TestContainersJunitLibraryAccessors laccForTestContainersJunitLibraryAccessors = new TestContainersJunitLibraryAccessors(owner); - - public TestContainersLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for mysql (org.testcontainers:mysql) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getMysql() { - return create("test.containers.mysql"); - } - - /** - * Returns the group of libraries at test.containers.junit - */ - public TestContainersJunitLibraryAccessors getJunit() { - return laccForTestContainersJunitLibraryAccessors; - } - - } - - public static class TestContainersJunitLibraryAccessors extends SubDependencyFactory { - - public TestContainersJunitLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for jupiter (org.testcontainers:junit-jupiter) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getJupiter() { - return create("test.containers.junit.jupiter"); - } - - } - - public static class VersionAccessors extends VersionFactory { - - private final FixtureVersionAccessors vaccForFixtureVersionAccessors = new FixtureVersionAccessors(providers, config); - private final KtlintVersionAccessors vaccForKtlintVersionAccessors = new KtlintVersionAccessors(providers, config); - private final SpringVersionAccessors vaccForSpringVersionAccessors = new SpringVersionAccessors(providers, config); - private final TestVersionAccessors vaccForTestVersionAccessors = new TestVersionAccessors(providers, config); - public VersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: assertj (3.24.2) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getAssertj() { return getVersion("assertj"); } - - /** - * Returns the version associated to this alias: junit (5.9.3) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getJunit() { return getVersion("junit"); } - - /** - * Returns the version associated to this alias: kotlin (1.9.21) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getKotlin() { return getVersion("kotlin"); } - - /** - * Returns the version associated to this alias: lombok (1.18.22) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getLombok() { return getVersion("lombok"); } - - /** - * Returns the version associated to this alias: redisson (3.25.2) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getRedisson() { return getVersion("redisson"); } - - /** - * Returns the group of versions at versions.fixture - */ - public FixtureVersionAccessors getFixture() { - return vaccForFixtureVersionAccessors; - } - - /** - * Returns the group of versions at versions.ktlint - */ - public KtlintVersionAccessors getKtlint() { - return vaccForKtlintVersionAccessors; - } - - /** - * Returns the group of versions at versions.spring - */ - public SpringVersionAccessors getSpring() { - return vaccForSpringVersionAccessors; - } - - /** - * Returns the group of versions at versions.test - */ - public TestVersionAccessors getTest() { - return vaccForTestVersionAccessors; - } - - } - - public static class FixtureVersionAccessors extends VersionFactory { - - public FixtureVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: fixture.monkey (1.0.13) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getMonkey() { return getVersion("fixture.monkey"); } - - } - - public static class KtlintVersionAccessors extends VersionFactory { - - public KtlintVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: ktlint.plugin (11.6.1) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getPlugin() { return getVersion("ktlint.plugin"); } - - } - - public static class SpringVersionAccessors extends VersionFactory { - - private final SpringCloudVersionAccessors vaccForSpringCloudVersionAccessors = new SpringCloudVersionAccessors(providers, config); - private final SpringIoVersionAccessors vaccForSpringIoVersionAccessors = new SpringIoVersionAccessors(providers, config); - public SpringVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: spring.boot (3.2.0) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getBoot() { return getVersion("spring.boot"); } - - /** - * Returns the version associated to this alias: spring.mockk (4.0.2) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getMockk() { return getVersion("spring.mockk"); } - - /** - * Returns the group of versions at versions.spring.cloud - */ - public SpringCloudVersionAccessors getCloud() { - return vaccForSpringCloudVersionAccessors; - } - - /** - * Returns the group of versions at versions.spring.io - */ - public SpringIoVersionAccessors getIo() { - return vaccForSpringIoVersionAccessors; - } - - } - - public static class SpringCloudVersionAccessors extends VersionFactory { - - public SpringCloudVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: spring.cloud.dependencies (2023.0.0) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getDependencies() { return getVersion("spring.cloud.dependencies"); } - - } - - public static class SpringIoVersionAccessors extends VersionFactory { - - private final SpringIoDependencyVersionAccessors vaccForSpringIoDependencyVersionAccessors = new SpringIoDependencyVersionAccessors(providers, config); - public SpringIoVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the group of versions at versions.spring.io.dependency - */ - public SpringIoDependencyVersionAccessors getDependency() { - return vaccForSpringIoDependencyVersionAccessors; - } - - } - - public static class SpringIoDependencyVersionAccessors extends VersionFactory { - - public SpringIoDependencyVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: spring.io.dependency.management (1.1.0) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getManagement() { return getVersion("spring.io.dependency.management"); } - - } - - public static class TestVersionAccessors extends VersionFactory { - - public TestVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: test.containers (1.19.3) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getContainers() { return getVersion("test.containers"); } - - } - - public static class BundleAccessors extends BundleFactory { - private final TestcontainersBundleAccessors baccForTestcontainersBundleAccessors = new TestcontainersBundleAccessors(objects, providers, config, attributesFactory, capabilityNotationParser); - - public BundleAccessors(ObjectFactory objects, ProviderFactory providers, DefaultVersionCatalog config, ImmutableAttributesFactory attributesFactory, CapabilityNotationParser capabilityNotationParser) { super(objects, providers, config, attributesFactory, capabilityNotationParser); } - - /** - * Returns the group of bundles at bundles.testcontainers - */ - public TestcontainersBundleAccessors getTestcontainers() { - return baccForTestcontainersBundleAccessors; - } - - } - - public static class TestcontainersBundleAccessors extends BundleFactory { - - public TestcontainersBundleAccessors(ObjectFactory objects, ProviderFactory providers, DefaultVersionCatalog config, ImmutableAttributesFactory attributesFactory, CapabilityNotationParser capabilityNotationParser) { super(objects, providers, config, attributesFactory, capabilityNotationParser); } - - /** - * Creates a dependency bundle provider for testcontainers.mysql which is an aggregate for the following dependencies: - *
    - *
  • org.testcontainers:mysql
  • - *
  • org.springframework.boot:spring-boot-testcontainers
  • - *
  • org.testcontainers:junit-jupiter
  • - *
  • org.springframework.boot:spring-boot-starter-test
  • - *
- * This bundle was declared in catalog libs.versions.toml - */ - public Provider getMysql() { - return createBundle("testcontainers.mysql"); - } - - } - - public static class PluginAccessors extends PluginFactory { - private final KotlinPluginAccessors paccForKotlinPluginAccessors = new KotlinPluginAccessors(providers, config); - private final SpringPluginAccessors paccForSpringPluginAccessors = new SpringPluginAccessors(providers, config); - - public PluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for ktlint to the plugin id 'org.jlleitschuh.gradle.ktlint' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getKtlint() { return createPlugin("ktlint"); } - - /** - * Returns the group of plugins at plugins.kotlin - */ - public KotlinPluginAccessors getKotlin() { - return paccForKotlinPluginAccessors; - } - - /** - * Returns the group of plugins at plugins.spring - */ - public SpringPluginAccessors getSpring() { - return paccForSpringPluginAccessors; - } - - } - - public static class KotlinPluginAccessors extends PluginFactory { - - public KotlinPluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for kotlin.jpa to the plugin id 'org.jetbrains.kotlin.plugin.jpa' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getJpa() { return createPlugin("kotlin.jpa"); } - - /** - * Creates a plugin provider for kotlin.jvm to the plugin id 'org.jetbrains.kotlin.jvm' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getJvm() { return createPlugin("kotlin.jvm"); } - - /** - * Creates a plugin provider for kotlin.kapt to the plugin id 'org.jetbrains.kotlin.kapt' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getKapt() { return createPlugin("kotlin.kapt"); } - - /** - * Creates a plugin provider for kotlin.spring to the plugin id 'org.jetbrains.kotlin.plugin.spring' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getSpring() { return createPlugin("kotlin.spring"); } - - } - - public static class SpringPluginAccessors extends PluginFactory { - private final SpringDependencyPluginAccessors paccForSpringDependencyPluginAccessors = new SpringDependencyPluginAccessors(providers, config); - - public SpringPluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for spring.boot to the plugin id 'org.springframework.boot' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getBoot() { return createPlugin("spring.boot"); } - - /** - * Returns the group of plugins at plugins.spring.dependency - */ - public SpringDependencyPluginAccessors getDependency() { - return paccForSpringDependencyPluginAccessors; - } - - } - - public static class SpringDependencyPluginAccessors extends PluginFactory { - - public SpringDependencyPluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for spring.dependency.management to the plugin id 'io.spring.dependency-management' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getManagement() { return createPlugin("spring.dependency.management"); } - - } - -} diff --git a/.gradle/8.4/dependencies-accessors/b6735f406f36c51adcd843f79dd8920e367718e7/sources/org/gradle/accessors/dm/LibrariesForLibsInPluginsBlock.java b/.gradle/8.4/dependencies-accessors/b6735f406f36c51adcd843f79dd8920e367718e7/sources/org/gradle/accessors/dm/LibrariesForLibsInPluginsBlock.java deleted file mode 100644 index fb208ab..0000000 --- a/.gradle/8.4/dependencies-accessors/b6735f406f36c51adcd843f79dd8920e367718e7/sources/org/gradle/accessors/dm/LibrariesForLibsInPluginsBlock.java +++ /dev/null @@ -1,994 +0,0 @@ -package org.gradle.accessors.dm; - -import org.gradle.api.NonNullApi; -import org.gradle.api.artifacts.MinimalExternalModuleDependency; -import org.gradle.plugin.use.PluginDependency; -import org.gradle.api.artifacts.ExternalModuleDependencyBundle; -import org.gradle.api.artifacts.MutableVersionConstraint; -import org.gradle.api.provider.Provider; -import org.gradle.api.model.ObjectFactory; -import org.gradle.api.provider.ProviderFactory; -import org.gradle.api.internal.catalog.AbstractExternalDependencyFactory; -import org.gradle.api.internal.catalog.DefaultVersionCatalog; -import java.util.Map; -import org.gradle.api.internal.attributes.ImmutableAttributesFactory; -import org.gradle.api.internal.artifacts.dsl.CapabilityNotationParser; -import javax.inject.Inject; - -/** - * A catalog of dependencies accessible via the `libs` extension. - */ -@NonNullApi -public class LibrariesForLibsInPluginsBlock extends AbstractExternalDependencyFactory { - - private final AbstractExternalDependencyFactory owner = this; - private final FixtureLibraryAccessors laccForFixtureLibraryAccessors = new FixtureLibraryAccessors(owner); - private final JacksonLibraryAccessors laccForJacksonLibraryAccessors = new JacksonLibraryAccessors(owner); - private final MicrometerLibraryAccessors laccForMicrometerLibraryAccessors = new MicrometerLibraryAccessors(owner); - private final MysqlLibraryAccessors laccForMysqlLibraryAccessors = new MysqlLibraryAccessors(owner); - private final SpringLibraryAccessors laccForSpringLibraryAccessors = new SpringLibraryAccessors(owner); - private final TestLibraryAccessors laccForTestLibraryAccessors = new TestLibraryAccessors(owner); - private final VersionAccessors vaccForVersionAccessors = new VersionAccessors(providers, config); - private final BundleAccessors baccForBundleAccessors = new BundleAccessors(objects, providers, config, attributesFactory, capabilityNotationParser); - private final PluginAccessors paccForPluginAccessors = new PluginAccessors(providers, config); - - @Inject - public LibrariesForLibsInPluginsBlock(DefaultVersionCatalog config, ProviderFactory providers, ObjectFactory objects, ImmutableAttributesFactory attributesFactory, CapabilityNotationParser capabilityNotationParser) { - super(config, providers, objects, attributesFactory, capabilityNotationParser); - } - - /** - * Creates a dependency provider for assertj (org.assertj:assertj-core) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getAssertj() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("assertj"); - } - - /** - * Creates a dependency provider for h2 (com.h2database:h2) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getH2() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("h2"); - } - - /** - * Creates a dependency provider for lombok (org.projectlombok:lombok) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getLombok() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("lombok"); - } - - /** - * Returns the group of libraries at fixture - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public FixtureLibraryAccessors getFixture() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForFixtureLibraryAccessors; - } - - /** - * Returns the group of libraries at jackson - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public JacksonLibraryAccessors getJackson() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForJacksonLibraryAccessors; - } - - /** - * Returns the group of libraries at micrometer - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public MicrometerLibraryAccessors getMicrometer() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForMicrometerLibraryAccessors; - } - - /** - * Returns the group of libraries at mysql - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public MysqlLibraryAccessors getMysql() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForMysqlLibraryAccessors; - } - - /** - * Returns the group of libraries at spring - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public SpringLibraryAccessors getSpring() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForSpringLibraryAccessors; - } - - /** - * Returns the group of libraries at test - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public TestLibraryAccessors getTest() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForTestLibraryAccessors; - } - - /** - * Returns the group of versions at versions - */ - public VersionAccessors getVersions() { - return vaccForVersionAccessors; - } - - /** - * Returns the group of bundles at bundles - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public BundleAccessors getBundles() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return baccForBundleAccessors; - } - - /** - * Returns the group of plugins at plugins - */ - public PluginAccessors getPlugins() { - return paccForPluginAccessors; - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class FixtureLibraryAccessors extends SubDependencyFactory { - private final FixtureMonkeyLibraryAccessors laccForFixtureMonkeyLibraryAccessors = new FixtureMonkeyLibraryAccessors(owner); - - public FixtureLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at fixture.monkey - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public FixtureMonkeyLibraryAccessors getMonkey() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForFixtureMonkeyLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class FixtureMonkeyLibraryAccessors extends SubDependencyFactory { - private final FixtureMonkeyStarterLibraryAccessors laccForFixtureMonkeyStarterLibraryAccessors = new FixtureMonkeyStarterLibraryAccessors(owner); - - public FixtureMonkeyLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at fixture.monkey.starter - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public FixtureMonkeyStarterLibraryAccessors getStarter() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForFixtureMonkeyStarterLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class FixtureMonkeyStarterLibraryAccessors extends SubDependencyFactory { - - public FixtureMonkeyStarterLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for kotlin (com.navercorp.fixturemonkey:fixture-monkey-starter-kotlin) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getKotlin() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("fixture.monkey.starter.kotlin"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class JacksonLibraryAccessors extends SubDependencyFactory { - - public JacksonLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for kotlin (com.fasterxml.jackson.module:jackson-module-kotlin) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getKotlin() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("jackson.kotlin"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class MicrometerLibraryAccessors extends SubDependencyFactory { - private final MicrometerRegistryLibraryAccessors laccForMicrometerRegistryLibraryAccessors = new MicrometerRegistryLibraryAccessors(owner); - private final MicrometerTracingLibraryAccessors laccForMicrometerTracingLibraryAccessors = new MicrometerTracingLibraryAccessors(owner); - - public MicrometerLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at micrometer.registry - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public MicrometerRegistryLibraryAccessors getRegistry() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForMicrometerRegistryLibraryAccessors; - } - - /** - * Returns the group of libraries at micrometer.tracing - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public MicrometerTracingLibraryAccessors getTracing() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForMicrometerTracingLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class MicrometerRegistryLibraryAccessors extends SubDependencyFactory { - - public MicrometerRegistryLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for prometheus (io.micrometer:micrometer-registry-prometheus) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getPrometheus() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("micrometer.registry.prometheus"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class MicrometerTracingLibraryAccessors extends SubDependencyFactory { - private final MicrometerTracingBridgeLibraryAccessors laccForMicrometerTracingBridgeLibraryAccessors = new MicrometerTracingBridgeLibraryAccessors(owner); - - public MicrometerTracingLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at micrometer.tracing.bridge - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public MicrometerTracingBridgeLibraryAccessors getBridge() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForMicrometerTracingBridgeLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class MicrometerTracingBridgeLibraryAccessors extends SubDependencyFactory { - - public MicrometerTracingBridgeLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for brave (io.micrometer:micrometer-tracing-bridge-brave) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getBrave() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("micrometer.tracing.bridge.brave"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class MysqlLibraryAccessors extends SubDependencyFactory { - - public MysqlLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for connector (com.mysql:mysql-connector-j) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getConnector() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("mysql.connector"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class SpringLibraryAccessors extends SubDependencyFactory { - private final SpringBootLibraryAccessors laccForSpringBootLibraryAccessors = new SpringBootLibraryAccessors(owner); - private final SpringCloudLibraryAccessors laccForSpringCloudLibraryAccessors = new SpringCloudLibraryAccessors(owner); - - public SpringLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for context (org.springframework:spring-context) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getContext() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.context"); - } - - /** - * Creates a dependency provider for mockk (com.ninja-squad:springmockk) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getMockk() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.mockk"); - } - - /** - * Returns the group of libraries at spring.boot - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public SpringBootLibraryAccessors getBoot() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForSpringBootLibraryAccessors; - } - - /** - * Returns the group of libraries at spring.cloud - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public SpringCloudLibraryAccessors getCloud() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForSpringCloudLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class SpringBootLibraryAccessors extends SubDependencyFactory { - private final SpringBootConfigurationLibraryAccessors laccForSpringBootConfigurationLibraryAccessors = new SpringBootConfigurationLibraryAccessors(owner); - private final SpringBootStarterLibraryAccessors laccForSpringBootStarterLibraryAccessors = new SpringBootStarterLibraryAccessors(owner); - - public SpringBootLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for dependencies (org.springframework.boot:spring-boot-dependencies) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getDependencies() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.boot.dependencies"); - } - - /** - * Creates a dependency provider for testcontainers (org.springframework.boot:spring-boot-testcontainers) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getTestcontainers() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.boot.testcontainers"); - } - - /** - * Returns the group of libraries at spring.boot.configuration - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public SpringBootConfigurationLibraryAccessors getConfiguration() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForSpringBootConfigurationLibraryAccessors; - } - - /** - * Returns the group of libraries at spring.boot.starter - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public SpringBootStarterLibraryAccessors getStarter() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForSpringBootStarterLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class SpringBootConfigurationLibraryAccessors extends SubDependencyFactory { - - public SpringBootConfigurationLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for processor (org.springframework.boot:spring-boot-configuration-processor) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getProcessor() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.boot.configuration.processor"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class SpringBootStarterLibraryAccessors extends SubDependencyFactory { - private final SpringBootStarterDataLibraryAccessors laccForSpringBootStarterDataLibraryAccessors = new SpringBootStarterDataLibraryAccessors(owner); - - public SpringBootStarterLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for actuator (org.springframework.boot:spring-boot-starter-actuator) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getActuator() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.boot.starter.actuator"); - } - - /** - * Creates a dependency provider for test (org.springframework.boot:spring-boot-starter-test) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getTest() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.boot.starter.test"); - } - - /** - * Creates a dependency provider for web (org.springframework.boot:spring-boot-starter-web) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getWeb() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.boot.starter.web"); - } - - /** - * Returns the group of libraries at spring.boot.starter.data - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public SpringBootStarterDataLibraryAccessors getData() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForSpringBootStarterDataLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class SpringBootStarterDataLibraryAccessors extends SubDependencyFactory { - - public SpringBootStarterDataLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for jpa (org.springframework.boot:spring-boot-starter-data-jpa) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getJpa() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.boot.starter.data.jpa"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class SpringCloudLibraryAccessors extends SubDependencyFactory { - - public SpringCloudLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for dependencies (org.springframework.cloud:spring-cloud-dependencies) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getDependencies() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("spring.cloud.dependencies"); - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class TestLibraryAccessors extends SubDependencyFactory { - private final TestContainersLibraryAccessors laccForTestContainersLibraryAccessors = new TestContainersLibraryAccessors(owner); - - public TestLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Returns the group of libraries at test.containers - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public TestContainersLibraryAccessors getContainers() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForTestContainersLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class TestContainersLibraryAccessors extends SubDependencyFactory { - private final TestContainersJunitLibraryAccessors laccForTestContainersJunitLibraryAccessors = new TestContainersJunitLibraryAccessors(owner); - - public TestContainersLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for mysql (org.testcontainers:mysql) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getMysql() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("test.containers.mysql"); - } - - /** - * Returns the group of libraries at test.containers.junit - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public TestContainersJunitLibraryAccessors getJunit() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return laccForTestContainersJunitLibraryAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class TestContainersJunitLibraryAccessors extends SubDependencyFactory { - - public TestContainersJunitLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for jupiter (org.testcontainers:junit-jupiter) - * This dependency was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getJupiter() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return create("test.containers.junit.jupiter"); - } - - } - - public static class VersionAccessors extends VersionFactory { - - private final FixtureVersionAccessors vaccForFixtureVersionAccessors = new FixtureVersionAccessors(providers, config); - private final KtlintVersionAccessors vaccForKtlintVersionAccessors = new KtlintVersionAccessors(providers, config); - private final SpringVersionAccessors vaccForSpringVersionAccessors = new SpringVersionAccessors(providers, config); - private final TestVersionAccessors vaccForTestVersionAccessors = new TestVersionAccessors(providers, config); - public VersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: assertj (3.24.2) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getAssertj() { return getVersion("assertj"); } - - /** - * Returns the version associated to this alias: junit (5.9.3) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getJunit() { return getVersion("junit"); } - - /** - * Returns the version associated to this alias: kotlin (1.9.21) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getKotlin() { return getVersion("kotlin"); } - - /** - * Returns the version associated to this alias: lombok (1.18.22) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getLombok() { return getVersion("lombok"); } - - /** - * Returns the version associated to this alias: redisson (3.25.2) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getRedisson() { return getVersion("redisson"); } - - /** - * Returns the group of versions at versions.fixture - */ - public FixtureVersionAccessors getFixture() { - return vaccForFixtureVersionAccessors; - } - - /** - * Returns the group of versions at versions.ktlint - */ - public KtlintVersionAccessors getKtlint() { - return vaccForKtlintVersionAccessors; - } - - /** - * Returns the group of versions at versions.spring - */ - public SpringVersionAccessors getSpring() { - return vaccForSpringVersionAccessors; - } - - /** - * Returns the group of versions at versions.test - */ - public TestVersionAccessors getTest() { - return vaccForTestVersionAccessors; - } - - } - - public static class FixtureVersionAccessors extends VersionFactory { - - public FixtureVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: fixture.monkey (1.0.13) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getMonkey() { return getVersion("fixture.monkey"); } - - } - - public static class KtlintVersionAccessors extends VersionFactory { - - public KtlintVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: ktlint.plugin (11.6.1) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getPlugin() { return getVersion("ktlint.plugin"); } - - } - - public static class SpringVersionAccessors extends VersionFactory { - - private final SpringCloudVersionAccessors vaccForSpringCloudVersionAccessors = new SpringCloudVersionAccessors(providers, config); - private final SpringIoVersionAccessors vaccForSpringIoVersionAccessors = new SpringIoVersionAccessors(providers, config); - public SpringVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: spring.boot (3.2.0) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getBoot() { return getVersion("spring.boot"); } - - /** - * Returns the version associated to this alias: spring.mockk (4.0.2) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getMockk() { return getVersion("spring.mockk"); } - - /** - * Returns the group of versions at versions.spring.cloud - */ - public SpringCloudVersionAccessors getCloud() { - return vaccForSpringCloudVersionAccessors; - } - - /** - * Returns the group of versions at versions.spring.io - */ - public SpringIoVersionAccessors getIo() { - return vaccForSpringIoVersionAccessors; - } - - } - - public static class SpringCloudVersionAccessors extends VersionFactory { - - public SpringCloudVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: spring.cloud.dependencies (2023.0.0) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getDependencies() { return getVersion("spring.cloud.dependencies"); } - - } - - public static class SpringIoVersionAccessors extends VersionFactory { - - private final SpringIoDependencyVersionAccessors vaccForSpringIoDependencyVersionAccessors = new SpringIoDependencyVersionAccessors(providers, config); - public SpringIoVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the group of versions at versions.spring.io.dependency - */ - public SpringIoDependencyVersionAccessors getDependency() { - return vaccForSpringIoDependencyVersionAccessors; - } - - } - - public static class SpringIoDependencyVersionAccessors extends VersionFactory { - - public SpringIoDependencyVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: spring.io.dependency.management (1.1.0) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getManagement() { return getVersion("spring.io.dependency.management"); } - - } - - public static class TestVersionAccessors extends VersionFactory { - - public TestVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Returns the version associated to this alias: test.containers (1.19.3) - * If the version is a rich version and that its not expressible as a - * single version string, then an empty string is returned. - * This version was declared in catalog libs.versions.toml - */ - public Provider getContainers() { return getVersion("test.containers"); } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class BundleAccessors extends BundleFactory { - private final TestcontainersBundleAccessors baccForTestcontainersBundleAccessors = new TestcontainersBundleAccessors(objects, providers, config, attributesFactory, capabilityNotationParser); - - public BundleAccessors(ObjectFactory objects, ProviderFactory providers, DefaultVersionCatalog config, ImmutableAttributesFactory attributesFactory, CapabilityNotationParser capabilityNotationParser) { super(objects, providers, config, attributesFactory, capabilityNotationParser); } - - /** - * Returns the group of bundles at bundles.testcontainers - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public TestcontainersBundleAccessors getTestcontainers() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return baccForTestcontainersBundleAccessors; - } - - } - - /** - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public static class TestcontainersBundleAccessors extends BundleFactory { - - public TestcontainersBundleAccessors(ObjectFactory objects, ProviderFactory providers, DefaultVersionCatalog config, ImmutableAttributesFactory attributesFactory, CapabilityNotationParser capabilityNotationParser) { super(objects, providers, config, attributesFactory, capabilityNotationParser); } - - /** - * Creates a dependency bundle provider for testcontainers.mysql which is an aggregate for the following dependencies: - *
    - *
  • org.testcontainers:mysql
  • - *
  • org.springframework.boot:spring-boot-testcontainers
  • - *
  • org.testcontainers:junit-jupiter
  • - *
  • org.springframework.boot:spring-boot-starter-test
  • - *
- * This bundle was declared in catalog libs.versions.toml - * @deprecated Will be removed in Gradle 9.0. - */ - @Deprecated - public Provider getMysql() { - org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser(); - return createBundle("testcontainers.mysql"); - } - - } - - public static class PluginAccessors extends PluginFactory { - private final KotlinPluginAccessors paccForKotlinPluginAccessors = new KotlinPluginAccessors(providers, config); - private final SpringPluginAccessors paccForSpringPluginAccessors = new SpringPluginAccessors(providers, config); - - public PluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for ktlint to the plugin id 'org.jlleitschuh.gradle.ktlint' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getKtlint() { return createPlugin("ktlint"); } - - /** - * Returns the group of plugins at plugins.kotlin - */ - public KotlinPluginAccessors getKotlin() { - return paccForKotlinPluginAccessors; - } - - /** - * Returns the group of plugins at plugins.spring - */ - public SpringPluginAccessors getSpring() { - return paccForSpringPluginAccessors; - } - - } - - public static class KotlinPluginAccessors extends PluginFactory { - - public KotlinPluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for kotlin.jpa to the plugin id 'org.jetbrains.kotlin.plugin.jpa' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getJpa() { return createPlugin("kotlin.jpa"); } - - /** - * Creates a plugin provider for kotlin.jvm to the plugin id 'org.jetbrains.kotlin.jvm' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getJvm() { return createPlugin("kotlin.jvm"); } - - /** - * Creates a plugin provider for kotlin.kapt to the plugin id 'org.jetbrains.kotlin.kapt' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getKapt() { return createPlugin("kotlin.kapt"); } - - /** - * Creates a plugin provider for kotlin.spring to the plugin id 'org.jetbrains.kotlin.plugin.spring' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getSpring() { return createPlugin("kotlin.spring"); } - - } - - public static class SpringPluginAccessors extends PluginFactory { - private final SpringDependencyPluginAccessors paccForSpringDependencyPluginAccessors = new SpringDependencyPluginAccessors(providers, config); - - public SpringPluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for spring.boot to the plugin id 'org.springframework.boot' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getBoot() { return createPlugin("spring.boot"); } - - /** - * Returns the group of plugins at plugins.spring.dependency - */ - public SpringDependencyPluginAccessors getDependency() { - return paccForSpringDependencyPluginAccessors; - } - - } - - public static class SpringDependencyPluginAccessors extends PluginFactory { - - public SpringDependencyPluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - /** - * Creates a plugin provider for spring.dependency.management to the plugin id 'io.spring.dependency-management' - * This plugin was declared in catalog libs.versions.toml - */ - public Provider getManagement() { return createPlugin("spring.dependency.management"); } - - } - -} diff --git a/.gradle/8.4/dependencies-accessors/dependencies-accessors.lock b/.gradle/8.4/dependencies-accessors/dependencies-accessors.lock deleted file mode 100644 index 3cc26d0..0000000 Binary files a/.gradle/8.4/dependencies-accessors/dependencies-accessors.lock and /dev/null differ diff --git a/.gradle/8.4/dependencies-accessors/executionHistory.bin b/.gradle/8.4/dependencies-accessors/executionHistory.bin deleted file mode 100644 index 27d8949..0000000 Binary files a/.gradle/8.4/dependencies-accessors/executionHistory.bin and /dev/null differ diff --git a/.gradle/8.4/dependencies-accessors/gc.properties b/.gradle/8.4/dependencies-accessors/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/8.4/executionHistory/executionHistory.bin b/.gradle/8.4/executionHistory/executionHistory.bin deleted file mode 100644 index f184a39..0000000 Binary files a/.gradle/8.4/executionHistory/executionHistory.bin and /dev/null differ diff --git a/.gradle/8.4/executionHistory/executionHistory.lock b/.gradle/8.4/executionHistory/executionHistory.lock deleted file mode 100644 index bf86c5c..0000000 Binary files a/.gradle/8.4/executionHistory/executionHistory.lock and /dev/null differ diff --git a/.gradle/8.4/fileChanges/last-build.bin b/.gradle/8.4/fileChanges/last-build.bin deleted file mode 100644 index f76dd23..0000000 Binary files a/.gradle/8.4/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/8.4/fileHashes/fileHashes.bin b/.gradle/8.4/fileHashes/fileHashes.bin deleted file mode 100644 index f253b9a..0000000 Binary files a/.gradle/8.4/fileHashes/fileHashes.bin and /dev/null differ diff --git a/.gradle/8.4/fileHashes/fileHashes.lock b/.gradle/8.4/fileHashes/fileHashes.lock deleted file mode 100644 index 925f3b2..0000000 Binary files a/.gradle/8.4/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/8.4/fileHashes/resourceHashesCache.bin b/.gradle/8.4/fileHashes/resourceHashesCache.bin deleted file mode 100644 index 8640beb..0000000 Binary files a/.gradle/8.4/fileHashes/resourceHashesCache.bin and /dev/null differ diff --git a/.gradle/8.4/gc.properties b/.gradle/8.4/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index 0e8225d..0000000 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index 2906097..0000000 --- a/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Tue Aug 12 21:46:29 KST 2025 -gradle.version=8.4 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index 639ae45..0000000 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe deleted file mode 100644 index 2051ecf..0000000 Binary files a/.gradle/file-system.probe and /dev/null differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md new file mode 100644 index 0000000..35ccde3 --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +## 동시성 제어 분석 보고서 +### 현재 적용안 (단일 JVM 기준) +#### Per-User Lock (ConcurrentHashMap + ReentrantLock) +- 아이디어: userId → ReentrantLock 매핑으로 같은 사용자 요청만 직렬화. 다른 사용자끼리는 병렬 허용 +- 핵심 순서: 검증 → 조회 → 계산 → 업데이트 → 이력 +- 오류 처리: 업데이트 실패 시 이력 기록 금지(순서상 불가능) + +```java +// 요지 코드 +private final ConcurrentHashMap userLocks = new ConcurrentHashMap<>(); + +private ReentrantLock lockOf(long userId) { + return userLocks.computeIfAbsent(userId, k -> new ReentrantLock(true)); // 공정 락 +} + +public 메서드 () { + // 예시 사용 + ReentrantLock lock = lockOf(userId); + lock.lock(); + + try { + ... // 검증, 조회, 계산, 업데이트 + }finally { + try { + releaseIfIdle(userId, lock); + } finally { + lock.unlock(); + } + } +} +``` + +### 구조 +```mermaid +flowchart LR + API[REST API] --> Svc[PointService] + subgraph PointService + Dir{userId별 Lock} --> CS[(임계구역)] + end + CS --> DBT1[UserPointTable] + CS --> DBT2[PointHistoryTable] +``` + +### 대안 +| 방식 | 장점 | 단점 | 적용 시점 | +| -------------------------------------- | -------------------------------- | -------------------------- | ------------------ | +| **ConcurrentHashMap + ReentrantLock** | 구현 간단, 빠름, 단일 JVM에 적합 | 멀티 인스턴스에선 무력 | **현재** (개발/단일 서버) | +| **DB 비관적 락 (`SELECT … FOR UPDATE`)** | 분산 환경에서 안전, 단일 소스오브트루스 | DB 부하↑, 지연↑ | 다중 인스턴스, 강한 일관성 필요 | +| **DB 낙관적 락(버전 필드)** | 충돌 적을 때 성능 좋음 | 충돌 시 재시도 필요 | 중간 QPS, 경쟁 낮은 패턴 | +| **원자 쿼리(증감)** | 간결(UPDATE SET point = point + ?) | 복합 로직(이력/검증)엔 부족 | 단순 카운터/캐시성 | +| **Redis 분산 락 (e.g., RedLock)** | 분산 환경 전용, 유연 | Redis 운영/가용성 고려, TTL/해제 이슈 | 수평 확장, DB 락 회피 시 | +| **메시지 큐 직렬화(Kafka partition by user)** | 자연스러운 직렬화/백프레셔 | 실시간성↓, 구조 복잡 | 트래픽↑, 일괄 처리 선호 | + + +### 개선 +1. 읽기 → 무락 유지(스냅샷 허용), 쓰기 → 분산락/DB락 +2. 단기: DB 비관락으로 포팅 (가장 단순/확실) +3. 장기: 트래픽 패턴 따라 선택 + - 낙관락 + 재시도 (경쟁 낮음) + - Redis 락 (경쟁 중간, DB 부하 회피) + - Kafka 파티션 (고QPS/백프레셔 필요) + +### 결론 +- 현재: 단일 JVM에서 Per-User Lock이 가장 단순하고 빠른 해법 +- 확장: 멀티 인스턴스 전환 시 DB 락/낙관락, Redis 락, Kafka 파티션 중 업무 특성에 맞게 선택 +- 테스트/모니터링/멱등성까지 갖추면 운영 안정성이 크게 향상 + +### 느낀 점 (회고 / Lessons Learned) +- Per-User 락은 단일 JVM에서 정확성·단순성·성능의 균형이 좋다. +- 업데이트 → 이력, 산술 안전, 락 해제 보장, 상태 기반 테스트는 필수 베스트 프랙티스. +- 트래픽/배포 구조가 커지면 분산 락/DB 트랜잭션/큐 직렬화로 자연스럽게 승격하자. \ No newline at end of file diff --git a/build/resources/main/application.yml b/build/resources/main/application.yml deleted file mode 100644 index d2d5cc5..0000000 --- a/build/resources/main/application.yml +++ /dev/null @@ -1,2 +0,0 @@ -spring: - application.name: hhplus-tdd \ No newline at end of file diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index 707cb86..0000000 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and /dev/null differ diff --git a/src/main/java/io/hhplus/tdd/point/PointController.java b/src/main/java/io/hhplus/tdd/point/PointController.java index 215eabb..55ea25c 100644 --- a/src/main/java/io/hhplus/tdd/point/PointController.java +++ b/src/main/java/io/hhplus/tdd/point/PointController.java @@ -1,5 +1,7 @@ package io.hhplus.tdd.point; +import io.hhplus.tdd.database.UserPointTable; +import lombok.RequiredArgsConstructor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; @@ -8,9 +10,11 @@ @RestController @RequestMapping("/point") +@RequiredArgsConstructor public class PointController { private static final Logger log = LoggerFactory.getLogger(PointController.class); + private final PointService pointService; /** * TODO - 특정 유저의 포인트를 조회하는 기능을 작성해주세요. @@ -19,7 +23,7 @@ public class PointController { public UserPoint point( @PathVariable long id ) { - return new UserPoint(0, 0, 0); + return pointService.getUserPoint(id); } /** @@ -29,7 +33,7 @@ public UserPoint point( public List history( @PathVariable long id ) { - return List.of(); + return pointService.getPointHistory(id); } /** @@ -40,7 +44,7 @@ public UserPoint charge( @PathVariable long id, @RequestBody long amount ) { - return new UserPoint(0, 0, 0); + return pointService.charge(id, amount); } /** @@ -51,6 +55,6 @@ public UserPoint use( @PathVariable long id, @RequestBody long amount ) { - return new UserPoint(0, 0, 0); + return pointService.use(id, amount); } } diff --git a/src/main/java/io/hhplus/tdd/point/PointService.java b/src/main/java/io/hhplus/tdd/point/PointService.java new file mode 100644 index 0000000..6bb303a --- /dev/null +++ b/src/main/java/io/hhplus/tdd/point/PointService.java @@ -0,0 +1,39 @@ +package io.hhplus.tdd.point; + +import java.util.List; + +public interface PointService { + /** + * 포인트 충전 + * + * @param userId 사용자 ID + * @param amount 충전할 포인트 금액 + * @return 충전된 포인트 정보 + */ + UserPoint charge(long userId, long amount); + + /** + * 포인트 사용 + * + * @param userId 사용자 ID + * @param amount 사용할 포인트 금액 + * @return 사용된 포인트 정보 + */ + UserPoint use(long userId, long amount); + + /** + * 사용자 포인트 조회 + * + * @param userId 사용자 ID + * @return 사용자 포인트 정보 + */ + UserPoint getUserPoint(long userId); + + /** + * 포인트 이력 조회 + * + * @param userId 사용자 ID + * @return 포인트 이력 정보 + */ + List getPointHistory(long userId); +} diff --git a/src/main/java/io/hhplus/tdd/point/PointServiceImpl.java b/src/main/java/io/hhplus/tdd/point/PointServiceImpl.java new file mode 100644 index 0000000..3a7b8ac --- /dev/null +++ b/src/main/java/io/hhplus/tdd/point/PointServiceImpl.java @@ -0,0 +1,180 @@ +package io.hhplus.tdd.point; + +import io.hhplus.tdd.database.PointHistoryTable; +import io.hhplus.tdd.database.UserPointTable; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.locks.ReentrantLock; + +@Service +@Slf4j +@RequiredArgsConstructor +public class PointServiceImpl implements PointService { + private final UserPointTable userPointTable; + private final PointHistoryTable pointHistoryTable; + + // userId -> Lock 매핑 (공정 락: 대기 순서 보장) + private final ConcurrentHashMap userLocks = new ConcurrentHashMap<>(); + + private ReentrantLock lockOf(long userId) { + return userLocks.computeIfAbsent(userId, k -> new ReentrantLock(true)); + } + + private void releaseIfIdle(long userId, ReentrantLock lock) { + // 대기 스레드가 없으면 맵에서 제거(메모리 누수 완화) + if (!lock.hasQueuedThreads()) { + userLocks.remove(userId, lock); + } + } + + @Override + public UserPoint charge(long userId, long amount) { + /** + * 진행 프로세스 + * 1. 유저 ID와 충전 금액이 유효한지 검증 + * 2. 기존 포인트 조회 + * 3. 기존 포인트가 없으면 새로 생성 + * 4. 포인트 이력 추가 + * 5. 포인트 충전 + */ + validateUserId(userId); + validatePositiveAmount(amount); + + ReentrantLock lock = lockOf(userId); + lock.lock(); + try { + // 기존 포인트에 더하기 + UserPoint existingUserPoint = userPointTable.selectById(userId); + if (existingUserPoint == null) { + // 기존 포인트가 없으면 새로 생성 + existingUserPoint = UserPoint.empty(userId); + } + + long newAmount = existingUserPoint.point() + amount; + + // 포인트 충전 + log.info("[charge] User ID: {}, Amount to Charge: {}, Existing Point: {}", userId, amount, existingUserPoint.point()); + + UserPoint userPoint = userPointTable.insertOrUpdate(userId, newAmount); + + if (userPoint == null) { + throw new IllegalStateException("Failed to charge user point for user ID: " + userId); + } + // 포인트 이력 추가 + pointHistoryTable.insert(userId, amount, TransactionType.CHARGE, System.currentTimeMillis()); + + // 최종 결과 로그 + log.info("[charge] User ID: {}, Charged Amount: {}, New Point Balance: {}", userId, amount, userPoint.point()); + return userPoint; + } finally { + try { + releaseIfIdle(userId, lock); + } finally { + lock.unlock(); + } + } + } + + @Override + public UserPoint use(long userId, long amount) { + /** + * 진행 프로세스 + * 1. 유저 ID와 충전 금액이 유효한지 검증 + * 2. 기존 포인트 조회 + * 3. 기존 포인트가 없으면 새로 생성 + * 4. 포인트 이력 추가 + * 5. 포인트 차감 + */ + validateUserId(userId); + validatePositiveAmount(amount); + + ReentrantLock lock = lockOf(userId); + lock.lock(); + + try { + // 기존 포인트 조회 + UserPoint userPoint = userPointTable.selectById(userId); + // 기존 포인트가 없으면 새로 생성 + if (userPoint == null) { + userPoint = UserPoint.empty(userId); + } + + if (userPoint == null) { + throw new IllegalStateException("User point not found for user ID: " + userId); + } + + if (userPoint.point() < amount) { + throw new IllegalStateException("Insufficient points for user ID: " + userId); + } + + long newPoint = userPoint.point() - amount; + // 포인트가 음수로 떨어지지 않도록 검증 (잔고가 부족할 경우 예외 발생) + if (newPoint < 0) { + throw new IllegalStateException("New point balance cannot be negative for user ID: " + userId); + } + + // 포인트 이력 추가 + pointHistoryTable.insert(userId, amount, TransactionType.USE, System.currentTimeMillis()); + + // 포인트 차감 + log.info("[use] User ID: {}, Amount to Use: {}, Existing Point: {}", userId, amount, userPoint.point()); + + UserPoint result = userPointTable.insertOrUpdate(userId, newPoint); + + // 최종 결과 로그 + log.info("[use] User ID: {}, Used Amount: {}, New Point Balance: {}", userId, amount, result.point()); + return result; + } finally { + try { + releaseIfIdle(userId, lock); + } finally { + lock.unlock(); + } + } + } + + @Override + public UserPoint getUserPoint(long userId) { + validateUserId(userId); + + UserPoint userPoint = userPointTable.selectById(userId); + + if (userPoint == null) { + userPoint = UserPoint.empty(userId); + } + + // 최종 결과 로그 + log.info("[getUserPoint] User ID: {}, Current Point Balance: {}", userId, userPoint.point()); + return userPoint; + } + + @Override + public List getPointHistory(long userId) { + validateUserId(userId); + + List histories = pointHistoryTable.selectAllByUserId(userId); + + if (histories == null || histories.isEmpty()) { + return List.of(); + } + + // 최종 결과 로그 + log.info("[getPointHistory] User ID: {}, Point History Count: {}", userId, histories.size()); + // 각 이력 로그 + histories.forEach(history -> log.info("[getPointHistory] History ID: {}, Amount: {}, Type: {}, Updated At: {}", + history.id(), history.amount(), history.type(), history.updateMillis())); + return histories; + } + + private void validateUserId(long userId) { + if (userId <= 0) throw new IllegalArgumentException("User ID must be greater than 0"); + } + private void validatePositiveAmount(long amount) { + if (amount <= 0) throw new IllegalArgumentException("Amount must be greater than 0"); + } +} diff --git a/src/test/java/io/hhplus/tdd/point/PointServiceTest.java b/src/test/java/io/hhplus/tdd/point/PointServiceTest.java new file mode 100644 index 0000000..7f7a112 --- /dev/null +++ b/src/test/java/io/hhplus/tdd/point/PointServiceTest.java @@ -0,0 +1,733 @@ +package io.hhplus.tdd.point; + +import io.hhplus.tdd.database.PointHistoryTable; +import io.hhplus.tdd.database.UserPointTable; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.InOrder; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.List; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.*; + +// 테스트 +// 행위, 상태 2가지 +// 테스트 메서드명 (given_when_then 명명 규칙) + +/** + * TDD의 기본 사이클 (Red-Green-Refactor) + * + * Red: 실패하는 테스트를 먼저 작성 (요구사항을 명확히 이해하고, 실패하는 테스트 케이스를 작성) + * Green: 테스트를 통과하는 최소한의 코드 작성 + * Refactor: 코드를 개선하고 리팩토링 + */ +@ExtendWith(MockitoExtension.class) +@DisplayName("PointServiceImpl 단위 테스트") +class PointServiceTest { + /** + * 실제 구현체를 사용한 통합 테스트용 서비스 인스턴스 생성 + * Mock 없이 실제 데이터베이스 테이블을 사용하여 전체 플로우 검증 + */ + private PointService newService() { + return new PointServiceImpl(new UserPointTable(), new PointHistoryTable()); + } + + @Nested + @DisplayName("Red-Green-Refactor") + class RedGreenRefactor { +// Red + /** + * [작성 이유] + * 가장 기본적인 조회 기능의 정상 동작을 검증 + * 신규 사용자의 경우 0 포인트로 초기화되는지 확인 + * + * [검증 내용] + * - UserPoint 객체가 null이 아님 + * - 올바른 userId 반환 + * - 신규 사용자의 포인트는 0 + */ + @Test + @DisplayName("given_유효한사용자_when_getUserPoint_then_빈유저_0포인트반환") + void givenValidUserId_whenGetUserPoint_thenReturnEmptyUserWithZeroPoint() { + // given: 유효한 사용자 ID + Long userId = 1L; + PointService pointService = newService(); + + // when: 사용자 포인트 조회 + UserPoint userPoint = pointService.getUserPoint(userId); + + // then + assertNotNull(userPoint); + assertEquals(userId, userPoint.id()); + assertEquals(0L, userPoint.point(), "신규 유저는 0 포인트여야 함"); + } + + /** + * [작성 이유] + * 포인트 충전의 핵심 기능 검증 + * 충전 후 잔액 증가와 이력 기록이 정상적으로 이루어지는지 확인 + * + * [검증 내용] + * - 충전 후 포인트가 정확히 증가 + * - 충전 이력이 1건 기록됨 + * - 이력의 타입이 CHARGE + * - 이력의 금액이 정확함 + */ + @Test + @DisplayName("given_유효금액충전_when_charge_then_포인트증가와_히스토리1건기록") + void givenValidAmount_whenChargePoint_thenPointIncreased_andHistoryRecorded() { + // given: 유저 ID와 충전 금액 + long userId = 2L; + long chargeAmount = 100L; + PointService pointService = newService(); + + // when: 포인트 충전 수행 + UserPoint result = pointService.charge(userId, chargeAmount); + + // then: 결과가 null이 아니어야 함 + // 추가적으로 balance 증가 여부 검증 가능 + assertNotNull(result); + assertEquals(chargeAmount, result.point()); + List history = pointService.getPointHistory(userId); + assertEquals(1, history.size()); + assertEquals(TransactionType.CHARGE, history.get(0).type()); + assertEquals(chargeAmount, history.get(0).amount()); + } + + /** + * [작성 이유] + * 포인트 사용 기능의 정상 동작 검증 + * 충분한 잔액이 있을 때 포인트 차감이 올바르게 동작하는지 확인 + * + * [검증 내용] + * - 사용 후 잔액이 정확히 차감됨 + * - 충전과 사용 이력이 모두 누적 기록됨 + * - 각 이력의 타입과 금액이 정확함 + */ + @Test + @DisplayName("given_충전선행_when_use_then_잔액차감과_히스토리누적") + void givenSufficientBalance_whenUsePoint_thenPointDecreased_andHistoryRecorded() { + // given: 유저 ID, 초기 충전 포인트, 사용 포인트 + Long userId = 1L; + long initialPoint = 1000L; + long useAmount = 500L; + PointService pointService = newService(); + pointService.charge(userId, initialPoint); + + // when + UserPoint result = pointService.use(userId, useAmount); + + // then + assertEquals(initialPoint - useAmount, result.point()); + List history = pointService.getPointHistory(userId); + assertEquals(2, history.size()); + assertEquals(TransactionType.CHARGE, history.get(0).type()); + assertEquals(TransactionType.USE, history.get(1).type()); + assertEquals(useAmount, history.get(1).amount()); + } + + /** + * [작성 이유] + * 이력 조회 기능의 기본 동작 검증 + * 아직 거래 내역이 없는 사용자의 경우 빈 리스트 반환 확인 + * + * [검증 내용] + * - null이 아닌 List 객체 반환 + * - 빈 리스트인지 확인 + */ + @Test + @DisplayName("given_유효사용자_when_getPointHistory_then_비어있으면_빈리스트반환") + void givenValidUserId_whenGetPointHistory_thenReturnEmptyListIfNoHistory() { + // given: 유효한 사용자 ID + Long userId = 1L; + PointService pointService = newService(); + + // when: 포인트 이력 조회 + List history = pointService.getPointHistory(userId); + + // then: null이 아닌 리스트가 반환되는지 검증 + assertNotNull(history); + assertTrue(history.isEmpty()); + } + + /** + * [작성 이유] + * 여러 번 충전 시 포인트가 누적되는지 검증 + * 연속적인 충전 작업의 정확성 확인 + * + * [검증 내용] + * - 두 번의 충전이 누적되어 총합이 정확함 + * - 두 건의 이력이 모두 기록됨 + */ + @Test + @DisplayName("given_두번충전_when_charge_then_누적합산반영") + void givenTwoCharges_when_charge_then_balanceIsAccumulated() { + long userId = 5L; + PointService service = newService(); + + service.charge(userId, 200L); + UserPoint afterSecond = service.charge(userId, 300L); + + assertEquals(500L, afterSecond.point()); + assertEquals(2, service.getPointHistory(userId).size()); + } + + /** + * [작성 이유] + * 경계값 테스트 - 잔액을 정확히 모두 사용하는 경우 + * 잔액이 0이 되는 상황에서의 정상 동작 확인 + * + * [검증 내용] + * - 잔액을 모두 사용한 후 0포인트가 됨 + */ + @Test + @DisplayName("given_정확히잔액만큼사용_when_use_then_잔액0") + void givenUseExactlyBalance_when_use_then_balanceBecomesZero() { + long userId = 6L; + PointService service = newService(); + service.charge(userId, 700L); + + UserPoint result = service.use(userId, 700L); + + assertEquals(0L, result.point()); + } + + /** + * [작성 이유] + * 예외 상황 테스트 - 잔액 부족 시 예외 발생 확인 + * 비즈니스 규칙(잔액 부족 시 사용 불가) 검증 + * + * [검증 내용] + * - IllegalStateException 발생 + * - 실패한 거래의 이력이 기록되지 않음 (데이터 일관성) + */ + @Test + @DisplayName("given_잔액부족_when_use_then_IllegalStateException_발생하고_히스토리미기록") + void givenInsufficientBalance_when_use_then_throwAndNoHistoryAdded() { + long userId = 7L; + PointService service = newService(); + + // 잔액 없이 사용 시도 + assertThrows(IllegalStateException.class, () -> service.use(userId, 50L)); + + // then: 히스토리는 비어 있어야 함 (현재 구현은 잔액 검증 후 이력 기록이므로 안전) + assertTrue(service.getPointHistory(userId).isEmpty()); + } + } + + @Nested + @DisplayName("Mock 기반 행위 검증") + class BehaviorWithMock { + @Mock + UserPointTable userPointTable; + @Mock + PointHistoryTable pointHistoryTable; + + @InjectMocks + PointServiceImpl sut; // System Under Test + + /** + * [작성 이유] + * 충전 기능의 내부 동작 순서와 파라미터 정확성 검증 + * Mock을 통해 의존성 호출 순서와 전달되는 값들을 세밀하게 검증 + * + * [검증 내용] + * - 메서드 호출 순서: select → historyInsert → upsert + * - 전달되는 파라미터의 정확성 + * - 시간 값이 유효한 범위에 있는지 확인 + */ + @Test + @DisplayName("given_기존포인트없음_when_charge_then_select→historyInsert→upsert_순서호출과_정확한파라미터") + void given_noExistingPoint_when_charge_then_callsInOrder_and_withCorrectArgs() { + long userId = 10L; + long amount = 500L; + + given(userPointTable.selectById(userId)).willReturn(null); + given(userPointTable.insertOrUpdate(userId, amount)) + .willReturn(new UserPoint(userId, amount, System.currentTimeMillis())); + + UserPoint result = sut.charge(userId, amount); + + assertNotNull(result); + assertEquals(amount, result.point()); + + InOrder inOrder = inOrder(userPointTable, pointHistoryTable); + inOrder.verify(userPointTable).selectById(userId); + inOrder.verify(pointHistoryTable).insert(eq(userId), eq(amount), eq(TransactionType.CHARGE), anyLong()); + inOrder.verify(userPointTable).insertOrUpdate(userId, amount); + + ArgumentCaptor time = ArgumentCaptor.forClass(Long.class); + verify(pointHistoryTable).insert(eq(userId), eq(amount), eq(TransactionType.CHARGE), time.capture()); + assertTrue(time.getValue() > 0); + } + + /** + * [작성 이유] + * 사용 기능의 내부 동작과 차감 로직 검증 + * 기존 잔액에서 사용 금액을 차감한 값이 정확히 업데이트되는지 확인 + * + * [검증 내용] + * - 메서드 호출 순서가 올바름 + * - 차감된 잔액이 정확히 계산되어 업데이트됨 + */ + @Test + @DisplayName("given_충분한잔액_when_use_then_select→historyInsert→upsert_순서호출과_차감값반영") + void given_sufficientBalance_when_use_then_callsInOrder_and_decreasedBalanceUpserted() { + long userId = 11L; + long current = 800L; + long use = 300L; + long expected = current - use; + + given(userPointTable.selectById(userId)) + .willReturn(new UserPoint(userId, current, System.currentTimeMillis())); + given(userPointTable.insertOrUpdate(userId, expected)) + .willReturn(new UserPoint(userId, expected, System.currentTimeMillis())); + + UserPoint result = sut.use(userId, use); + + assertEquals(expected, result.point()); + + InOrder inOrder = inOrder(userPointTable, pointHistoryTable); + inOrder.verify(userPointTable).selectById(userId); + inOrder.verify(pointHistoryTable).insert(eq(userId), eq(use), eq(TransactionType.USE), anyLong()); + inOrder.verify(userPointTable).insertOrUpdate(userId, expected); + } + + /** + * [작성 이유] + * 조회 기능의 내부 동작 검증 + * 존재하지 않는 사용자에 대한 처리가 올바른지 확인 + * + * [검증 내용] + * - selectById 메서드가 정확히 1번 호출됨 + * - null 반환 시 빈 UserPoint 객체 생성 + * - 불필요한 추가 호출이 없음 + */ + @Test + @DisplayName("given_존재하지않는유저_when_getUserPoint_then_select호출되고_empty반환") + void given_absentUser_when_getUserPoint_then_selectCalled_and_returnsEmpty() { + long userId = 12L; + given(userPointTable.selectById(userId)).willReturn(null); + + UserPoint up = sut.getUserPoint(userId); + + assertNotNull(up); + assertEquals(0L, up.point()); + verify(userPointTable, times(1)).selectById(userId); + verifyNoMoreInteractions(userPointTable); + } + + /** + * [작성 이유] + * 이력 조회 기능의 내부 동작 검증 + * 이력이 없는 경우의 처리 로직 확인 + * + * [검증 내용] + * - selectAllByUserId 메서드가 호출됨 + * - null 반환 시 빈 리스트로 변환 + */ + @Test + @DisplayName("given_이력없음_when_getPointHistory_then_selectAllByUserId호출후_빈리스트반환") + void given_noHistory_when_getPointHistory_then_callsSelectAll_and_returnsEmptyList() { + long userId = 13L; + given(pointHistoryTable.selectAllByUserId(userId)).willReturn(null); + + List histories = sut.getPointHistory(userId); + + assertNotNull(histories); + assertTrue(histories.isEmpty()); + verify(pointHistoryTable).selectAllByUserId(userId); + } + } + + @Nested + @DisplayName("Stub 기반 상태 검증") + class StateWithStub { + @Mock + UserPointTable userPointTable; + @Mock + PointHistoryTable pointHistoryTable; + @InjectMocks + PointServiceImpl sut; + + /** + * [작성 이유] + * 기존 잔액에 추가 충전 시 누적 계산의 정확성 검증 + * Mock을 통해 특정 상태를 설정하고 결과값만 검증 + * + * [검증 내용] + * - 1000 + 500 = 1500의 정확한 계산 + */ + @Test + @DisplayName("given_기존잔액1000_when_charge500_then_1500반환") + void given_current1000_when_charge500_then_returns1500() { + long userId = 20L; + long current = 1_000L; + long charge = 500L; + long expected = 1_500L; + + given(userPointTable.selectById(userId)) + .willReturn(new UserPoint(userId, current, System.currentTimeMillis())); + given(userPointTable.insertOrUpdate(userId, expected)) + .willReturn(new UserPoint(userId, expected, System.currentTimeMillis())); + + UserPoint result = sut.charge(userId, charge); + + assertEquals(expected, result.point()); + } + + /** + * [작성 이유] + * 포인트 사용 시 차감 계산의 정확성 검증 + * 특정 잔액에서 특정 금액 차감 후 결과 확인 + * + * [검증 내용] + * - 1000 - 400 = 600의 정확한 계산 + */ + @Test + @DisplayName("given_현재잔액1000_when_use400_then_600반환") + void given_current1000_when_use400_then_returns600() { + long userId = 21L; + long current = 1_000L; + long use = 400L; + long expected = 600L; + + given(userPointTable.selectById(userId)) + .willReturn(new UserPoint(userId, current, System.currentTimeMillis())); + given(userPointTable.insertOrUpdate(userId, expected)) + .willReturn(new UserPoint(userId, expected, System.currentTimeMillis())); + + UserPoint result = sut.use(userId, use); + + assertEquals(expected, result.point()); + } + + /** + * [작성 이유] + * 이력 조회에서 빈 결과 처리 검증 + * 데이터베이스에서 빈 리스트가 반환되는 경우의 처리 + * + * [검증 내용] + * - 빈 리스트가 올바르게 반환됨 + */ + @Test + @DisplayName("given_결과없음_when_getPointHistory_then_빈리스트") + void given_noResult_when_getPointHistory_then_emptyList() { + long userId = 22L; + given(pointHistoryTable.selectAllByUserId(userId)).willReturn(List.of()); + + List histories = sut.getPointHistory(userId); + + assertTrue(histories.isEmpty()); + } + } + + @Nested + @DisplayName("유효성/예외 케이스") + class ValidationAndExceptions { + @Mock + UserPointTable userPointTable; + @Mock + PointHistoryTable pointHistoryTable; + @InjectMocks + PointServiceImpl sut; + + /** + * [작성 이유] + * 입력 유효성 검증 - 잘못된 사용자 ID에 대한 예외 처리 확인 + * 방어적 프로그래밍을 위한 파라미터 검증 로직 테스트 + * + * [검증 내용] + * - userId가 0 이하일 때 IllegalArgumentException 발생 + */ + @Test + @DisplayName("given_userId<=0_when_charge_then_IllegalArgumentException") + void given_invalidUserId_when_charge_then_throwsIllegalArgument() { + assertThrows(IllegalArgumentException.class, () -> sut.charge(0L, 100L)); + assertThrows(IllegalArgumentException.class, () -> sut.charge(-1L, 100L)); + } + + /** + * [작성 이유] + * 입력 유효성 검증 - 잘못된 금액에 대한 예외 처리 확인 + * 비즈니스 규칙(양수 금액만 허용) 검증 + * + * [검증 내용] + * - 금액이 0 이하일 때 IllegalArgumentException 발생 + */ + @Test + @DisplayName("given_amount<=0_when_charge_then_IllegalArgumentException") + void given_invalidAmount_when_charge_then_throwsIllegalArgument() { + assertThrows(IllegalArgumentException.class, () -> sut.charge(1L, 0L)); + assertThrows(IllegalArgumentException.class, () -> sut.charge(1L, -10L)); + } + + /** + * [작성 이유] + * 사용 기능에서의 사용자 ID 유효성 검증 + * 일관된 입력 검증 로직 확인 + */ + @Test + @DisplayName("given_userId<=0_when_use_then_IllegalArgumentException") + void given_invalidUserId_when_use_then_throwsIllegalArgument() { + assertThrows(IllegalArgumentException.class, () -> sut.use(0L, 10L)); + } + + /** + * [작성 이유] + * 사용 기능에서의 금액 유효성 검증 + * 일관된 입력 검증 로직 확인 + */ + @Test + @DisplayName("given_amount<=0_when_use_then_IllegalArgumentException") + void given_invalidAmount_when_use_then_throwsIllegalArgument() { + assertThrows(IllegalArgumentException.class, () -> sut.use(1L, 0L)); + } + + /** + * [작성 이유] + * 비즈니스 규칙 검증 - 잔액 부족 시 예외 발생 및 데이터 일관성 확인 + * 실패한 거래가 데이터에 영향을 주지 않는지 검증 + * + * [검증 내용] + * - 잔액 부족 시 IllegalStateException 발생 + * - 실패한 거래의 이력이나 잔액 변경이 발생하지 않음 + */ + @Test + @DisplayName("given_잔액부족_when_use_then_IllegalStateException") + void given_insufficientBalance_when_use_then_throwsIllegalState() { + long userId = 30L; + given(userPointTable.selectById(userId)) + .willReturn(new UserPoint(userId, 100L, System.currentTimeMillis())); + + assertThrows(IllegalStateException.class, () -> sut.use(userId, 500L)); + // 업데이트/이력 호출이 절대 일어나지 않아야 함 (현 구현은 이력 insert가 잔액 검증 후라서 안전) + verify(pointHistoryTable, never()).insert(anyLong(), anyLong(), any(), anyLong()); + verify(userPointTable, never()).insertOrUpdate(anyLong(), anyLong()); + } + + /** + * [작성 이유] + * 조회 기능에서의 사용자 ID 유효성 검증 + * 전체 API에서 일관된 입력 검증 확인 + */ + @Test + @DisplayName("given_userId<=0_when_getUserPoint_then_IllegalArgumentException") + void given_invalidUserId_when_getUserPoint_then_throwsIllegalArgument() { + assertThrows(IllegalArgumentException.class, () -> sut.getUserPoint(0L)); + } + + /** + * [작성 이유] + * 이력 조회 기능에서의 사용자 ID 유효성 검증 + * 전체 API에서 일관된 입력 검증 확인 + */ + @Test + @DisplayName("given_userId<=0_when_getPointHistory_then_IllegalArgumentException") + void given_invalidUserId_when_getPointHistory_then_throwsIllegalArgument() { + assertThrows(IllegalArgumentException.class, () -> sut.getPointHistory(0L)); + } + } + + @Nested + @DisplayName("PointServiceImpl 동시성 테스트") + class PointServiceConcurrencyTest { + + /** + * [유틸리티 메서드] + * 동일한 작업을 여러 스레드에서 반복 실행하는 동시성 테스트 유틸 + * + * [작성 이유] + * - 부하 테스트나 동일 작업의 동시 실행 시나리오 테스트용 + * - CountDownLatch로 모든 스레드가 동시에 시작하도록 보장 + * - CompletableFuture로 모든 작업 완료까지 대기 + */ + private void runConcurrently(int threads, Runnable task) throws Exception { + ExecutorService ex = Executors.newFixedThreadPool(threads); + try { + // 시작과 완료를 동기화하기 위한 카운트다운 래치 (CountDownLatch (동시 시작/종료 동기화)) + CountDownLatch start = new CountDownLatch(1); + CompletableFuture[] jobs = new CompletableFuture[threads]; + for (int i = 0; i < threads; i++) { + jobs[i] = CompletableFuture.runAsync(() -> { + try { start.await(); task.run(); } catch (InterruptedException ignored) {} + }, ex); // 공용 풀 대신 전용 풀 + } + start.countDown(); // 동시에 출발 +// CompletableFuture.allOf(jobs).get(60, TimeUnit.SECONDS); // 여유 + CompletableFuture.allOf(jobs).get(); // 완료까지 기다려야 하는 경우 + } finally { + ex.shutdownNow(); + ex.awaitTermination(10, TimeUnit.SECONDS); + } + } + + /** + * [유틸리티 메서드] + * 여러 개의 서로 다른 작업을 동시에 실행하는 동시성 테스트 유틸 + * + * [작성 이유] + * - 서로 다른 작업들이 동시에 실행되는 시나리오 테스트용 + * - 각 작업이 독립적으로 실행되면서 서로 간섭하지 않는지 확인 + */ + private void runConcurrentlyTasks(List tasks, long timeoutSec) throws Exception { + ExecutorService ex = Executors.newFixedThreadPool(tasks.size()); + try { + CountDownLatch start = new CountDownLatch(1); + List> futures = tasks.stream() + .map(r -> CompletableFuture.runAsync(() -> { + try { start.await(); } catch (InterruptedException ignored) {} + r.run(); + }, ex)) + .toList(); + + start.countDown(); + CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])) + .get(timeoutSec, TimeUnit.SECONDS); + } finally { + ex.shutdownNow(); + ex.awaitTermination(5, TimeUnit.SECONDS); + } + } + + @Nested + @DisplayName("동일 userId 직렬화") + class SameUserSerial { + /** + * [작성 이유] + * 동일 사용자에 대한 동시 충전이 안전하게 직렬화되는지 검증 + * 레이스 컨디션 없이 모든 충전이 정확히 누적되는지 확인 + * + * [검증 내용] + * - 최종 잔액이 모든 충전의 합과 일치 (8 × 20 × 5 = 800) + * - 모든 충전 이력이 누락 없이 기록됨 (160건) + * - 동시성 제어가 올바르게 동작함을 증명 + */ + @Test + @DisplayName("given_동시에N회충전_when_완료_then_최종잔액은합계와일치_이력개수일치") + void given_concurrentCharges_onSameUser_when_done_then_balanceEqualsSum_and_historyMatches() throws Exception { + PointService service = newService(); + long userId = 1L; + + // 8개 스레드가 각각 20번씩 포인트 충전 + int threads = 8; + int opsPerThread = 20; + long amount = 5L; + long expected = (long) threads * opsPerThread * amount; + + runConcurrently(threads, () -> { + for (int i = 0; i < opsPerThread; i++) { + service.charge(userId, amount); + } + }); + + assertEquals(expected, service.getUserPoint(userId).point()); + assertEquals(threads * opsPerThread, service.getPointHistory(userId).size()); + } + + /** + * [작성 이유] + * 동시 사용 상황에서의 잔액 부족 처리와 데이터 일관성 검증 + * 한정된 잔액에 대한 동시 경쟁 상황에서 올바른 성공/실패 처리 확인 + * + * [테스트 시나리오] + * - 초기 잔액: 100포인트 + * - 20개 스레드가 동시에 각각 10포인트씩 사용 시도 + * - 이론적으로 10번만 성공 가능 (100 ÷ 10 = 10) + * + * [검증 내용] + * - 정확히 10번의 성공과 10번의 실패 발생 + * - 최종 잔액이 0포인트 + * - 이력 기록: 충전 1건 + 성공한 사용 10건 = 총 11건 + * - 실패한 거래는 이력에 기록되지 않음 (원자성 보장) + * - 동시성 제어로 인한 데이터 무결성 유지 + */ + @Test + @DisplayName("given_잔액100_when_동시10사용×20명_then_성공10건_잔액0_이력검증") + void concurrent_use_same_user() throws Exception { + PointService service = newService(); + long userId = 2L; + service.charge(userId, 100L); // 초기 100 + + int threads = 20; + long use = 10L; + AtomicInteger success = new AtomicInteger(); + AtomicInteger fail = new AtomicInteger(); + + runConcurrently(threads, () -> { + try { + service.use(userId, use); + success.incrementAndGet(); + } catch (IllegalStateException e) { // 잔액부족 + fail.incrementAndGet(); + } + }); + + // 성공/실패 개수 검증 + assertEquals(10, success.get(), "100포인트로 10포인트씩 사용하면 정확히 10번 성공해야 함"); + assertEquals(10, fail.get(), "나머지 10번은 잔액 부족으로 실패해야 함"); + assertEquals(0L, service.getUserPoint(userId).point(), "모든 포인트가 사용되어 잔액은 0이어야 함"); + + var histories = service.getPointHistory(userId); + long chargeCnt = histories.stream().filter(h -> h.type() == TransactionType.CHARGE).count(); + long useCnt = histories.stream().filter(h -> h.type() == TransactionType.USE).count(); + + assertEquals(1, chargeCnt, "초기 충전 1건이 기록되어야 함"); + assertEquals(10, useCnt, "성공한 사용 10건만 이력에 기록되어야 함"); + assertEquals(11, histories.size(), "총 이력은 충전 1건 + 사용 10건 = 11건"); + } + } + + @Nested + @DisplayName("다른 userId: 병렬 허용") + class DifferentUsers { + /** + * [작성 이유] + * 서로 다른 사용자에 대한 동시 작업이 독립적으로 수행되는지 검증 + * 사용자 간 격리성(Isolation)과 병렬 처리 성능 확인 + * + * [테스트 시나리오] + * - 사용자 100과 사용자 200이 동시에 각각 100포인트씩 충전 + * - 두 작업이 서로 간섭하지 않고 병렬로 처리되는지 확인 + * + * [검증 내용] + * - 각 사용자의 포인트가 독립적으로 정확히 충전됨 (각각 100포인트) + * - 각 사용자의 이력이 독립적으로 기록됨 (각각 1건씩) + * - 서로 다른 사용자 작업이 상호 간섭하지 않음 + * - 동시성 제어가 사용자별로 격리되어 동작함 + * + * [성능 고려사항] + * - 다른 사용자 간에는 락 경합이 발생하지 않아야 함 + * - 병렬 처리로 인한 성능 향상 기대 + */ + @Test + @DisplayName("given_두유저_when_동시충전_then_각자정확히반영(시간 단언 없음)") + void parallel_different_users_state_only() throws Exception { + PointService service = newService(); + long a = 100L, b = 200L; + + runConcurrentlyTasks(List.of( + () -> service.charge(a, 100L), // 스레드1의 작업 + () -> service.charge(b, 100L) // 스레드2의 작업 + ), 10); + + assertEquals(100L, service.getUserPoint(a).point(), "사용자 100은 100포인트를 가져야 함"); + assertEquals(100L, service.getUserPoint(b).point(), "사용자 200은 100포인트를 가져야 함"); + assertEquals(1, service.getPointHistory(a).size(), "사용자 100의 이력은 1건이어야 함"); + assertEquals(1, service.getPointHistory(b).size(), "사용자 200의 이력은 1건이어야 함"); + } + } + } +} \ No newline at end of file