<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>ca.weblite</groupId>
        <artifactId>ktswing-root</artifactId>
        <version>0.0.16</version>
    </parent>

    <artifactId>ktswing-swingx</artifactId>
    <packaging>jar</packaging>
    <name>ktswing-swingx</name>

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

    <dependencies>
        <!-- Kotlin stdlib for your main code -->
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>

        <!-- *** Depend on the codegen JAR *** -->
        <dependency>
            <groupId>ca.weblite</groupId>
            <artifactId>ktswing-main</artifactId>
            <version>0.0.16</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.swinglabs/swingx -->
        <dependency>
            <groupId>org.swinglabs</groupId>
            <artifactId>swingx</artifactId>
            <version>1.6.1</version>
        </dependency>
        <!-- JUnit, etc. if you have tests -->
    </dependencies>

    <build>
        <!-- Our main Kotlin sources are in src/main/kotlin -->
        <sourceDirectory>src/main/kotlin</sourceDirectory>

        <plugins>
            <!-- 2) Kotlin Maven Plugin: compile the main code + the generated code -->
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <jvmTarget>17</jvmTarget> <!-- or "21" if you want the latest -->
                            <!-- or use the 'release' parameter if you prefer -->
                            <sourceDirs>
                                <sourceDir>src/main/kotlin</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
