HexCasting/build.gradle

110 lines
2.4 KiB
Groovy
Raw Normal View History

2022-05-11 23:23:39 +02:00
buildscript {
repositories {
mavenCentral()
}
dependencies {
2022-05-14 17:02:35 +02:00
classpath group: 'com.diluv.schoomp', name: 'Schoomp', version: '1.2.6'
2022-05-11 23:23:39 +02:00
}
}
plugins {
id 'java'
2022-05-15 23:48:18 +02:00
id "org.jetbrains.kotlin.jvm"
2022-05-16 02:56:15 +02:00
id 'idea'
2022-11-03 18:29:48 +01:00
// 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
2022-05-11 23:23:39 +02:00
}
repositories {
mavenCentral()
2022-05-11 23:23:39 +02:00
}
pkpcpbp {
modInfo {
modID(project.modID)
mcVersion(project.minecraftVersion)
modVersion(project.modVersion)
2022-05-23 21:21:13 +02:00
}
2022-06-01 03:43:05 +02:00
}
2022-04-25 16:40:32 +02:00
subprojects {
apply plugin: 'java'
2022-05-15 23:48:18 +02:00
apply plugin: 'kotlin'
2022-05-11 23:23:39 +02:00
apply plugin: 'maven-publish'
/*
2021-12-25 17:58:16 +01:00
repositories {
maven { url "https://libraries.minecraft.net/" }
2022-04-25 16:40:32 +02:00
mavenCentral()
2021-12-25 17:58:16 +01:00
maven {
2022-04-25 16:40:32 +02:00
name = 'Sponge / Mixin'
url = 'https://repo.spongepowered.org/repository/maven-public/'
2021-12-25 17:58:16 +01:00
}
2022-04-04 22:01:07 +02:00
2022-04-25 16:40:32 +02:00
maven {
2022-05-14 06:50:57 +02:00
name = 'BlameJared Maven'
2022-04-25 16:40:32 +02:00
url = 'https://maven.blamejared.com'
2022-04-04 22:01:07 +02:00
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
maven {
url = "https://jitpack.io"
}
2022-04-04 22:01:07 +02:00
}
*/
2022-04-04 22:01:07 +02:00
2022-04-25 16:40:32 +02:00
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 17
2022-04-04 22:13:25 +02:00
}
2022-04-04 22:01:07 +02:00
2022-04-25 16:40:32 +02:00
// 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
}
2022-05-16 02:56:15 +02:00
sourceSets.main.kotlin.srcDirs += 'src/main/java'
2022-05-24 00:01:22 +02:00
2022-05-21 23:11:38 +02:00
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" } } }
2022-05-15 23:48:18 +02:00
compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}