HexCasting/build.gradle

110 lines
2.4 KiB
Groovy

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'com.diluv.schoomp', name: 'Schoomp', version: '1.2.6'
}
}
plugins {
id 'java'
id "org.jetbrains.kotlin.jvm"
id 'idea'
// This needs to be in the root
// https://github.com/FabricMC/fabric-loom/issues/612#issuecomment-1198444120
// Also it looks like property lookups don't work this early
id 'fabric-loom' version '1.0-SNAPSHOT' apply false
id("at.petra-k.PKPlugin") version "0.1.0-pre-63"
id("at.petra-k.PKSubprojPlugin") version "0.1.0-pre-63" apply false
}
repositories {
mavenCentral()
}
pkpcpbp {
modInfo {
modID(project.modID)
mcVersion(project.minecraftVersion)
modVersion(project.modVersion)
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
/*
repositories {
maven { url "https://libraries.minecraft.net/" }
mavenCentral()
maven {
name = 'Sponge / Mixin'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
name = 'BlameJared Maven'
url = 'https://maven.blamejared.com'
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
maven {
url = "https://jitpack.io"
}
}
*/
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 17
}
// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
sourceSets.main.kotlin.srcDirs += 'src/main/java'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.withSourcesJar()
java.withJavadocJar()
processResources {
exclude '.cache'
}
sourcesJar {
duplicatesStrategy 'exclude'
}
}
allprojects { gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xmaxerrs" << "1000" } } }
compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}