<?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>org.jetbrains.kotlinx</groupId>
    <artifactId>kotlinx-html</artifactId>
    <packaging>pom</packaging>
    <version>0.6.8</version>

    <name>kotlinx.html root module</name>
    <description>A root module for all kotlinx.html components</description>

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

    <modules>
        <module>shared</module>
        <module>jvm</module>
        <module>js</module>
        <module>generate</module>
        <module>assembly</module>
    </modules>

    <url>https://github.com/Kotlin/kotlinx.html</url>
    <scm>
        <connection>scm:git:git@github.com:Kotlin/kotlinx.html.git</connection>
        <url>https://github.com/Kotlin/kotlinx.html</url>
        <tag>kotlinx-html-0.6.8</tag>
    </scm>

    <developers>
        <developer>
            <name>Sergey Mashkov</name>
            <organization>JetBrains s.r.o.</organization>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib-common</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib-js</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-test-junit</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>

                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                            <goal>test-jar-no-fork</goal>
                        </goals>
                        <configuration>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>

                <configuration>
                    <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <executions>
                    <execution>
                        <id>empty-javadoc-jar</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>javadoc</classifier>
                            <classesDirectory>${build.dir}/empty</classesDirectory>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <forkCount>2C</forkCount>
                    <reuseForks>true</reuseForks>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.devexperts.bintray</groupId>
                <artifactId>bintray-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>bintray-deploy</id>
                        <goals>
                            <goal>publish</goal>
                        </goals>
                        <configuration>
                            <id>bintray</id>
                            <url>${bintray.url}</url>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.jetbrains.dokka</groupId>
                    <artifactId>dokka-maven-plugin</artifactId>
                    <version>0.9.1</version>
                    <executions>
                        <execution>
                            <phase>pre-site</phase>
                            <goals>
                                <goal>dokka</goal>
                            </goals>
                        </execution>
                    </executions>

                    <configuration>
                        <sourceLinks>
                            <link>
                                <dir>${project.basedir}/src/main/kotlin</dir>
                                <url>https://github.com/Kotlin/kotlinx.html/</url>
                            </link>
                        </sourceLinks>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <pluginRepositories>
        <pluginRepository>
            <id>jcenter</id>
            <name>JCenter</name>
            <url>https://jcenter.bintray.com/</url>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <repository>
            <id>bintray</id>
            <url>${bintray.url}</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>kotlin-latest</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                 <kotlin.version>1.1.60</kotlin.version>
                 <bintray.url>https://api.bintray.com/maven/kotlin/kotlinx.html/kotlinx.html</bintray.url>
            </properties>
        </profile>
        <profile>
            <id>kotlin-snapshot</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <kotlin.version>1.2-SNAPSHOT</kotlin.version>
                <bintray.url>https://api.bintray.com/maven/kotlin/kotlin-dev/kotlinx.html</bintray.url>
            </properties>

            <repositories>
                <repository>
                    <id>sonatype.oss.snapshots</id>
                    <name>Sonatype OSS Snapshot Repository</name>
                    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>

            <pluginRepositories>
                <pluginRepository>
                    <id>sonatype.oss.snapshots</id>
                    <name>Sonatype OSS Snapshot Repository</name>
                    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
        <profile>
            <id>kotlin-dev</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <kotlin.version>1.1.5-dev-640</kotlin.version>
                <bintray.url>https://api.bintray.com/maven/kotlin/kotlin-dev/kotlinx.html</bintray.url>
            </properties>

            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-kotlin-kotlin-dev</id>
                    <name>bintray</name>
                    <url>http://dl.bintray.com/kotlin/kotlin-dev</url>
                </repository>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-kotlin-kotlin-eap</id>
                    <name>bintray</name>
                    <url>http://dl.bintray.com/kotlin/kotlin-eap-1.1</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-kotlin-plugin-kotlin-dev</id>
                    <name>bintray-plugins</name>
                    <url>http://dl.bintray.com/kotlin/kotlin-dev</url>
                </pluginRepository>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-kotlin-plugin-kotlin-eap</id>
                    <name>bintray-plugins</name>
                    <url>http://dl.bintray.com/kotlin/kotlin-eap-1.1</url>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
</project>
