diff --git a/.gitmodules b/.gitmodules index 2d04f9b..19ce018 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "api"] path = api url = https://github.com/NikkyAI/MatterLinkApi.git +[submodule "Jankson"] + path = Jankson + url = https://github.com/falkreon/Jankson.git diff --git a/1.10.2/build.gradle b/1.10.2/build.gradle index f39840a..744b914 100644 --- a/1.10.2/build.gradle +++ b/1.10.2/build.gradle @@ -4,18 +4,20 @@ buildscript { jcenter() maven { url = "http://files.minecraftforge.net/maven" } mavenCentral() + maven { + url 'https://plugins.gradle.org/m2/' + } } dependencies { classpath "net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT" + classpath "com.github.jengelman.gradle.plugins:shadow:2.0.0" + classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.10" } } -plugins { - id "com.github.johnrengelman.shadow" version "1.2.4" - id 'com.matthewprenger.cursegradle' version '1.0.10' -} - apply plugin: 'net.minecraftforge.gradle.forge' +apply plugin: "com.github.johnrengelman.shadow" +apply plugin: 'com.matthewprenger.cursegradle' version = project.mc_version + "-" + project.mod_version @@ -31,9 +33,12 @@ dependencies { shadowJar { classifier '' + relocate "blue.endless", "matterlink.repack.blue.endless" + dependencies { include project(":core") include project(":api") + include project(":Jankson") } exclude 'dummyThing' diff --git a/1.10.2/src/main/kotlin/matterlink/EventHandler.kt b/1.10.2/src/main/kotlin/matterlink/EventHandler.kt index bc1d0f3..07e0f6c 100644 --- a/1.10.2/src/main/kotlin/matterlink/EventHandler.kt +++ b/1.10.2/src/main/kotlin/matterlink/EventHandler.kt @@ -43,6 +43,7 @@ object EventHandler { @SubscribeEvent @JvmStatic fun chatEvent(e: ServerChatEvent) { + if(e.isCanceled) return ChatProcessor.sendToBridge( user = e.player.displayName.unformattedText, msg = e.message, diff --git a/1.11.2/build.gradle b/1.11.2/build.gradle index 7e4bc27..afa2478 100644 --- a/1.11.2/build.gradle +++ b/1.11.2/build.gradle @@ -3,18 +3,23 @@ buildscript { jcenter() maven { url = "http://files.minecraftforge.net/maven" } mavenCentral() + maven { + url = 'https://oss.sonatype.org/content/groups/public' + } + maven { + url = "https://plugins.gradle.org/m2/" + } } dependencies { classpath "net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT" + classpath "com.github.jengelman.gradle.plugins:shadow:2.0.0" + classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.10" } } -plugins { - id "com.github.johnrengelman.shadow" version "1.2.4" - id 'com.matthewprenger.cursegradle' version '1.0.10' -} - apply plugin: 'net.minecraftforge.gradle.forge' +apply plugin: "com.github.johnrengelman.shadow" +apply plugin: 'com.matthewprenger.cursegradle' version = project.mc_version + "-" + project.mod_version @@ -30,9 +35,12 @@ dependencies { shadowJar { classifier '' + relocate "blue.endless", "matterlink.repack.blue.endless" + dependencies { include project(":core") include project(":api") + include project(":Jankson") } exclude 'dummyThing' diff --git a/1.11.2/src/main/kotlin/matterlink/EventHandler.kt b/1.11.2/src/main/kotlin/matterlink/EventHandler.kt index 3eb8ad0..87d40ca 100644 --- a/1.11.2/src/main/kotlin/matterlink/EventHandler.kt +++ b/1.11.2/src/main/kotlin/matterlink/EventHandler.kt @@ -44,6 +44,7 @@ object EventHandler { @SubscribeEvent @JvmStatic fun chatEvent(e: ServerChatEvent) { + if(e.isCanceled) return ChatProcessor.sendToBridge( user = e.player.displayName.unformattedText, msg = e.message, diff --git a/1.12.2/build.gradle b/1.12.2/build.gradle index b3d4791..6a8f2f4 100644 --- a/1.12.2/build.gradle +++ b/1.12.2/build.gradle @@ -3,18 +3,23 @@ buildscript { jcenter() maven { url = "http://files.minecraftforge.net/maven" } mavenCentral() + maven { + url = 'https://oss.sonatype.org/content/groups/public' + } + maven { + url = "https://plugins.gradle.org/m2/" + } } dependencies { classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT" + classpath "com.github.jengelman.gradle.plugins:shadow:2.0.0" + classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.10" } } -plugins { - id "com.github.johnrengelman.shadow" version "1.2.4" - id 'com.matthewprenger.cursegradle' version '1.0.10' -} - apply plugin: 'net.minecraftforge.gradle.forge' +apply plugin: "com.github.johnrengelman.shadow" +apply plugin: 'com.matthewprenger.cursegradle' version = project.mc_version + "-" + project.mod_version @@ -30,9 +35,12 @@ dependencies { shadowJar { classifier '' + relocate "blue.endless", "matterlink.repack.blue.endless" + dependencies { - include project(":core") + include project(':core') include project(":api") + include project(":Jankson") } exclude 'dummyThing' diff --git a/1.12.2/src/main/kotlin/matterlink/EventHandler.kt b/1.12.2/src/main/kotlin/matterlink/EventHandler.kt index 927a0c3..f9fb90e 100644 --- a/1.12.2/src/main/kotlin/matterlink/EventHandler.kt +++ b/1.12.2/src/main/kotlin/matterlink/EventHandler.kt @@ -36,6 +36,7 @@ object EventHandler { @SubscribeEvent @JvmStatic fun chatEvent(e: ServerChatEvent) { + if(e.isCanceled) return ChatProcessor.sendToBridge( user = e.player.displayName.unformattedText, msg = e.message, diff --git a/1.7.10/build.gradle b/1.7.10/build.gradle index 882c360..5d2c296 100644 --- a/1.7.10/build.gradle +++ b/1.7.10/build.gradle @@ -3,17 +3,18 @@ buildscript { jcenter() maven { url = "http://files.minecraftforge.net/maven" } mavenCentral() + maven { + url = "https://plugins.gradle.org/m2/" + } } dependencies { classpath "net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT" + classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.10" } } -plugins { - id 'com.matthewprenger.cursegradle' version '1.0.10' -} - apply plugin: 'forge' +apply plugin: 'com.matthewprenger.cursegradle' version = project.mc_version + "-" + project.mod_version @@ -27,8 +28,9 @@ configurations { } dependencies { - shade project(":core") + shade project(':core') shade project(":api") + shade project(":Jankson") } minecraft { @@ -40,8 +42,9 @@ minecraft { srgExtra "PK: kotlin matterlink/repack/kotlin" srgExtra "PK: org/jetbrains/annotations matterlink/repack/org/jetbrains/annotations" // srgExtra "PK: org/apache/http matterlink/repack/org/apache/http" - //srgExtra "PK: org/apache/commons matterlink/repack/org/apache/commons" +// srgExtra "PK: org/apache/commons matterlink/repack/org/apache/commons" srgExtra "PK: org/intellij matterlink/repack/org/intellij" + srgExtra "PK: blue/endless matterlink/repack/blue/endless" } compileKotlin.doFirst { diff --git a/1.7.10/src/main/kotlin/matterlink/EventHandler.kt b/1.7.10/src/main/kotlin/matterlink/EventHandler.kt index bbae28b..f6f6234 100644 --- a/1.7.10/src/main/kotlin/matterlink/EventHandler.kt +++ b/1.7.10/src/main/kotlin/matterlink/EventHandler.kt @@ -40,6 +40,7 @@ object EventHandler { //FORGE-DEPENDENT @SubscribeEvent fun chatEvent(e: ServerChatEvent) { + if(e.isCanceled) return ChatProcessor.sendToBridge( user = e.player.displayName, msg = e.message, diff --git a/Jankson b/Jankson new file mode 160000 index 0000000..ce97d00 --- /dev/null +++ b/Jankson @@ -0,0 +1 @@ +Subproject commit ce97d00016a58a4402d919155efa0fccec5ea9e6 diff --git a/build.gradle b/build.gradle index 12a58db..ff987ae 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,11 @@ subprojects { name = "shadowfacts" url = "http://maven.shadowfacts.net/" } + ivy { + //Resolves jankson + name "endless.blue dependency mirror"; + artifactPattern "https://endless.blue/files/ivy/[module]-[revision].[ext]"; + } } } \ No newline at end of file diff --git a/core/build.gradle b/core/build.gradle index f1e7861..7bc3123 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,28 +1,31 @@ buildscript { - ext.kotlin_version = '1.2.21' + ext.kotlin_version = '1.2.41' repositories { jcenter() mavenCentral() + maven { + url = 'https://oss.sonatype.org/content/groups/public' + } + maven { + url = "https://plugins.gradle.org/m2/"; + } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "com.github.jengelman.gradle.plugins:shadow:2.0.0" } } -plugins { - id "com.github.johnrengelman.shadow" version "1.2.4" -} - apply plugin: 'kotlin' +apply plugin: "com.github.johnrengelman.shadow" sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. -repositories { - jcenter() -} - dependencies { compile project(':api') + + compile project(":Jankson") + compile group: 'commons-logging', name: 'commons-logging', version: '1.1.3' compile group: 'com.google.code.gson', name: 'gson', version: '+' @@ -40,5 +43,6 @@ shadowJar { dependencies { include project(":api") + include project(":Jankson") } } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ab532ab..99b7d05 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip diff --git a/settings.gradle b/settings.gradle index c76dbca..6755ab8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,4 @@ rootProject.name = 'MatterLink' -include 'core', 'api', '1.12.2', '1.11.2', '1.10.2', '1.7.10' \ No newline at end of file +include 'core', 'api' +include 'Jankson' +include '1.12.2', '1.11.2', '1.10.2', '1.7.10' \ No newline at end of file