|
1 | 1 | import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
2 | 2 | import net.fabricmc.loom.api.LoomGradleExtensionAPI
|
3 | 3 | import net.fabricmc.loom.task.RemapJarTask
|
4 |
| -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
5 |
| -import org.jmailen.gradle.kotlinter.KotlinterExtension |
6 | 4 |
|
7 | 5 | plugins {
|
8 | 6 | // Apply the base plugin which mostly defines useful "build lifecycle" tasks like
|
9 |
| - // assemble, check and build. The root project doesn't contain any Java or Kotlin code, |
| 7 | + // assemble, check and build. The root project doesn't contain any code, |
10 | 8 | // so we won't apply those plugins here. Only the assemble task is used in the root project.
|
11 | 9 | // See https://docs.gradle.org/current/userguide/base_plugin.html.
|
12 | 10 | base
|
13 | 11 |
|
14 | 12 | // Set up specific versions of the plugins we're using.
|
15 | 13 | // Note that of all these plugins, only the Architectury plugin needs to be applied.
|
16 |
| - kotlin("jvm") version "1.9.21" apply false |
17 |
| - |
18 | 14 | id("architectury-plugin") version "3.4.+"
|
19 | 15 | id("dev.architectury.loom") version "1.4.+" apply false
|
20 | 16 |
|
21 |
| - id("org.jmailen.kotlinter") version "3.12.0" apply false |
22 | 17 | id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
23 | 18 | }
|
24 | 19 |
|
@@ -62,10 +57,8 @@ tasks {
|
62 | 57 |
|
63 | 58 | // Do the shared set up for the Minecraft subprojects.
|
64 | 59 | subprojects {
|
65 |
| - apply(plugin = "org.jetbrains.kotlin.jvm") |
66 | 60 | apply(plugin = "dev.architectury.loom")
|
67 | 61 | apply(plugin = "architectury-plugin")
|
68 |
| - apply(plugin = "org.jmailen.kotlinter") |
69 | 62 |
|
70 | 63 | // Set Java version.
|
71 | 64 | extensions.configure<JavaPluginExtension> {
|
@@ -151,37 +144,12 @@ subprojects {
|
151 | 144 | })
|
152 | 145 | }
|
153 | 146 |
|
154 |
| - extensions.configure<KotlinterExtension> { |
155 |
| - disabledRules = arrayOf( |
156 |
| - // Disable these since we often do grouping on the parameters and args: |
157 |
| - // x: Int, y: Int, z: Int |
158 |
| - // width: Int, height: Int, depth: Int |
159 |
| - "parameter-list-wrapping", |
160 |
| - "argument-list-wrapping", |
161 |
| - // Used for minimising diffs on listOf |
162 |
| - "trailing-comma-on-call-site", |
163 |
| - ) |
164 |
| - } |
165 |
| - |
166 | 147 | tasks {
|
167 | 148 | withType<JavaCompile> {
|
168 | 149 | options.encoding = "UTF-8"
|
169 | 150 | options.release.set(21)
|
170 | 151 | }
|
171 | 152 |
|
172 |
| - withType<KotlinCompile> { |
173 |
| - // Set the Kotlin JVM target to match the Java version |
174 |
| - // for all Kotlin compilation tasks. |
175 |
| - kotlinOptions.jvmTarget = "21" |
176 |
| - |
177 |
| - kotlinOptions.freeCompilerArgs = listOf( |
178 |
| - // Compile lambdas to invokedynamic. |
179 |
| - "-Xlambdas=indy", |
180 |
| - // Compile interface functions with bodies to default methods. |
181 |
| - "-Xjvm-default=all", |
182 |
| - ) |
183 |
| - } |
184 |
| - |
185 | 153 | // Include the license in the jar files.
|
186 | 154 | // See the dependencies section above for why this is in quotes.
|
187 | 155 | "jar"(Jar::class) {
|
|
0 commit comments