<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>xyz.block</groupId>
  <artifactId>dap</artifactId>
  <version>0.2.0</version>
  <name>DAP SDK</name>
  <description>Decentralized Agnostic Paytag SDK for JVM</description>
  <url>https://github.com/TBD54566975/dap</url>
  <inceptionYear>2024</inceptionYear>

  <scm>
    <connection>scm:git:git://github.com/TBD54566975/dap-kt.git</connection>
    <!-- This has to be HTTPS, not git://, for maven-release-plugin to do AUTH correctly -->
    <developerConnection>scm:git:https://github.com/TBD54566975/dap-kt.git</developerConnection>
    <url>https://github.com/TBD54566975/dap-kt</url>
    <tag>v0.2.0</tag>
  </scm>

  <developers>
    <developer>
      <id>TBD54566975</id>
      <name>Block, Inc.</name>
      <email>releases@tbd.email</email>
    </developer>
  </developers>

  <!-- Issues -->
  <issueManagement>
    <system>github</system>
    <url>https://github.com/TBD54566975/dap-kt/issues</url>
  </issueManagement>

  <!-- Licenses -->
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>



  <properties>
    <project.scm.id>github</project.scm.id>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <kotlin.jvm.target>11</kotlin.jvm.target>
    <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
    <version.com.squareup.okhttp3>4.11.0</version.com.squareup.okhttp3>
    <version.org.assertj>3.25.2</version.org.assertj>
    <version.org.junit.jupiter>5.10.1</version.org.junit.jupiter>
    <version.xyz.block.web5>1.1.2</version.xyz.block.web5>
    <version.kotlin>1.9.22</version.kotlin>
    <version.kotlin.compiler.incremental>true</version.kotlin.compiler.incremental>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>xyz.block</groupId>
        <artifactId>web5-parent</artifactId>
        <version>${version.xyz.block.web5}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>xyz.block</groupId>
      <artifactId>web5-dids</artifactId>
      <version>1.1.2</version>
      <type>pom</type>
    </dependency>

    <!-- Kotlin -->
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <version>${version.kotlin}</version>
    </dependency>

    <!-- Test Dependencies -->
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${version.org.assertj}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${version.org.junit.jupiter}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${version.org.junit.jupiter}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>mockwebserver</artifactId>
      <version>${version.com.squareup.okhttp3}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
    <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.0.2</version>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.2</version>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
        <configuration>
          <deployAtEnd>true</deployAtEnd>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.simplify4u.plugins</groupId>
        <artifactId>sign-maven-plugin</artifactId>
        <version>1.1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <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</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <pushChanges>true</pushChanges>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <scmCommentPrefix>[TBD Release Manager &#x1f680;]</scmCommentPrefix>
          <scmReleaseCommitComment>@{prefix} Setting version to: @{releaseLabel}</scmReleaseCommitComment>
          <scmDevelopmentCommitComment>@{prefix} Setting next development version after: @{releaseLabel}</scmDevelopmentCommitComment>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>
      <plugin>
        <artifactId>kotlin-maven-plugin</artifactId>
        <groupId>org.jetbrains.kotlin</groupId>
        <version>${version.kotlin}</version>
        <extensions>true</extensions>
        <configuration>
          <jvmTarget>${kotlin.jvm.target}</jvmTarget>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.ozsie</groupId>
        <artifactId>detekt-maven-plugin</artifactId>
        <version>1.23.5</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <config>detekt.yml</config>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>io.gitlab.arturbosch.detekt</groupId>
            <artifactId>detekt-formatting</artifactId>
            <version>1.23.5</version>
          </dependency>
          <dependency>
            <groupId>com.github.TBD54566975</groupId>
            <artifactId>tbd-detekt-rules</artifactId>
            <version>0.0.2</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.jetbrains.dokka</groupId>
        <artifactId>dokka-maven-plugin</artifactId>
        <version>1.9.20</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>javadocJar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>sign-artifacts</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.simplify4u.plugins</groupId>
            <artifactId>sign-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- https://central.sonatype.org/publish/publish-maven/#deployment -->
      <id>ossrh</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.13</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh-releases</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <snapshotRepository>
          <id>ossrh-snapshots</id>
          <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <!-- Sonatype's OSSRH - replicates to Maven Central within 30min of publish -->
        <repository>
          <id>ossrh-releases</id>
          <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
  </profiles>

  <distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>tbd-oss-releases</id>
      <name>TBD OSS Releases Repository</name>
      <url>https://blockxyz.jfrog.io/artifactory/tbd-oss-releases-maven2</url>
      <layout>default</layout>
    </repository>
    <snapshotRepository>
      <uniqueVersion>false</uniqueVersion>
      <id>tbd-oss-snapshots</id>
      <name>TBD OSS Snapshots Repository</name>
      <url>https://blockxyz.jfrog.io/artifactory/tbd-oss-snapshots-maven2</url>
      <layout>default</layout>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <!-- 3rdparty dependencies of TBD Projects-->
    <repository>
      <id>tbd-oss-thirdparty</id>
      <name>tbd-oss-thirdparty</name>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <url>https://blockxyz.jfrog.io/artifactory/tbd-oss-thirdparty-maven2/</url>
    </repository>

    <!-- TBD SNAPSHOTs-->
    <repository>
      <id>tbd-oss-snapshots</id>
      <name>tbd-oss-snapshots</name>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <url>https://blockxyz.jfrog.io/artifactory/tbd-oss-snapshots-maven2/</url>
    </repository>

    <!-- OSSRH Snapshots -->
    <repository>
      <id>sonatype-oss-snapshots</id>
      <name>sonatype-oss-snapshots</name>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
      <snapshots />
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>tbd-oss-thirdparty</id>
      <name>tbd-oss-thirdparty</name>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <url>https://blockxyz.jfrog.io/artifactory/tbd-oss-thirdparty-maven2/</url>
    </pluginRepository>
  </pluginRepositories>
</project>