Збірка усіх плаґінів для WhoMine розроблених [MinersStudios](https://minersstudios.github.io).
plugins {
	id 'java'
}

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
group = 'ua.com.minersstudios'

allprojects {
	gradle.projectsEvaluated {
		tasks.withType(JavaCompile) {
			options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
		}
	}
}

subprojects {
	apply plugin: 'java'
	repositories {
		mavenCentral()
		maven {
			url = 'https://repo.papermc.io/repository/maven-public'
		}
	}

	dependencies {
		compileOnly 'io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT'
		compileOnly 'org.projectlombok:lombok:1.18.+'
		annotationProcessor 'org.projectlombok:lombok:1.18.+'
	}

	ext {
		description = 'Not set.'
		minecraftVersion = '1.20'
		version = "wmine-${minecraftVersion}"
		author = 'MinersStudios'
		website = 'minersstudios.github.io'
		mainClass = 'notset'
	}

	processResources {
		expand(project.properties) { escapeBackslash = true }
	}
}

project(':MSBlock') {
	ext {
		version = "${version}-1"
		mainClass = "${group}.whomine.block.MSBlock"
	}
}

project(':MSCore') {
	ext {
		version = "${version}-1"
		mainClass = "${group}.whomine.core.MSCore"
	}
}

project(':MSDecor') {
	ext {
		version = "${version}-1"
		mainClass = "${group}.whomine.decor.MSDecor"
	}
}

project(':MSItem') {
	ext {
		version = "${version}-1"
		mainClass = "${group}.whomine.item.MSItem"
	}
}

project(':MSUtil') {
	ext {
		description = 'Збірка необхідних класів для роботи наслідкових плаґінів.'
		version = "${version}-1"
		mainClass = "${group}.whomine.util.MSUtil"
	}
	repositories {
		maven {
			url 'https://nexus.scarsz.me/content/groups/public'
		}
	}
	dependencies {
		compileOnly 'com.discordsrv:discordsrv:1.26.+'
		compileOnly 'net.kyori:adventure-api:4.14.+'
		implementation 'org.gnu.gettext:libintl:0.18.+'
	}
}
/*
publishing {
	publications {
		java(MavenPublication) {
			groupId 'ua.com.minersstudios'
			artifactId 'whomine'
			version '1'
			from components.java
		}
	}

	repositories {
	}
}
*/
task cleanRootBuild(type: Delete) {
	delete "${rootDir}/build"
}
build.finalizedBy(cleanRootBuild)