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

  <groupId>io.makepad</groupId>
  <artifactId>jinsta</artifactId>
  <version>0.0.4</version>
 <!-- <modules>
    <module>example</module>
  </modules>-->
  <packaging>pom</packaging>

  <name>JInsta</name>
  <description>A toolkit to automate Instagram interactions</description>
  <url>https://github.com/Makepad-fr/jinsta</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Idil Saglam</name>
      <email>idil.saglam@makepad.fr</email>
      <organization>Makepad</organization>
      <organizationUrl>https://makepad.fr</organizationUrl>
    </developer>
    <developer>
      <name>Kaan Yagci</name>
      <email>kaan.yagci@makepad.fr</email>
      <organization>Makepad</organization>
      <organizationUrl>https://makepad.fr</organizationUrl>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/Makepad-fr/jinsta</url>
    <connection>scm:git:git@github.com/Makepad-fr/jinsta.git</connection>
    <developerConnection>scm:git:git@github.com/Makepad-fr/jinsta.git</developerConnection>
    <tag>jinsta-0.0.1</tag>
  </scm>
  <issueManagement>
    <url>https://github.com/Makepad-fr/jinsta/issues</url>
  </issueManagement>
  <ciManagement>
    <system>CircleCI</system>
    <url>https://app.circleci.com/pipelines/github/Makepad-fr/jinsta</url>
  </ciManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>


  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>15</maven.compiler.source>
    <maven.compiler.target>15</maven.compiler.target>
    <socialwalker.commons.version>0.0.3</socialwalker.commons.version>
    <spotless.version>2.17.0</spotless.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.makepad.socialwalker</groupId>
      <artifactId>commons</artifactId>
      <version>${socialwalker.commons.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.7</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <!--suppress UnresolvedMavenProperty -->
              <keyname>${env.MAVEN_GPG_KEYNAME}</keyname>
              <!--suppress UnresolvedMavenProperty -->
              <passphrase>${env.MAVEN_GPG_PASSPHRASE}</passphrase>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless.version}</version>
        <configuration>
          <!-- optional: limit format enforcement to just the files changed by this feature branch -->
          <formats>
            <!-- you can define as many formats as you want, each is independent -->
            <format>
              <!-- define the files to apply to -->
              <includes>
                <include>*.md</include>
                <include>.gitignore</include>
              </includes>
              <!-- define the steps to apply to those files -->
              <trimTrailingWhitespace />
              <endWithNewline />
              <indent>
                <tabs>true</tabs>
                <spacesPerTab>4</spacesPerTab>
              </indent>
            </format>
          </formats>
          <!-- define a language-specific format -->
          <java>
            <!-- no need to specify files, inferred automatically, but you can if you want -->

            <!-- apply a specific flavor of google-java-format and reflow long strings -->
            <googleJavaFormat>
              <version>1.8</version>
              <style>AOSP</style>
              <reflowLongStrings>true</reflowLongStrings>
            </googleJavaFormat>

            <!-- make sure every file has the following copyright header.
              optionally, Spotless can set copyright years by digging
              through git history (see "license" section below) -->
            <licenseHeader>
              <content>/* (C)$YEAR */
              </content>  <!-- or <file>${project.basedir}/license-header</file> -->
            </licenseHeader>
          </java>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>compile</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!-- remove M2E warning complaining about usage of maven-enforcer-plugin
          in parent -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

        <!-- override version of GPG plugin to use new GPG signing features -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.4.2</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>
