<?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/maven-v4_0_0.xsd">

  <parent>
    <groupId>io.jooby</groupId>
    <artifactId>modules</artifactId>
    <version>2.8.2</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>jooby-gradle-plugin</artifactId>

  <properties>
    <gradle.version>3.0</gradle.version>
  </properties>

  <profiles>
    <profile>
      <id>publishPlugins</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${exec-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>publishPlugins</id>
                <goals>
                  <goal>exec</goal>
                </goals>
                <phase>deploy</phase>
              </execution>
            </executions>
            <configuration>
              <executable>./gradlew</executable>
              <arguments>
                <argument>publishPlugins</argument>
                <argument>-PjoobyVersion=${project.version}</argument>
              </arguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.jooby</groupId>
      <artifactId>jooby-run</artifactId>
      <version>${jooby.version}</version>
    </dependency>

    <dependency>
      <groupId>io.jooby</groupId>
      <artifactId>jooby-openapi</artifactId>
      <version>${jooby.version}</version>
    </dependency>

    <!-- gradle -->
    <dependency>
      <groupId>org.gradle</groupId>
      <artifactId>gradle-tooling-api</artifactId>
      <version>${gradle.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.gradle</groupId>
      <artifactId>gradle-core</artifactId>
      <version>${gradle.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.gradle</groupId>
      <artifactId>gradle-plugins</artifactId>
      <version>3.4</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <version>3.0.2</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <repositories>
    <repository>
      <id>central</id>
      <url>https://central.maven.org/maven2</url>
    </repository>
    <repository>
      <id>gradle</id>
      <url>https://repo.gradle.org/gradle/libs-releases-local</url>
    </repository>
    <repository>
      <id>gradle-plugins</id>
      <url>https://repo.spring.io/plugins-release</url>
    </repository>
  </repositories>
</project>
