buildscript {
    repositories {
        maven { url = 'https://maven.minecraftforge.net/' }
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+'
    }
}

apply plugin: 'net.minecraftforge.gradle'

version = '1.0.5'
group = 'com.firefrostgaming.rules'
archivesBaseName = 'firefrostrules'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

minecraft {
    mappings channel: 'official', version: '1.18.2'
    runs {
        server {
            workingDirectory project.file('run')
            property 'forge.logging.markers', 'REGISTRIES'
            property 'forge.logging.console.level', 'debug'
            mods {
                firefrostrules {
                    source sourceSets.main
                }
            }
        }
    }
}

dependencies {
    minecraft 'net.minecraftforge:forge:1.18.2-40.2.4'
}

jar {
    manifest {
        attributes([
            "Implementation-Title": "Firefrost Rules",
            "Implementation-Version": project.version,
        ])
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'
}
