Skip to content

Commit f548aed

Browse files
committed
Remove Kotlin
1 parent b045aec commit f548aed

File tree

8 files changed

+3
-60
lines changed

8 files changed

+3
-60
lines changed

.editorconfig

-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ max_line_length = 160
1212
ij_continuation_indent_size = 4
1313
ij_java_class_count_to_use_import_on_demand = 1000
1414

15-
[*.{kt,kts}]
16-
# 2147483647 = some max int (infinity)
17-
ij_kotlin_name_count_to_use_star_import = 2147483647
18-
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
19-
2015
[*.{json,mcmeta,json5}]
2116
indent_size = 2
2217
ij_json_keep_blank_lines_in_code = 1

build.gradle.kts

+1-33
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22
import net.fabricmc.loom.api.LoomGradleExtensionAPI
33
import net.fabricmc.loom.task.RemapJarTask
4-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5-
import org.jmailen.gradle.kotlinter.KotlinterExtension
64

75
plugins {
86
// 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,
108
// so we won't apply those plugins here. Only the assemble task is used in the root project.
119
// See https://docs.gradle.org/current/userguide/base_plugin.html.
1210
base
1311

1412
// Set up specific versions of the plugins we're using.
1513
// Note that of all these plugins, only the Architectury plugin needs to be applied.
16-
kotlin("jvm") version "1.9.21" apply false
17-
1814
id("architectury-plugin") version "3.4.+"
1915
id("dev.architectury.loom") version "1.4.+" apply false
2016

21-
id("org.jmailen.kotlinter") version "3.12.0" apply false
2217
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
2318
}
2419

@@ -62,10 +57,8 @@ tasks {
6257

6358
// Do the shared set up for the Minecraft subprojects.
6459
subprojects {
65-
apply(plugin = "org.jetbrains.kotlin.jvm")
6660
apply(plugin = "dev.architectury.loom")
6761
apply(plugin = "architectury-plugin")
68-
apply(plugin = "org.jmailen.kotlinter")
6962

7063
// Set Java version.
7164
extensions.configure<JavaPluginExtension> {
@@ -151,37 +144,12 @@ subprojects {
151144
})
152145
}
153146

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-
166147
tasks {
167148
withType<JavaCompile> {
168149
options.encoding = "UTF-8"
169150
options.release.set(21)
170151
}
171152

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-
185153
// Include the license in the jar files.
186154
// See the dependencies section above for why this is in quotes.
187155
"jar"(Jar::class) {

common/build.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ loom {
1616
}
1717

1818
dependencies {
19-
// Add dependencies on the required Kotlin modules.
20-
implementation(kotlin("stdlib-jdk8"))
2119
implementation("blue.endless:jankson:${rootProject.property("jankson")}")
2220

2321
// Just for @Environment and mixin deps :)

common/src/main/java/juuxel/adorn/compat/jei/AdornJeiPlugin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package juuxel.adorn.compat.jei;
22

3+
import com.google.common.collect.Lists;
34
import juuxel.adorn.AdornCommon;
45
import juuxel.adorn.block.AdornBlocks;
56
import juuxel.adorn.client.gui.screen.TradingStationScreen;
67
import juuxel.adorn.recipe.AdornRecipes;
7-
import kotlin.collections.CollectionsKt;
88
import me.shedaniel.rei.plugincompatibilities.api.REIPluginCompatIgnore;
99
import mezz.jei.api.IModPlugin;
1010
import mezz.jei.api.JeiPlugin;
@@ -43,7 +43,7 @@ public void registerRecipes(IRecipeRegistration registration) {
4343
private <C extends Inventory, T extends Recipe<C>> void registerRecipes(
4444
IRecipeRegistration registration, RecipeType<T> type, mezz.jei.api.recipe.RecipeType<T> jeiType) {
4545
RecipeManager manager = MinecraftClient.getInstance().world.getRecipeManager();
46-
registration.addRecipes(jeiType, CollectionsKt.map(manager.listAllOfType(type), RecipeEntry::value));
46+
registration.addRecipes(jeiType, Lists.transform(manager.listAllOfType(type), RecipeEntry::value));
4747
}
4848

4949
@Override

fabric/build.gradle.kts

-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ dependencies {
6868
// Standard Fabric mod setup.
6969
modImplementation("net.fabricmc:fabric-loader:${rootProject.property("fabric-loader")}")
7070
modImplementation("net.fabricmc.fabric-api:fabric-api:${rootProject.property("fabric-api")}")
71-
modApi("net.fabricmc:fabric-language-kotlin:${rootProject.property("fabric-kotlin")}") {
72-
// TODO: Check if this has been updated
73-
exclude(group = "net.fabricmc", module = "fabric-loader")
74-
}
7571

7672
// Bundle Jankson in the mod and use it as a regular "implementation" library.
7773
bundle(implementation("blue.endless:jankson:${rootProject.property("jankson")}")!!)

fabric/src/main/resources/fabric.mod.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"depends": {
4545
"minecraft": "~1.20.4",
4646
"fabricloader": ">=0.15.2",
47-
"fabric-language-kotlin": "^1.10.16",
4847
"fabric-api": ">=0.91.2"
4948
},
5049
"conflicts": {

forge/build.gradle.kts

-7
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ dependencies {
2929
// Add dependency on NeoForge. This is mainly used for generating the patched Minecraft jar with NeoForge classes.
3030
neoForge("net.neoforged:neoforge:${rootProject.property("neoforge-version")}")
3131

32-
// Add Kotlin.
33-
implementation(kotlin("stdlib"))
34-
forgeRuntimeLibrary(kotlin("stdlib", version = kotlin.coreLibrariesVersion))
35-
(bundle(kotlin("stdlib")) as ModuleDependency)
36-
.exclude(group = "org.jetbrains", module = "annotations")
37-
3832
// Depend on the common project. The "namedElements" configuration contains the non-remapped
3933
// classes and resources of the project.
4034
// It follows Gradle's own convention of xyzElements for "outgoing" configurations like apiElements.
@@ -66,7 +60,6 @@ dependencies {
6660

6761
tasks {
6862
shadowJar {
69-
relocate("kotlin", "juuxel.adorn.relocated.kotlin")
7063
relocate("blue.endless.jankson", "juuxel.adorn.relocated.jankson")
7164
}
7265

gradle.properties

-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ org.gradle.jvmargs=-Xmx3G -XX:+UseG1GC
22
# Enable parallel task execution, this makes a multiproject
33
# a bit faster.
44
org.gradle.parallel=true
5-
kotlin.code.style = official
6-
# Disable the default dependency on the Kotlin stdlib.
7-
# This is needed for Fabric mods since we want the Kotlin version
8-
# from Fabric Language Kotlin.
9-
kotlin.stdlib.default.dependency = false
105

116
# Adorn
127
mod-version = 5.3.0
@@ -19,7 +14,6 @@ menu-mappings = 1.19.3+1
1914
# Fabric
2015
fabric-loader = 0.15.2
2116
fabric-api = 0.91.2+1.20.4
22-
fabric-kotlin = 1.10.16+kotlin.1.9.21
2317

2418
# NeoForge
2519
neoforge-version = 20.4.200

0 commit comments

Comments
 (0)