arrow-kt libraries bundled for Minecraft

Shadow arrow for forge

Signed-off-by: Naomi Roberts <mia@naomieow.xyz>

lesbian.skin 44c742e5 6212b8dd

verified
+48 -16
+3
README.md
··· 97 97 - `io.arrow-kt:arrow-collectors` 98 98 - `io.arrow-kt:arrow-optics` 99 99 - `io.arrow-kt:arrow-resilience` 100 + - `io.arrow-kt:arrow-autoclose` 101 + - `io.arrow-kt:arrow-eval` 102 + - `io.arrow-kt:arrow-functions`
+39 -14
build.gradle.kts
··· 1 + import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar 2 + import earth.terrarium.cloche.api.target.ForgeLikeTarget 1 3 import org.gradle.kotlin.dsl.configure 2 4 import org.gradle.kotlin.dsl.invoke 3 5 import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension ··· 6 8 id("maven-publish") 7 9 alias(libs.plugins.cloche) 8 10 kotlin("jvm") version libs.versions.kotlin 11 + id("com.gradleup.shadow") version libs.versions.shadow 9 12 } 10 13 14 + 15 + 11 16 val modGroup = "xyz.naomieow" 12 17 group = modGroup 13 18 val modVersion = "2.1.2" ··· 15 20 16 21 repositories { 17 22 cloche { 18 - mavenCentral() 19 23 main() 20 24 mavenForge() 21 25 mavenFabric() ··· 24 28 mavenNeoforgedMeta() 25 29 } 26 30 } 31 + 27 32 28 33 val libraries = listOf( 29 34 libs.arrow.core, 30 35 libs.arrow.annotations, 36 + libs.arrow.fx.coroutines, 37 + libs.arrow.autoclose, 38 + libs.arrow.resilience, 39 + libs.arrow.optics, 40 + libs.arrow.fx.stm, 41 + libs.arrow.collectors, 42 + libs.arrow.eval, 43 + libs.arrow.functions, 31 44 libs.arrow.atomic, 32 - libs.arrow.collectors, 33 45 libs.arrow.serialization, 34 - libs.arrow.fx.coroutines, 35 - libs.arrow.fx.stm, 36 - libs.arrow.optics, 37 - libs.arrow.resilience, 38 46 ) 39 47 48 + val shadowArrow: Configuration by configurations.creating 49 + 50 + dependencies { 51 + libraries.forEach { 52 + shadowArrow(it) 53 + } 54 + } 55 + 40 56 cloche { 41 57 metadata { 42 58 modId = "marrow" ··· 80 96 minecraftVersion = "1.20.1" 81 97 loaderVersion = libs.versions.forge.loader 82 98 83 - dependencies { 84 - libraries.forEach { 85 - include(it) 86 - } 99 + metadata { 100 + modLoader = "lowcodefml" 87 101 } 88 102 } 89 103 ··· 91 105 minecraftVersion = "1.20.4" 92 106 loaderVersion = libs.versions.neoforge.loader 93 107 94 - dependencies { 95 - libraries.forEach { 96 - include(it) 97 - } 108 + metadata { 109 + modLoader = "lowcodefml" 110 + } 111 + } 112 + 113 + targets.withType<ForgeLikeTarget>().all { 114 + tasks.register<ShadowJar>("${name}FatJar") { 115 + from(zipTree(finalJar)) 116 + configurations = listOf(shadowArrow) 117 + } 118 + } 119 + 120 + artifacts { 121 + targets.withType<ForgeLikeTarget>().all { 122 + archives(tasks.named("${name}FatJar")) 98 123 } 99 124 } 100 125 }
+4
libs.versions.toml
··· 4 4 kotlin = "2.1.0" 5 5 arrow = "2.1.2" 6 6 devauth = "1.2.1" 7 + shadow = "8.3.8" 7 8 # Fabric 8 9 fabric-loader = "0.16.14" 9 10 fabric-kotlin = "1.13.0+kotlin.2.1.0" ··· 20 21 # Common 21 22 arrow-core = { module = "io.arrow-kt:arrow-core", version.ref = "arrow" } 22 23 arrow-annotations = { module = "io.arrow-kt:arrow-annotations", version.ref = "arrow" } 24 + arrow-autoclose = { module = "io.arrow-kt:arrow-autoclose", version.ref = "arrow" } 23 25 arrow-atomic = { module = "io.arrow-kt:arrow-atomic", version.ref = "arrow" } 24 26 arrow-collectors = { module = "io.arrow-kt:arrow-collectors", version.ref = "arrow" } 25 27 arrow-serialization = { module = "io.arrow-kt:arrow-core-serialization", version.ref = "arrow" } ··· 27 29 arrow-fx-stm = { module = "io.arrow-kt:arrow-fx-stm", version.ref = "arrow" } 28 30 arrow-optics = { module = "io.arrow-kt:arrow-optics", version.ref = "arrow" } 29 31 arrow-resilience = { module = "io.arrow-kt:arrow-resilience", version.ref = "arrow" } 32 + arrow-eval = { module = "io.arrow-kt:arrow-eval", version.ref = "arrow" } 33 + arrow-functions = { module = "io.arrow-kt:arrow-functions", version.ref = "arrow" } 30 34 # Fabric 31 35 fabric-kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "fabric-kotlin" } 32 36 fabric-modmenu = { module = "com.terraformersmc:modmenu", version.ref = "fabric-modmenu" }
+1 -1
testmod/build.gradle.kts
··· 3 3 4 4 cloche { 5 5 metadata { 6 - modId = "marrow-test" 6 + modId = "marrow_test" 7 7 name = "Marrow Testmod" 8 8 license = "Apache-2.0" 9 9 }
+1 -1
testmod/src/common/main/kotlin/xyz/naomieow/marrow_testmod/MarrowTestmod.kt
··· 4 4 import org.slf4j.Logger 5 5 import org.slf4j.LoggerFactory 6 6 7 - public const val MOD_ID: String = "marrow-test" 7 + public const val MOD_ID: String = "marrow_test" 8 8 public const val MOD_NAME: String = "Marrow Testmod" 9 9 10 10 public object MarrowTestmod: Logger by LoggerFactory.getLogger(MOD_NAME) {