<?xml version="1.0" encoding="UTF-8" ?>
<project
    xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
           https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>dev.openfeature.contrib</groupId>
        <artifactId>parent</artifactId>
        <version>[1.0,2.0)</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <groupId>dev.openfeature.contrib.providers</groupId>
    <artifactId>gcp</artifactId>
    <version>0.0.1</version> <!--x-release-please-version -->

    <properties>
        <!-- "-" is not allowed in automatic module names -->
        <module-name>${groupId}.gcp</module-name>
    </properties>

    <name>gcp</name>
    <description>GCP provider for OpenFeature Java SDK</description>
    <url>https://openfeature.dev</url>

    <developers>
        <developer>
            <id>openfeaturebot</id>
            <name>OpenFeature Bot</name>
            <organization>OpenFeature</organization>
            <url>https://openfeature.dev/</url>
        </developer>
    </developers>

    <dependencies>
        <!-- GCP Secret Manager client -->
        <dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>google-cloud-secretmanager</artifactId>
            <version>2.57.0</version>
        </dependency>

        <!-- JSON parsing for structured flag values -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.21.1</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.17</version>
        </dependency>

        <!-- test-only logging implementation -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j2-impl</artifactId>
            <version>2.25.0</version>
            <scope>test</scope>
        </dependency>

        <!-- concurrency testing -->
        <dependency>
            <groupId>com.vmlens</groupId>
            <artifactId>api</artifactId>
            <version>1.2.27</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludedGroups>integration</excludedGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>concurrency-tests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.vmlens</groupId>
                        <artifactId>vmlens-maven-plugin</artifactId>
                        <version>1.2.27</version>
                        <executions>
                            <execution>
                                <id>test</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <includes>
                                        <include>**/*CTest.java</include>
                                    </includes>
                                    <failIfNoTests>true</failIfNoTests>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
