buildscript {
    repositories {
        mavenCentral()
        jcenter()
        maven {
            name = "forge"
            url = "https://maven.minecraftforge.net"
        }
    }
    dependencies {
        classpath("com.anatawa12.forge:ForgeGradle:1.2-1.1.+") {
            changing = true
        }
    }
}

apply plugin: "forge"

version = project.modVersion
group = project.modGroup
archivesBaseName = project.modBaseName

sourceCompatibility = targetCompatibility = "1.7"

compileJava {
    sourceCompatibility = targetCompatibility = "1.7"
    options.compilerArgs << "-Xlint:-options"
}

minecraft {
    version = project.minecraft_version + "-" + project.forge_version
    runDir = "run"
}

dependencies {
    compileOnly files("libs/BetterQuesting-3.7.15-GTNH-dev.jar")
}

processResources {
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraftVersion
    inputs.property "modid", project.modId
    inputs.property "modname", project.modName

    from(sourceSets.main.resources.srcDirs) {
        include "mcmod.info"
        expand(
                "version": project.version,
                "mcversion": project.minecraftVersion,
                "modid": project.modId,
                "modname": project.modName
        )
    }

    from(sourceSets.main.resources.srcDirs) {
        exclude "mcmod.info"
    }
}

jar {
    manifest {
        attributes(
                "Implementation-Title": project.modName,
                "Implementation-Version": project.version
        )
    }
}
