<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>io.github.nbauma109</groupId>
  <artifactId>transformer-api</artifactId>
  <version>4.0.61</version>
  <packaging>jar</packaging>

  <name>Transformer API</name>
  <description>Unified Java API for multiple decompilers (Fernflower, Vineflower, Procyon, CFR, JD-Core, JADX)</description>
  <url>https://github.com/nbauma109/transformer-api</url>

  <licenses>
    <license>
      <name>GNU General Public License, Version 3</name>
      <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>nbauma109</id>
      <name>Nicolas Baumann</name>
      <url>https://github.com/nbauma109</url>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <version.asm>9.9</version.asm>
    <version.jadx>1.5.3</version.jadx>
    <version.procyon>v0.6.0</version.procyon>
    <version.fernflower>252.27397.103</version.fernflower>

  <!-- ======================================================================
       Vineflower - Fork of the Fernflower decompiler 
       ======================================================================
       Modern Java decompiler aiming to be as accurate as possible, with an
       emphasis on output quality. 
       We use here a shaded version of Vineflower decompiler relocating package 
       org.jetbrains.java.decompiler to org.vineflower.java.decompiler.
       This allows this API to have both VineFlower and FernFlower
       in the classpath.
     ====================================================================== -->
    <version.vineflower>1.11.2</version.vineflower>

  <!-- ======================================================================
       JD-Core v0 — Pattern-Matching Decompiler (JAD-style engine)
       ======================================================================
       Operates directly on raw bytecode without building an intermediate
       representation. It reconstructs high-level constructs through opcode
       pattern templates that identify loops, branches, switches, synchronized
       sections, and try/finally blocks. This design yields remarkable speed.
       JD-Core v0 also supports line-number realignment for debugging.
     ====================================================================== -->
    <version.jd-core-v0>0.8.27</version.jd-core-v0>

  <!-- ======================================================================
       JD-Core v1 — Analytical Decompiler (Fernflower-style engine)
       ======================================================================
       Uses a control flow graph instead of pattern templates and does not
       process bytecode directly. It performs graph transformations and
       reductions and converts bytecode into an intermediate language syntax.
       This should help to produce cross-language output 
       (.class -> Java, Kotlin, Groovy, or even .apk -> Java)
       Like JD-Core v0, it realigns line numbers for debugger compatibility.
     ====================================================================== -->
    <version.jd-core-v1>1.2.33</version.jd-core-v1>
    <version.cfr>0.152</version.cfr>
  </properties>

  <scm>
    <connection>scm:git:https://github.com/nbauma109/transformer-api.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/nbauma109/transformer-api.git</developerConnection>
    <url>https://github.com/nbauma109/transformer-api</url>
    <tag>4.0.61</tag>
  </scm>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <index>true</index>
            <manifest>
              <addClasspath>false</addClasspath>
            </manifest>
            <manifestEntries>
              <transformer-api-version>${project.version}</transformer-api-version>
              <fernflower-version>${version.fernflower}</fernflower-version>
              <vineflower-version>${version.vineflower}</vineflower-version>
              <jd-core-v0-version>${version.jd-core-v0}</jd-core-v0-version>
              <jd-core-v1-version>${version.jd-core-v1}</jd-core-v1-version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <goals>install</goals>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.12.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.8</version>
        <executions>
          <execution>
            <id>sign-release</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.9.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
    <repository>
      <id>google</id>
      <url>https://maven.google.com</url>
    </repository>
    <repository>
      <id>intellij</id>
      <url>https://www.jetbrains.com/intellij-repository/releases/</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.21.0</version>
    </dependency>
    <dependency>
        <groupId>io.github.nbauma109</groupId>
        <artifactId>vineflower</artifactId>
        <version>${version.vineflower}</version>
    </dependency>
    <dependency>
      <groupId>com.jetbrains.intellij.java</groupId>
      <artifactId>java-decompiler-engine</artifactId>
      <version>${version.fernflower}</version>
    </dependency>
    <dependency>
      <groupId>io.github.nbauma109</groupId>
      <artifactId>jd-core-v0</artifactId>
      <version>${version.jd-core-v0}</version>
    </dependency>
    <dependency>
      <groupId>io.github.nbauma109</groupId>
      <artifactId>jd-core</artifactId>
      <version>${version.jd-core-v1}</version>
    </dependency>
    <dependency>
      <groupId>org.benf</groupId>
      <artifactId>cfr</artifactId>
      <version>${version.cfr}</version>
    </dependency>
    <dependency>
      <groupId>com.github.mstrobel.procyon</groupId>
      <artifactId>procyon-decompiler</artifactId>
      <version>${version.procyon}</version>
      <exclusions>
        <exclusion>
          <groupId>com.github.mstrobel.procyon</groupId>
          <artifactId>procyon-compilertools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.github.mstrobel.procyon</groupId>
          <artifactId>procyon-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.github.mstrobel.procyon</groupId>
      <artifactId>procyon-reflection</artifactId>
      <version>${version.procyon}</version>
      <exclusions>
        <exclusion>
          <groupId>com.github.mstrobel.procyon</groupId>
          <artifactId>procyon-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.github.skylot</groupId>
      <artifactId>jadx-core</artifactId>
      <version>${version.jadx}</version>
    </dependency>
    <dependency>
      <groupId>io.github.skylot</groupId>
      <artifactId>jadx-java-input</artifactId>
      <version>${version.jadx}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-nop</artifactId>
      <version>2.0.17</version>
    </dependency>
    <!-- ASM related dependencies (BSD) -->
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
      <version>${version.asm}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-commons</artifactId>
      <version>${version.asm}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-util</artifactId>
      <version>${version.asm}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-tree</artifactId>
      <version>${version.asm}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-analysis</artifactId>
      <version>${version.asm}</version>
    </dependency>
  </dependencies>
</project>
