mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 23:01:03 +00:00
Merge remote-tracking branch 'origin/master' into fabric/1.17-dev
# Conflicts: # platforms/fabric/build.gradle.kts # platforms/fabric/src/main/java/com/dfsek/terra/fabric/generation/FabricChunkGeneratorWrapper.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/block/state/FabricBlockState.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/block/state/FabricMobSpawner.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/block/state/FabricSign.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/features/PopulatorFeature.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/handles/FabricWorld.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/handles/chunk/FabricChunk.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/handles/world/FabricSeededWorldAccess.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/handles/world/FabricWorldAccess.java # platforms/fabric/src/main/java/com/dfsek/terra/fabric/world/handles/world/FabricWorldHandle.java # platforms/fabric/src/main/resources/fabric.mod.json # platforms/fabric/src/main/resources/terra.accesswidener # platforms/fabric/src/main/resources/terra.mixins.json
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import com.dfsek.terra.configureCommon
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.modrinth.minotaur.TaskModrinthUpload
|
||||
import net.fabricmc.loom.LoomGradleExtension
|
||||
import net.fabricmc.loom.task.RemapJarTask
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("fabric-loom").version("0.6-SNAPSHOT")
|
||||
id("com.modrinth.minotaur").version("1.1.0")
|
||||
}
|
||||
|
||||
configureCommon()
|
||||
@@ -19,14 +22,18 @@ group = "com.dfsek.terra.fabric"
|
||||
|
||||
dependencies {
|
||||
"shadedApi"(project(":common"))
|
||||
"shadedImplementation"("org.yaml:snakeyaml:1.27")
|
||||
"shadedImplementation"("com.googlecode.json-simple:json-simple:1.1.1")
|
||||
|
||||
"minecraft"("com.mojang:minecraft:21w11a")
|
||||
"mappings"("net.fabricmc:yarn:21w11a+build.3:v2")
|
||||
"modImplementation"("net.fabricmc:fabric-loader:0.11.3")
|
||||
|
||||
"modImplementation"("net.fabricmc.fabric-api:fabric-api:0.32.4+1.17")
|
||||
"modCompileOnly"("com.sk89q.worldedit:worldedit-fabric-mc1.16:7.2.0-SNAPSHOT") {
|
||||
exclude(group = "com.google.guava", module = "guava")
|
||||
exclude(group = "com.google.code.gson", module = "gson")
|
||||
exclude(group = "it.unimi.dsi", module = "fastutil")
|
||||
exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
exclude(group = "org.apache.logging.log4j", module = "log4j-core")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named<ShadowJar>("shadowJar") {
|
||||
@@ -37,9 +44,11 @@ tasks.named<ShadowJar>("shadowJar") {
|
||||
|
||||
configure<LoomGradleExtension> {
|
||||
accessWidener("src/main/resources/terra.accesswidener")
|
||||
refmapName = "terra-refmap.json"
|
||||
}
|
||||
|
||||
tasks.register<RemapJarTask>("remapShadedJar") {
|
||||
val remapped = tasks.register<RemapJarTask>("remapShadedJar") {
|
||||
group = "fabric"
|
||||
val shadowJar = tasks.getByName<ShadowJar>("shadowJar")
|
||||
dependsOn(shadowJar)
|
||||
input.set(shadowJar.archiveFile)
|
||||
@@ -47,3 +56,41 @@ tasks.register<RemapJarTask>("remapShadedJar") {
|
||||
addNestedDependencies.set(true)
|
||||
remapAccessWidener.set(true)
|
||||
}
|
||||
|
||||
|
||||
tasks.register<TaskModrinthUpload>("publishModrinthFabric") {
|
||||
dependsOn("remapShadedJar")
|
||||
group = "fabric"
|
||||
token = System.getenv("MODRINTH_SECRET")
|
||||
projectId = "FIlZB9L0"
|
||||
versionNumber = "${project.version}-fabric"
|
||||
uploadFile = remapped.get().archiveFile.get().asFile
|
||||
releaseType = "beta"
|
||||
addGameVersion("1.16.4")
|
||||
addGameVersion("1.16.5")
|
||||
addLoader("fabric")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("mavenJava") {
|
||||
artifact(tasks["sourcesJar"])
|
||||
artifact(tasks["jar"])
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
val mavenUrl = "https://repo.codemc.io/repository/maven-releases/"
|
||||
|
||||
maven(mavenUrl) {
|
||||
val mavenUsername: String? by project
|
||||
val mavenPassword: String? by project
|
||||
if (mavenUsername != null && mavenPassword != null) {
|
||||
credentials {
|
||||
username = mavenUsername
|
||||
password = mavenPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user