Begin 1.20 port (god this is horrible)

This commit is contained in:
Andrew-71 2023-07-29 21:07:20 +03:00
parent 8730ae91a0
commit 987a18c360
105 changed files with 757 additions and 2300 deletions

View file

@ -1,36 +1,32 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id 'java'
id 'idea'
id 'maven-publish'
id 'fabric-loom'
}
base {
archivesName = "${mod_name}-fabric-${minecraft_version}"
}
archivesBaseName = "${mod_name}-fabric-${minecraft_version}"
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
implementation project(":Common")
implementation project(":common")
// Blame CC: Restitched for this...
modApi 'com.electronwill.night-config:core:3.6.3'
modApi 'com.electronwill.night-config:toml:3.6.3'
modApi 'org.squiddev:Cobalt:0.5.5'
modImplementation "io.netty:netty-codec-http:4.1.77.Final"
modImplementation "curse.maven:tardim-531315:4453924"
//modImplementation "curse.maven:cc-restitched-462672:3908334"
//.. maybe?
modApi "curse.maven:cc-restitched-462672:3908334"
modCompileOnly "curse.maven:cc-restitched-462672:3908334"
// Create!
modCompileOnly "curse.maven:create-fabric-624165:4597892"
// Obfuscation forced my hand, TARDIM will be here for now :/
modImplementation(files("/Users/andreynikitin/Downloads/tardim.jar"))
modCompileOnly("cc.tweaked:cc-tweaked-$minecraft_version-fabric-api:$cc_version")
}
loom {
if (project(":common").file("src/main/resources/${mod_id}.accesswidener").exists()) {
accessWidenerPath.set(project(":common").file("src/main/resources/${mod_id}.accesswidener"))
}
mixin {
defaultRefmapName.set("${mod_id}.refmap.json")
}
runs {
client {
client()
@ -47,30 +43,27 @@ loom {
}
}
processResources {
from project(":Common").sourceSets.main.resources
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
tasks.withType(JavaCompile).configureEach {
source(project(":common").sourceSets.main.allSource)
}
tasks.withType(Javadoc).configureEach {
source(project(":common").sourceSets.main.allJava)
}
tasks.named("sourcesJar", Jar) {
from(project(":common").sourceSets.main.allSource)
}
tasks.withType(JavaCompile) {
source(project(":Common").sourceSets.main.allSource)
processResources {
from project(":common").sourceSets.main.resources
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
artifactId base.archivesName.get()
from components.java
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")