<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>

  <groupId>io.appflags</groupId>
  <artifactId>appflags-sdk-java</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>

  <name>AppFlags Java SDK</name>
  <url>https://appflags.io/</url>
  <description>Java SDK for AppFlags</description>

  <developers>
    <developer>
      <name>AppFlags</name>
      <email>support@appflags.io</email>
      <organization>AppFlags</organization>
      <organizationUrl>https://appflags.io/</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:https://gitlab.com/app-flags/sdks/appflags-sdk-java.git</connection>
    <developerConnection>scm:git:https://gitlab.com/app-flags/sdks/appflags-sdk-java.git</developerConnection>
    <url>https://appflags.io/</url>
  </scm>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://www.opensource.org/licenses/mit-license.php</url>
    </license>
  </licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <dependencies>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.14.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java-util</artifactId>
      <version>3.24.3</version>
    </dependency>
    <dependency>
      <groupId>io.appflags</groupId>
      <artifactId>appflags-java-protobuf-types</artifactId>
      <version>1.0.2</version>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.28</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.0.9</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.moshi</groupId>
      <artifactId>moshi-kotlin</artifactId>
      <version>1.14.0</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.11.0</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp-sse</artifactId>
      <version>4.11.0</version>
    </dependency>
    <dependency>
      <groupId>io.github.kawamuray.wasmtime</groupId>
      <artifactId>wasmtime-java</artifactId>
      <version>0.18.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <!-- We sign in the verify phase, which means it will happen before install and deploy (the last two phases)
                 but not before earlier phases like test or package. -->
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <!-- Required for GPG https://stackoverflow.com/a/53992951/1332811 -->
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Allow attaching Javadoc during releases -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
          <source>1.8</source>
          <detectJavaApiLink>false</detectJavaApiLink>
          <!-- Turn off Java 8 strict Javadoc checking -->
          <additionalparam>-Xdoclint:none</additionalparam>
          <tags>
            <tag>
              <name>notnull</name>
              <placement>a</placement>
              <head>Not null</head>
            </tag>
            <tag>
              <name>default</name>
              <placement>a</placement>
              <head>Default:</head>
            </tag>
          </tags>
        </configuration>
        <executions>
          <!-- Compress Javadoc into JAR and include that JAR when deploying. -->
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Include zipped source code in releases -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Automatically close and deploy from OSSRH -->
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.13</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
          <!-- Release versions will be synced to Maven Central automatically. -->
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
