1- version project. modVersion
2- group project. modGroup
3-
41buildscript {
52 repositories {
63 mavenCentral()
74 maven { url = ' https://maven.minecraftforge.net/' }
85 maven { url = ' https://repo.spongepowered.org/maven/' }
96 }
10-
117 dependencies {
128 classpath ' net.minecraftforge.gradle:ForgeGradle:5.+'
139 classpath ' org.spongepowered:mixingradle:0.7-SNAPSHOT'
14- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
15- classpath " org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion "
1610 }
1711}
1812
19- apply plugin : ' idea'
20- apply plugin : ' kotlin'
13+ plugins {
14+ id ' org.jetbrains.kotlin.jvm' version " $kotlinVersion "
15+ }
16+
2117apply plugin : ' net.minecraftforge.gradle'
22- apply plugin : ' org.jetbrains.dokka'
2318apply plugin : ' org.spongepowered.mixin'
2419
20+ version project. modVersion
21+ group project. modGroup
22+
2523compileJava {
2624 sourceCompatibility = targetCompatibility = ' 1.8'
2725 options. encoding = ' UTF-8'
@@ -34,10 +32,10 @@ compileKotlin.kotlinOptions {
3432}
3533
3634repositories {
35+ mavenCentral()
3736 maven { url = ' https://repo.spongepowered.org/maven/' }
3837 maven { url = ' https://impactdevelopment.github.io/maven/' }
39- maven { url = " https://jitpack.io" }
40- mavenCentral()
38+ maven { url = ' https://jitpack.io' }
4139}
4240
4341minecraft {
@@ -70,53 +68,40 @@ dependencies {
7068 // Forge
7169 minecraft " net.minecraftforge:forge:$minecraftVersion -$forgeVersion "
7270
73- jarLibs(' org.spongepowered:mixin:0.8.3 ' ) {
71+ jarLibs(' org.spongepowered:mixin:0.8.5 ' ) {
7472 exclude module : ' commons-io'
7573 exclude module : ' gson'
7674 exclude module : ' guava'
77- exclude module : ' launchwrapper'
78- exclude module : ' log4j-core' // we want to exclude this as well because 0.8.3 includes it too new for MC
7975 }
8076
8177 // Hacky way to get mixin work
82- annotationProcessor(' org.spongepowered:mixin:0.8.3 :processor' ) {
78+ annotationProcessor(' org.spongepowered:mixin:0.8.5 :processor' ) {
8379 exclude module : ' gson'
8480 }
8581
8682 // Not the latest Reflections because it breaks Future compatibility :/
87- jarLibs(' org.reflections:reflections:0.9.12' ) {
88- exclude module : ' gson'
89- exclude module : ' guava'
90- }
91-
92- // Kotlin libs
93- // kotlin-stdlib-common and annotations aren't required at runtime
94- jarLibs(" org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion " ) {
95- exclude module : ' kotlin-stdlib-common'
96- exclude module : ' annotations'
97- }
98-
99- jarLibs(" org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion " ) {
100- exclude module : ' kotlin-stdlib-common'
101- exclude module : ' annotations'
102- }
83+ // noinspection GradlePackageUpdate
84+ jarLibs ' org.reflections:reflections:0.9.12'
10385
10486 jarLibs(" org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion " ) {
10587 exclude module : ' kotlin-stdlib-common'
10688 exclude module : ' annotations'
10789 }
10890
10991 jarLibs(" org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion " ) {
110- exclude module : ' kotlin-stdlib-common'
111- exclude module : ' annotations'
92+ exclude module : ' kotlin-stdlib'
11293 }
11394
11495 jarLibs(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion " ) {
96+ exclude module : ' kotlin-stdlib-jdk8'
11597 exclude module : ' kotlin-stdlib-common'
116- exclude module : ' annotations'
11798 }
11899
119- jarLibs " com.github.cbyrneee:DiscordIPC:e18542f600"
100+ jarLibs(' com.github.cbyrneee:DiscordIPC:e18542f600' ) {
101+ exclude module : ' junixsocket-common'
102+ exclude module : ' junixsocket-native-common'
103+ exclude module : ' json'
104+ }
120105
121106 // Add them back to compileOnly (provided)
122107 compileOnly " org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion "
@@ -134,7 +119,11 @@ dependencies {
134119
135120mixin {
136121 defaultObfuscationEnv ' searge'
137- add sourceSets. main, ' mixins.lambda.refmap.json'
122+ sourceSets {
123+ main {
124+ ext. refMap = ' mixins.lambda.refmap.json'
125+ }
126+ }
138127}
139128
140129processResources {
@@ -151,15 +140,15 @@ task sourceJar(type: Jar) { // Generate sources
151140 group ' build'
152141 description ' Assemble API library source archive'
153142
154- archiveClassifier. set( ' api-source' )
143+ archiveClassifier. set ' api-source'
155144 from sourceSets. main. allSource
156145}
157146
158147task apiJar (type : Jar ) {
159148 group ' build'
160149 description ' Assemble API library archive'
161150
162- archiveClassifier. set( ' api' )
151+ archiveClassifier. set ' api'
163152 from sourceSets. main. output
164153}
165154
@@ -176,7 +165,17 @@ jar {
176165
177166 // Copy needed libs to jar
178167 from {
179- exclude " **/module-info.class"
168+ exclude ' **/module-info.class' ,
169+ ' DebugProbesKt.bin' ,
170+ ' META-INF/maven/**' ,
171+ ' META-INF/proguard/**' ,
172+ ' META-INF/versions/**' ,
173+ ' META-INF/**.RSA' ,
174+ ' META-INF/com.android.tools/**' ,
175+ ' META-INF/*.kotlin_module' ,
176+ ' kotlin/**/*.kotlin_metadata' ,
177+ ' kotlin/**/*.kotlin_builtins' ,
178+ ' META-INF/*.version'
180179 configurations. jarLibs. collect {
181180 it. isDirectory() ? it : zipTree(it)
182181 }
0 commit comments