plugins {
    id "java"
    id "application"
}

sourceSets {
    main {
        java {
            srcDir 'src/main/java'
			srcDir 'src/lwjgl/java'
        }
    }
}

repositories {
    mavenCentral()
}

tasks.withType(JavaCompile) {
    options.warnings = false
    options.compilerArgs << "-Xmaxerrs" << "1000"
}

dependencies {
    implementation fileTree(dir: './lwjgl-rundir/', include: '*.jar')
}

distributions {
    main {
        contents {
            from file("$projectDir/lwjgl-rundir/resources")
            into('/')
        }
    }

}

application {
    mainClass = 'net.lax1dude.eaglercraft.MinecraftMain'
    applicationDefaultJvmArgs = ['-Djava.library.path=lwjgl-rundir']
}
