<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.quarkiverse</groupId>
        <artifactId>quarkiverse-parent</artifactId>
        <version>4</version>
    </parent>

    <groupId>io.quarkiverse.googlecloudservices</groupId>
    <artifactId>quarkus-google-cloud-services-parent</artifactId>
    <name>Quarkus - Google Cloud Services - Parent</name>
    <version>0.2.0</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.parameters>true</maven.compiler.parameters>
        <quarkus.version>1.9.0.Final</quarkus.version>
        <compiler-plugin.version>3.8.1</compiler-plugin.version>

        <!-- Version 10.0.0 exists but it causes a library dependency issue with micrometer,
        see https://github.com/micrometer-metrics/micrometer/issues/2249 -->
        <google-cloud-sdk.version>8.1.0</google-cloud-sdk.version>
        <!-- The Google Cloud BOM includes the 'android' version of Guava so we need to fix the 'jre' version.
        Make sure to keep these two libraries compatible. -->
        <guava.version>29.0-jre</guava.version>
        <!-- Google Cloud library BOM has a dependency issue for google-api-client,
        we fix its version until we can update the BOM.-->
        <google-api-client.version>1.30.10</google-api-client.version>
    </properties>

    <!-- Extension modules. Note that the integration-tests is added via profile to avoid releasing it -->
    <modules>
        <module>common</module>
        <module>bigquery</module>
        <module>pubsub</module>
        <module>spanner</module>
        <module>storage</module>
        <module>firestore</module>
        <module>bigtable</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bom</artifactId>
                <version>${quarkus.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Google Cloud dependencies, imported as a BOM -->
            <!-- Warning : it will also manage the version of Guava -->
            <dependency>
                <groupId>com.google.cloud</groupId>
                <artifactId>libraries-bom</artifactId>
                <version>${google-cloud-sdk.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.api-client</groupId>
                <artifactId>google-api-client</artifactId>
                <version>${google-api-client.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
                    <version>${quarkus.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>it</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>!true</value>
                </property>
            </activation>
            <modules>
                <module>integration-tests</module>
            </modules>
        </profile>
    </profiles>

  <scm>
    <tag>0.2.0</tag>
  </scm>
</project>
