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

  <parent>
    <groupId>org.marid</groupId>
    <artifactId>marid-ide</artifactId>
    <version>0.9.8.10</version>
  </parent>

  <artifactId>marid-fx</artifactId>

  <dependencies>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-reflect</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jetbrains.kotlinx</groupId>
      <artifactId>kotlinx-coroutines-javafx</artifactId>
      <version>1.3.2</version>
    </dependency>

    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
    </dependency>

    <dependency>
      <groupId>org.openjfx</groupId>
      <artifactId>javafx-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.openjfx</groupId>
      <artifactId>javafx-swing</artifactId>
    </dependency>

    <dependency>
      <groupId>org.marid</groupId>
      <artifactId>marid-util</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-java-sources</id>
            <goals>
              <goal>add-source</goal>
            </goals>
            <phase>none</phase>
            <configuration>
              <sources>
                <source>src/script/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generateSources</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <executable>${java.home}/bin/java</executable>
              <arguments>
                <argument>${project.basedir}/src/script/java/script/GenerateSources.java</argument>
                <argument>${project.build.directory}/generated-sources</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
        <configuration>
          <sourceDirs>
            <dir>target/generated-sources</dir>
          </sourceDirs>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
