mirror of
https://github.com/chylex/Hardcore-Ender-Expansion-2.git
synced 2024-10-16 23:42:50 +02:00
132 lines
3.3 KiB
Groovy
132 lines
3.3 KiB
Groovy
buildscript{
|
|
ext.kotlin_version = "1.3.61"
|
|
|
|
repositories{
|
|
jcenter()
|
|
mavenCentral()
|
|
|
|
maven{
|
|
url = "https://files.minecraftforge.net/maven"
|
|
}
|
|
}
|
|
|
|
dependencies{
|
|
classpath(group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "3.+", changing: true){
|
|
exclude group: "trove", module: "trove"
|
|
}
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:" + kotlin_version
|
|
}
|
|
}
|
|
|
|
repositories{
|
|
maven{
|
|
url = "https://minecraft.curseforge.com/api/maven"
|
|
}
|
|
}
|
|
|
|
apply plugin: "net.minecraftforge.gradle"
|
|
apply plugin: "eclipse"
|
|
apply plugin: "kotlin"
|
|
|
|
def mcversion = "1.14.4"
|
|
def forgeversion = "28.1.116"
|
|
def kottleversion = "1.4.0"
|
|
|
|
def prefixName = "displayName = "
|
|
def prefixVersion = "version = "
|
|
|
|
def metaLines = file("src/main/resources/META-INF/mods.toml").readLines()
|
|
def metaName = metaLines.find { line -> line.startsWith(prefixName) }.substring(prefixName.length())[1..-2]
|
|
def metaVersion = metaLines.find { line -> line.startsWith(prefixVersion) }.substring(prefixVersion.length())[1..-2]
|
|
|
|
group = "chylex.hee"
|
|
version = metaVersion
|
|
archivesBaseName = metaName.replaceAll("\\s", "")
|
|
|
|
sourceCompatibility = targetCompatibility = "1.8"
|
|
|
|
tasks.withType(JavaCompile){
|
|
sourceCompatibility = targetCompatibility = "1.8"
|
|
}
|
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile){
|
|
kotlinOptions{
|
|
jvmTarget = "1.8"
|
|
apiVersion = "1.3"
|
|
languageVersion = "1.3"
|
|
freeCompilerArgs = [
|
|
"-Xno-call-assertions",
|
|
"-Xno-param-assertions",
|
|
"-Xno-receiver-assertions",
|
|
"-Xjvm-default=enable",
|
|
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
|
|
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
|
"-XXLanguage:+InlineClasses"
|
|
]
|
|
}
|
|
}
|
|
|
|
minecraft{
|
|
mappings channel: "snapshot", version: "20200119-1.14.4"
|
|
|
|
accessTransformer = file("src/main/resources/META-INF/accesstransformer.cfg")
|
|
|
|
runs{
|
|
client{
|
|
properties "hee.debug": ""
|
|
workingDirectory file("run")
|
|
|
|
mods{
|
|
hee{
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
server{
|
|
properties "hee.debug": ""
|
|
workingDirectory file("run")
|
|
|
|
mods{
|
|
hee{
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies{
|
|
minecraft "net.minecraftforge:forge:" + mcversion + "-" + forgeversion
|
|
implementation "kottle:Kottle:" + kottleversion
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.0-RC1"
|
|
}
|
|
|
|
test{
|
|
systemProperty "junit.jupiter.testinstance.lifecycle.default", "per_class"
|
|
}
|
|
|
|
jar{
|
|
archiveName = archivesBaseName + "-" + mcversion + "-v" + version + ".jar"
|
|
|
|
from("./"){
|
|
include "LICENSE"
|
|
}
|
|
|
|
manifest{
|
|
attributes([
|
|
"Specification-Title" : "bettersprinting",
|
|
"Specification-Version": "1",
|
|
"Specification-Vendor" : "chylex",
|
|
|
|
"Implementation-Title" : metaName,
|
|
"Implementation-Version": metaVersion,
|
|
"Implementation-Vendor" : "chylex",
|
|
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])
|
|
}
|
|
}
|