<?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.ruby-lang</groupId>
    <artifactId>prism-parser</artifactId>
    <version>0.0.3</version>
  </parent>

  <artifactId>prism-parser-wasm</artifactId>
  <name>Java Prism WASM</name>
  <description>Java WASM bindings for the Prism parser shared library</description>
  <url>https://github.com/ruby/prism</url>

  <properties>
    <chicory.version>1.7.5</chicory.version>
    <redline.version>0.0.3</redline.version>
  </properties>

  <dependencyManagement>
    <dependencies>
          <dependency>
              <groupId>com.dylibso.chicory</groupId>
              <artifactId>bom</artifactId>
              <version>${chicory.version}</version>
              <type>pom</type>
              <scope>import</scope>
          </dependency>
      </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.ruby-lang</groupId>
      <artifactId>prism-parser-api</artifactId>
      <version>0.0.3</version>
    </dependency>
    <dependency>
      <groupId>com.dylibso.chicory</groupId>
      <artifactId>runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>com.dylibso.chicory</groupId>
      <artifactId>log</artifactId>
    </dependency>
    <dependency>
      <groupId>com.dylibso.chicory</groupId>
      <artifactId>wasi</artifactId>
    </dependency>
    <dependency>
      <groupId>com.dylibso.chicory</groupId>
      <artifactId>wasm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
      <version>10.0.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.roastedroot</groupId>
      <artifactId>redline</artifactId>
      <version>${redline.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>io.roastedroot</groupId>
        <artifactId>redline-compiler-maven-plugin</artifactId>
        <version>${redline.version}</version>
        <executions>
          <execution>
            <id>prism</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <name>org.ruby_lang.prism.wasm.PrismParser</name>
              <moduleInterface>org.ruby_lang.prism.wasm.Prism</moduleInterface>
              <wasmFile>src/main/wasm/prism.wasm</wasmFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
