<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.camunda.connector</groupId>
    <artifactId>connector-parent</artifactId>
    <version>0.3.0</version>
    <relativePath/>
  </parent>

  <name>connector-google-drive</name>
  <description>Camunda Google Drive Connector</description>
  <artifactId>connector-google-drive</artifactId>
  <packaging>jar</packaging>
  <version>0.5.0</version>

  <licenses>
    <license>
      <name>Camunda Platform Self-Managed Free Edition license</name>
      <url>https://camunda.com/legal/terms/cloud-terms-and-conditions/camunda-cloud-self-managed-free-edition-terms/</url>
    </license>
    <license>
      <name>Camunda Platform Self-Managed Enterprise Edition license</name>
    </license>
  </licenses>

  <properties>
    <version.google-api-client>2.0.1</version.google-api-client>
    <version.google-api-services-drive>v3-rev20221023-2.0.0</version.google-api-services-drive>
    <version.google-oauth-client-jetty>1.34.1</version.google-oauth-client-jetty>
    <version.google-auth-library-oauth2-http>1.12.1</version.google-auth-library-oauth2-http>
    <version.google-api-services-docs>v1-rev20221004-2.0.0</version.google-api-services-docs>
    <license.inlineheader>Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
under one or more contributor license agreements. Licensed under a proprietary license.
See the License.txt file for more information. You may not use this file
except in compliance with the proprietary license.</license.inlineheader>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.camunda.connector</groupId>
      <artifactId>connector-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.camunda.connector</groupId>
      <artifactId>connector-validation</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- GOOGLE DRIVE API -->
    <dependency>
      <groupId>com.google.api-client</groupId>
      <artifactId>google-api-client</artifactId>
      <version>${version.google-api-client}</version>
    </dependency>
    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-drive</artifactId>
      <version>${version.google-api-services-drive}</version>
    </dependency>

    <!-- GOOGLE AUTH API -->
    <dependency>
      <groupId>com.google.oauth-client</groupId>
      <artifactId>google-oauth-client-jetty</artifactId>
      <version>${version.google-oauth-client-jetty}</version>
    </dependency>
    <dependency>
      <groupId>com.google.auth</groupId>
      <artifactId>google-auth-library-oauth2-http</artifactId>
      <version>${version.google-auth-library-oauth2-http}</version>
    </dependency>
    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-docs</artifactId>
      <version>${version.google-api-services-docs}</version>
    </dependency>

    <!-- TEST -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>connectors</id>
      <name>Connectors Repository</name>
      <url>https://artifacts.camunda.com/artifactory/connectors/</url>
    </repository>

    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>connectors-snapshots</id>
      <name>Connectors Snapshot Repository</name>
      <url>https://artifacts.camunda.com/artifactory/connectors-snapshots/</url>
    </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>cloud-function</id>
      <repositories>
        <repository>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>connectors-internal</id>
          <name>Connectors Internal Repository</name>
          <url>https://artifacts.camunda.com/artifactory/connectors-internal/</url>
        </repository>

        <repository>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>connectors-internal-snapshots</id>
          <name>Connectors Internal Snapshot Repository</name>
          <url>https://artifacts.camunda.com/artifactory/connectors-internal-snapshots/</url>
        </repository>
      </repositories>
      <dependencies>
        <dependency>
          <groupId>io.camunda.connector</groupId>
          <artifactId>connector-runtime-cloud</artifactId>
          <version>0.3.0</version>
        </dependency>
        <dependency>
          <groupId>io.camunda.connector</groupId>
          <artifactId>connector-core</artifactId>
        </dependency>
        <dependency>
          <groupId>io.camunda.connector</groupId>
          <artifactId>connector-validation</artifactId>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <outputFile>${project.build.directory}/deployment/${project.build.finalName}.jar</outputFile>
            </configuration>
          </plugin>
          <plugin>
            <groupId>com.google.cloud.functions</groupId>
            <artifactId>function-maven-plugin</artifactId>
            <configuration>
              <functionTarget>io.camunda.connector.runtime.cloud.CloudConnectorFunction</functionTarget>
              <port>9082</port>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
