<?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>com.dyescape</groupId>
    <artifactId>kotlin-maven-symbol-processing</artifactId>
    <version>1.2</version>

    <name>Kotlin Maven Symbol Processing</name>
    <description>Kotlin Symbol Processing extension for the kotlin maven plugin</description>
    <url>https://github.com/Dyescape/kotlin-maven-symbol-processing</url>

    <organization>
        <name>Dyescape</name>
        <url>https://dyescape.com</url>
    </organization>

    <developers>
        <developer>
            <id>MrDienns</id>
            <name>Dennis van der Veeke</name>
            <email>mrdienns@dyescape.com</email>
            <organization>Dyescape</organization>
            <organizationUrl>https://dyescape.com</organizationUrl>
            <roles>
                <role>manager</role>
                <role>lead developer</role>
            </roles>
        </developer>
        <developer>
            <id>fxshlein</id>
            <name>fxshlein</name>
            <url>https://fxshlein.net</url>
            <email>fxshlein@fxshlein.net</email>
            <organization>Dyescape</organization>
            <organizationUrl>https://dyescape.com</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>1.6.20</version>
        </dependency>
        <dependency>
            <groupId>com.google.devtools.ksp</groupId>
            <artifactId>symbol-processing</artifactId>
            <version>1.6.20-1.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-maven-plugin</artifactId>
            <version>1.6.20</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>1.6.20</version>

                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
                <version>2.1.1</version>
                <executions>
                    <execution>
                        <id>process-classes</id>
                        <goals>
                            <goal>generate-metadata</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>shade</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>com.google.devtools.ksp:symbol-processing</include>
                                </includes>
                            </artifactSet>
                            <filters>
                                <filter>
                                    <artifact>com.google.devtools.ksp:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.MF</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <transformers>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>github</id>
            <distributionManagement>
                <repository>
                    <id>github</id>
                    <name>GitHub Dyescape Apache Maven Packages</name>
                    <url>https://maven.pkg.github.com/Dyescape/kotlin-maven-symbol-processing</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>internal</id>
            <distributionManagement>
                <repository>
                    <id>dyescape-libraries</id>
                    <name>Internal Dyescape Libraries</name>
                    <url>https://maven.pkg.jetbrains.space/dyescape/p/lib/libraries</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>central</id>

            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>

            <build>
                <plugins>
                    <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.jetbrains.dokka</groupId>
                        <artifactId>dokka-maven-plugin</artifactId>
                        <version>1.6.10</version>
                        <executions>
                            <execution>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>dokka</goal>
                                    <goal>javadoc</goal>
                                    <goal>javadocJar</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>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.12</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://raw.githubusercontent.com/Dyescape/kotlin-maven-symbol-processing/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/Dyescape/kotlin-maven-symbol-processing</url>
        <developerConnection>scm:git:ssh://git@github.com:Dyescape/kotlin-maven-symbol-processing.git</developerConnection>
    </scm>
</project>
