50 lines
1.3 KiB
Kotlin
50 lines
1.3 KiB
Kotlin
plugins {
|
|
java
|
|
id("com.gradleup.shadow") version "9.4.1" apply false
|
|
}
|
|
|
|
val projectVersion: String by project
|
|
val projectGroup: String by project
|
|
val javaVersion: String by project
|
|
|
|
allprojects {
|
|
group = projectGroup
|
|
version = projectVersion
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://repo.papermc.io/repository/maven-public/")
|
|
maven("https://repo.extendedclip.com/releases/") // PlaceholderAPI
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply(plugin = "java")
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(javaVersion.toInt()))
|
|
}
|
|
}
|
|
|
|
tasks.withType<JavaCompile> {
|
|
options.encoding = "UTF-8"
|
|
options.release.set(javaVersion.toInt())
|
|
}
|
|
|
|
tasks.withType<Test> {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
dependencies {
|
|
val junitVersion: String by project
|
|
val mockitoVersion: String by project
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
testImplementation("org.mockito:mockito-core:$mockitoVersion")
|
|
testImplementation("org.mockito:mockito-junit-jupiter:$mockitoVersion")
|
|
}
|
|
}
|