Skip to content

Commit

Permalink
Updated to an edited loom 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
irunatbullets committed Apr 12, 2023
1 parent de10e09 commit 98c2cfa
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 36 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

#### Fabric <> Discord bridge

### Extremely Important - Before trying to build this branch

The 1.16.5 version of DisFabric requires this edit of fabric-loom, https://github.com/irunatbullets/fabric-loom/tree/aof3/0.7. Once you have your copy of it, run `gradle publishToMavenLocal -x test`. You should then be able to build DisFabric without an issues.

Oh, and make sure you're using Java 8!

### Features:

+ Chat integration
Expand Down
52 changes: 20 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.1-SNAPSHOT'
id 'fabric-loom' version '0.7.local'
id 'maven-publish'
id 'project-report'
}
Expand All @@ -13,54 +13,47 @@ group = project.maven_group

repositories {
jcenter()
mavenCentral()
maven {
name = "Fabric"
url = "https://maven.fabricmc.net/"
url = "http://maven.fabricmc.net/"
}
maven {
name 'm2-dv8tion'
url 'https://m2.dv8tion.net/releases'
}
maven { url "https://maven.shedaniel.me/" }
}

dependencies {

minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"

modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

include(modImplementation ("net.dv8tion:JDA:4.2.1_253") {
include(modCompile ("net.dv8tion:JDA:4.2.0_246") {
exclude module: 'opus-java'
})
include(modApi("me.sargunvohra.mcmods:autoconfig1u:3.3.1")) {
include(modApi("me.sargunvohra.mcmods:autoconfig1u:3.2.0-unstable")) {
exclude group: "net.fabricmc.fabric-api", module: "fabric-api"
}
include(modApi("me.shedaniel.cloth:cloth-config-fabric:5.0.34")) {
include(modApi("me.shedaniel.cloth:config-2:4.6.0")) {
exclude group: "net.fabricmc.fabric-api", module: "fabric-api"
}
include(modImplementation ("com.mashape.unirest:unirest-java:1.4.9"))
include(modImplementation (group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.17.1'))
include(modCompile("com.mashape.unirest:unirest-java:1.4.9"))
include(modCompile(group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.8.1'))

include group: 'org.json', name: 'json', version: '20220320'
include group: 'org.json', name: 'json', version: '20160212'
include group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.2'
include group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'
include group: 'org.apache.httpcomponents', name: 'httpcore-nio', version: '4.4.4'
include group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.4'
include group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
include 'com.fasterxml.jackson.core:jackson-databind:2.12.7.1'
include group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.1'
include "com.fasterxml.jackson.core:jackson-databind:2.10.1"
include "net.sf.trove4j:trove4j:3.0.3"
include 'org.apache.commons:commons-collections4:4.3'
include "org.apache.commons:commons-collections4:4.1"
include "com.google.code.findbugs:jsr305:3.0.2"
include "org.jetbrains:annotations:16.0.1"
include "org.slf4j:slf4j-api:1.7.25"
include "com.neovisionaries:nv-websocket-client:2.10"
include "com.squareup.okhttp3:okhttp:3.13.0"
include "commons-logging:commons-logging:1.2"
include 'commons-codec:commons-codec:1.13'
include "commons-codec:commons-codec:1.9"
include "com.fasterxml.jackson.core:jackson-annotations:2.10.1"
include "com.fasterxml.jackson.core:jackson-core:2.10.1"
include "com.squareup.okio:okio:1.17.2"
Expand All @@ -70,30 +63,25 @@ dependencies {
processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
}

from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}

tasks.withType(JavaCompile) {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 8
options.encoding = "UTF-8"
}


task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
from "LICENSE"
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pluginManagement {
repositories {
mavenLocal()
jcenter()
maven {
name = 'Fabric'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public static class Texts {
@Comment(value = "Minecraft -> Discord\n"+
"Server started message")
@ConfigEntry.Category(value = "Texts")
public String serverStarted = "**Server started!**";
public String serverStarted = ":green_circle: **Server started!**";

@Comment(value = "Minecraft -> Discord\n"+
"Server stopped message")
@ConfigEntry.Category(value = "Texts")
public String serverStopped = "**Server stopped!**";
public String serverStopped = ":octagonal_sign: **Server stopped!**";

@Comment(value = "Minecraft -> Discord\n"+
"Join server\n"+
Expand All @@ -104,7 +104,7 @@ public static class Texts {
"%playername% | Player name\n"+
"%deathmessage% | Death message")
@ConfigEntry.Category(value = "Texts")
public String deathMessage = "**%deathmessage%**";
public String deathMessage = ":skull: **%deathmessage%**";

@Comment(value = "Minecraft -> Discord\n"+
"Advancement type task message\n"+
Expand Down

0 comments on commit 98c2cfa

Please sign in to comment.