@@ -8,9 +8,9 @@ buildscript {
88 }
99
1010 dependencies {
11- classpath ' net.minecraftforge.gradle:ForgeGradle:4 .+'
11+ classpath ' net.minecraftforge.gradle:ForgeGradle:5 .+'
1212 classpath ' org.spongepowered:mixingradle:0.7-SNAPSHOT'
13- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$k otlin_version "
13+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$k otlinVersion "
1414 }
1515}
1616
@@ -19,28 +19,27 @@ apply plugin: 'kotlin'
1919apply plugin : ' net.minecraftforge.gradle'
2020apply plugin : ' org.spongepowered.mixin'
2121
22- compileKotlin {
23- kotlinOptions {
24- jvmTarget = " 1.8"
25- useIR = true
26- freeCompilerArgs + = ' -Xlambdas=indy'
27- }
28- }
29-
3022compileJava {
3123 sourceCompatibility = targetCompatibility = ' 1.8'
3224 options. encoding = ' UTF-8'
3325}
3426
27+ compileKotlin. kotlinOptions {
28+ freeCompilerArgs + = ' -Xlambdas=indy'
29+ freeCompilerArgs + = ' -Xopt-in=kotlin.RequiresOptIn'
30+ freeCompilerArgs + = ' -Xopt-in=kotlin.contracts.ExperimentalContracts'
31+ }
32+
3533repositories {
3634 maven { url = ' https://repo.spongepowered.org/repository/maven-public/' }
3735 maven { url = ' https://impactdevelopment.github.io/maven/' }
3836 maven { url = " https://jitpack.io" }
37+ mavenCentral()
3938}
4039
4140
4241minecraft {
43- mappings channel : ' stable ' , version : ' 39-1.12 '
42+ mappings channel : " $m appingsChannel " , version : " $m appingsVersion "
4443
4544 runs {
4645 client {
@@ -51,12 +50,6 @@ minecraft {
5150
5251 property ' forge.logging.markers' , ' SCAN,REGISTRIES,REGISTRYDUMP'
5352 property ' forge.logging.console.level' , ' debug'
54-
55- mods {
56- pluginexample {
57- source sourceSets. main
58- }
59- }
6053 }
6154 }
6255}
@@ -72,13 +65,12 @@ configurations {
7265}
7366
7467dependencies {
75- minecraft ' net.minecraftforge:forge:1.12.2-14.23.5.2860 '
68+ minecraft " net.minecraftforge:forge:$m inecraftVersion - $f orgeVersion "
7669
77- // API coming soon
78- // implementation 'com.github.lambda-client:lambda:2.06'
79- implementation(files(" lib/lambda-3.1-api.jar" ))
70+ // Online maven dependency coming soon
71+ implementation files(" lib/lambda-3.1-api.jar" )
8072
81- implementation(' org.spongepowered:mixin:0.7.11-SNAPSHOT ' ) {
73+ implementation(' org.spongepowered:mixin:0.8.3 ' ) {
8274 exclude module : ' commons-io'
8375 exclude module : ' gson'
8476 exclude module : ' guava'
@@ -87,51 +79,69 @@ dependencies {
8779 }
8880
8981 // Hacky way to get mixin work
90- annotationProcessor(' org.spongepowered:mixin:0.8.2 :processor' ) {
82+ annotationProcessor(' org.spongepowered:mixin:0.8.3 :processor' ) {
9183 exclude module : ' gson'
9284 }
9385
9486 // Kotlin libs
9587 // kotlin-stdlib-common and annotations aren't required at runtime
96- implementation(" org.jetbrains.kotlin:kotlin-stdlib:$k otlin_version " ) {
88+ implementation(" org.jetbrains.kotlin:kotlin-stdlib:$k otlinVersion " ) {
9789 exclude module : ' kotlin-stdlib-common'
9890 exclude module : ' annotations'
9991 }
10092
101- implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk7:$k otlin_version " ) {
93+ implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk7:$k otlinVersion " ) {
10294 exclude module : ' kotlin-stdlib-common'
10395 exclude module : ' annotations'
10496 }
10597
106- implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8:$k otlin_version " ) {
98+ implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8:$k otlinVersion " ) {
10799 exclude module : ' kotlin-stdlib-common'
108100 exclude module : ' annotations'
109101 }
110102
111- implementation(" org.jetbrains.kotlin:kotlin-reflect:$k otlin_version " ) {
103+ implementation(" org.jetbrains.kotlin:kotlin-reflect:$k otlinVersion " ) {
112104 exclude module : ' kotlin-stdlib-common'
113105 exclude module : ' annotations'
114106 }
115107
116- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$k otlinx_coroutines_version " ) {
108+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$k otlinxCoroutinesVersion " ) {
117109 exclude module : ' kotlin-stdlib-common'
118110 exclude module : ' annotations'
119111 }
120112
121113 // Add them back to compileOnly (provided)
122- compileOnly " org.jetbrains.kotlin:kotlin-stdlib-common:$k otlin_version "
123- compileOnly ' org.jetbrains:annotations:20.1 .0'
114+ compileOnly " org.jetbrains.kotlin:kotlin-stdlib-common:$k otlinVersion "
115+ compileOnly ' org.jetbrains:annotations:23.0 .0'
124116
125117 // This Baritone will NOT be included in the jar
126118 implementation ' com.github.cabaletta:baritone:1.2.14'
127119
120+ // Unit Testing frameworks
121+ testImplementation ' org.junit.jupiter:junit-jupiter-api:5.8.2'
122+ testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.8.2'
123+
128124 // Add your dependencies below
129125 // jarLibs 'com.lambda:example:1.0.0'
130126}
131127
132128mixin {
133129 defaultObfuscationEnv ' searge'
134- add sourceSets. main, ' mixins.lambda.refmap.json'
130+ add sourceSets. main, ' mixins.ExamplePlugin.refmap.json'
131+ }
132+
133+ processResources {
134+ exclude ' **/rawimagefiles'
135+
136+ from(sourceSets. main. resources. srcDirs) {
137+ duplicatesStrategy = DuplicatesStrategy . INCLUDE
138+ include ' plugin_info.json'
139+ expand ' version' : project. version
140+ }
141+ }
142+
143+ test {
144+ useJUnitPlatform()
135145}
136146
137147jar. finalizedBy(' reobfJar' )
0 commit comments