plugins {
	id 'dev.architectury.loom'
	id 'maven-publish'
}

base {
	archivesName = project.archives_base_name
}

version = project.mod_version
group = project.maven_group

loom {
	accessWidenerPath = file("src/main/resources/modid.accesswidener")
}

dependencies {
	// To change the versions see the gradle.properties file
	minecraft "com.mojang:minecraft:${project.minecraft_version}"
	mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
	modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
	modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}

tasks.withType(JavaCompile).configureEach {
	it.options.encoding = "UTF-8"
	it.options.release = 16
}

java {
	withSourcesJar()
	sourceCompatibility = JavaVersion.VERSION_16
	targetCompatibility = JavaVersion.VERSION_16
}
