repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

make rce easier

+308 -244
+1
.gitignore
··· 109 109 .gradle 110 110 build/ 111 111 build*/ 112 + !buildSrc/ 112 113 /src/main/generated 113 114 114 115 # Ignore Gradle GUI config
+15 -239
build.gradle.kts
··· 8 8 import groovy.json.JsonOutput 9 9 import `java.nio`.file.Files; 10 10 import kotlin.io.path.deleteIfExists 11 + import util.P 12 + 13 + buildscript { 14 + repositories { 15 + mavenCentral() 16 + maven { url = uri("https://maven.fabricmc.net") } 17 + } 18 + dependencies { 19 + classpath("net.fabricmc:fabric-loom:1.13-SNAPSHOT") 20 + } 21 + } 11 22 12 23 plugins { 13 24 id("fabric-loom") version "1.13-SNAPSHOT" ··· 18 29 id("org.eu.net.pool.mc-plugin") version "0.1.1" 19 30 } 20 31 21 - allprojects { 22 - try { 23 - tasks.named("downloadRenderDoc") { 24 - setProperty("output", file("$buildDir/renderdoc_1.37.tar.gz")) 25 - } 26 - 27 - tasks.named("extractRenderDoc") { 28 - enabled = false 29 - } 30 - 31 - val erd by tasks.register<Sync>("myExtractRenderDoc") { 32 - dependsOn("downloadRenderDoc") 33 - from(tarTree(resources.gzip("$buildDir/renderdoc_1.37.tar.gz"))) 34 - into("$buildDir/renderdoc") 35 - } 36 - 37 - tasks.named("runClientRenderDoc") { 38 - dependsOn(erd) 39 - } 40 - } catch (ignored: UnknownTaskException) {} 41 - } 42 - 43 - val release: Boolean = !System.getenv("release").isNullOrEmpty() 44 - allprojects { 45 - val p = P(project) 46 - val modid: String by project.properties 47 - ext.set("p", p) 48 - version = project.property("mod_version") as String 49 - if (!release) version = "${version}+${p.commit_id.take(7)}" 50 - group = rootProject.property("maven_group") as String 51 - println("configuring $modid ($project) v$version @ $group") 52 - plugins.withId("java") { 53 - base { 54 - archivesName.set(modid) 55 - } 56 - java { 57 - toolchain.languageVersion = JavaLanguageVersion.of(17) 58 - withSourcesJar() 59 - } 60 - 61 - tasks.named<Jar>("jar").configure { 62 - from("LICENSE") { 63 - rename { "LICENSE_$modid" } 64 - } 65 - duplicatesStrategy = DuplicatesStrategy.WARN 66 - } 67 - } 68 - 69 - plugins.withId("scala") { 70 - scala { 71 - scalaVersion = "3.7.1" 72 - } 73 - } 74 - 75 - plugins.withId("fabric-loom") { 76 - loom { 77 - splitEnvironmentSourceSets() 78 - runs["client"].programArgs += listOf("--username", "Player", "--uuid", "9e1b34e3-8031-4623-8918-eb7914ab564b") 79 - 80 - mods { 81 - register(modid) { 82 - sourceSet("main") 83 - sourceSet("client") 84 - } 85 - } 86 - 87 - mixin.useLegacyMixinAp = false 88 - } 89 - 90 - fabricApi { 91 - configureTests { 92 - modId = modid 93 - eula = true 94 - } 95 - } 96 - 97 - dependencies { 98 - modLocalRuntime("maven.modrinth:ears:1.4.7+fabric-1.20") 99 - } 100 - 101 - if (project != rootProject) { 102 - tasks.named("runClient") { 103 - doFirst { 104 - val rootOptions = rootProject.file("run/options.txt").toPath() 105 - val options = file("run/options.txt").toPath() 106 - options.deleteIfExists() 107 - Files.createSymbolicLink(options, rootOptions) 108 - } 109 - } 110 - } 111 - 112 - tasks.processResources { 113 - val bookRoot = destinationDir.resolve("assets/hexcasting/patchouli_books/thehexbook") 114 - val langRoot = destinationDir.resolve("assets/$modid/lang") 115 - 116 - doLast { 117 - bookRoot.list()?.forEach { lang -> 118 - val langFile = langRoot.resolve("$lang.json") 119 - if (langFile.exists()) { 120 - val entries = JsonSlurper().parseText(langFile.readText()) as MutableMap<String, String> 121 - var n = 0 122 - for (bookFile in bookRoot.resolve(lang).walkTopDown()) { 123 - if (bookFile.isFile) { 124 - val json = JsonSlurper().parseText(bookFile.readText()) 125 - if (json !is Map<*, *>) continue 126 - json as MutableMap<Any, Any> 127 - val name = json["name"] 128 - if (name is String) { 129 - entries["text.$modid.book.${n}"] = name 130 - json["name"] = "text.$modid.book.${n}" 131 - n++ 132 - } 133 - val pages = json["pages"] 134 - if (pages !is MutableList<*>) continue 135 - pages as MutableList<Any> 136 - for (i in pages.indices) { 137 - val page = pages[i] 138 - if (page is String) { 139 - entries["text.$modid.book.${n}"] = page 140 - pages[i] = "text.$modid.book.${n}" 141 - n++ 142 - } else if (page is MutableMap<*, *>) { 143 - page as MutableMap<Any, Any> 144 - for (key in listOf("text", "title", "header")) { 145 - val text = page[key] 146 - if (text != null && text is String) { 147 - entries["text.$modid.book.${n}"] = text 148 - page[key] = "text.$modid.book.${n}" 149 - n++ 150 - } 151 - } 152 - } 153 - } 154 - bookFile.writeText(JsonOutput.toJson(json)) 155 - } 156 - } 157 - langFile.writeText(JsonOutput.toJson(entries)) 158 - } 159 - } 160 - } 161 - } 162 - } 163 - println("configured $project: release=$release, configured version: $version ($group)") 164 - } 32 + evaluationDependsOn(":config") 165 33 val p: P by ext 34 + val release: Boolean by ext 166 35 val py_version: String by project.properties 167 36 val wheelPath = file("dist/hexdoc_hexic-$version.$py_version-py3-none-any.whl") 168 37 ··· 184 53 // into("$buildDir/hexxy4") 185 54 //} 186 55 187 - allprojects { 188 - repositories { 189 - fun exactRepo(url: String, vararg groups: String, recursive: Boolean = true) { 190 - exclusiveContent { 191 - forRepository { 192 - maven(url) 193 - } 194 - filter { 195 - for (group in groups) { 196 - if (recursive) { 197 - includeGroupAndSubgroups(group) 198 - } else { 199 - includeGroup(group) 200 - } 201 - } 202 - } 203 - } 204 - } 205 - 206 - mavenCentral() 207 - exactRepo("https://api.modrinth.com/maven", 208 - "maven.modrinth") 209 - exactRepo("https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/", 210 - "com.eliotlash.mclib", 211 - "software.bernie.geckolib") 212 - exactRepo("https://jitpack.io/", 213 - "com.github.Chocohead", 214 - "com.github.LlamaLad7", 215 - "com.github.Virtuoel", 216 - "com.github.mattidragon") 217 - exactRepo("https://maven.blamejared.com/", 218 - "at.petra-k", 219 - "com.samsthenerd.inline", 220 - "gay.object", 221 - "miyucomics.hexpose", 222 - "net.darkhax.openloader", 223 - "vazkii.patchouli") 224 - exactRepo("https://maven.hexxy.media/", 225 - "io.github.tropheusj", 226 - "ram.talia") 227 - exactRepo("https://maven.jamieswhiteshirt.com/libs-release/", 228 - "com.jamieswhiteshirt") 229 - exactRepo("https://maven.kosmx.dev/", 230 - "dev.kosmx") 231 - exactRepo("https://maven.ladysnake.org/releases/", 232 - "dev.onyxstudios") 233 - exactRepo("https://pool.net.eu.org/", 234 - "dev.kineticcat.hexportation", 235 - "miyucomics.hexcellular", 236 - "miyucomics.hexical", 237 - "miyucomics.overevaluate", 238 - "org.eu.net.pool", 239 - "poollovernathan") 240 - exactRepo("https://maven.shedaniel.me/", 241 - "dev.architectury", 242 - "me.shedaniel") 243 - exactRepo("https://maven.terraformersmc.com/", 244 - "com.terraformersmc", 245 - "dev.emi") 246 - exactRepo("https://repo.sleeping.town/", 247 - "com.unascribed") 248 - exactRepo("https://masa.dy.fi/maven/", 249 - "carpet") 250 - exactRepo("https://maven.nucleoid.xyz/", 251 - "xyz.nucleoid") 252 - } 253 - } 254 - 255 56 fun download(url: String, name: String = file(url).name): Download { 256 57 val outPath = file("$buildDir/$name") 257 58 return tasks.register<Download>("download_${file(name).nameWithoutExtension}") { ··· 365 166 modLocalRuntime("maven.modrinth:trinkets:3.7.2") 366 167 modDepends(modImplementation("maven.modrinth:spasm:0.2.2")!!) 367 168 // modImplementation("maven.modrinth:slate-works:1.0.5") 368 - compat("miyucomics.hexical:hexical:main-SNAPSHOT") 169 + compat("miyucomics.hexical:hexical:2.0.0+a3c47ad9") 369 170 compat("miyucomics.overevaluate:overevaluate:main-SNAPSHOT") 370 171 modDepends(modImplementation("ram.talia.moreiotas:moreiotas-fabric-$minecraft_version:0.1.1") { exclude(module = "serialization-hooks") }) 371 172 modDepends(modImplementation("ram.talia.hexal:hexal-fabric-1.20.1:0.3.0") { exclude(module = "serialization-hooks") }) ··· 559 360 fileTree("_site/dst/docs/v") { include("**/*.whl") }.files 560 361 } 561 362 562 - class P(project: Project) { 563 - fun getStdout(action: ExecSpec.() -> Unit) = 564 - `java.io`.ByteArrayOutputStream().also { 565 - project.exec { 566 - action() 567 - standardOutput = it 568 - } 569 - }.toString().trim() 570 - 571 - val commit_id by lazy { 572 - getStdout { 573 - commandLine("env", "jj", "log", "-r", "@", "--template", "commit_id", "--no-graph") 574 - } 575 - } 576 - 577 - val change_id by lazy { 578 - getStdout { 579 - commandLine("env", "jj", "log", "-r", "@", "--template", "change_id", "--no-graph") 580 - } 581 - } 582 - 583 - companion object { 584 - const val contentRoot = "__CONTENT__" 585 - } 586 - } 587 363 val contentRoot = P.contentRoot 588 364 589 365 val wheelFileHashes by lazy { ··· 734 510 735 511 // configure the maven publication 736 512 allprojects { 737 - afterEvaluate { 513 + plugins.withType<MavenPublishPlugin> { 738 514 publishing { 739 515 publications { 740 516 create<MavenPublication>("mavenJava") {
+15
buildSrc/build.gradle.kts
··· 1 + plugins { 2 + `kotlin-dsl` 3 + } 4 + 5 + repositories { 6 + mavenCentral() 7 + gradlePluginPortal() 8 + } 9 + 10 + dependencies { 11 + implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.10") 12 + implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.10") 13 + implementation(gradleApi()) 14 + implementation(localGroovy()) 15 + }
+29
buildSrc/src/main/kotlin/util/P.kt
··· 1 + package util 2 + import org.gradle.api.* 3 + import org.gradle.process.* 4 + 5 + class P(val project: Project) { 6 + fun getStdout(action: ExecSpec.() -> Unit) = 7 + `java.io`.ByteArrayOutputStream().also { 8 + project.exec { 9 + action() 10 + standardOutput = it 11 + } 12 + }.toString().trim() 13 + 14 + val commit_id by lazy { 15 + getStdout { 16 + commandLine("env", "jj", "log", "-r", "@", "--template", "commit_id", "--no-graph") 17 + } 18 + } 19 + 20 + val change_id by lazy { 21 + getStdout { 22 + commandLine("env", "jj", "log", "-r", "@", "--template", "change_id", "--no-graph") 23 + } 24 + } 25 + 26 + companion object { 27 + const val contentRoot = "__CONTENT__" 28 + } 29 + }
+242
config/build.gradle.kts
··· 1 + import de.undercouch.gradle.tasks.download.Download 2 + import groovy.json.JsonSlurper 3 + import org.eu.net.pool.mc_plugin.Environment 4 + import org.gradle.api.publish.maven.internal.publication.MavenPomInternal 5 + import org.gradle.kotlin.dsl.support.uppercaseFirstChar 6 + import kotlin.io.path.exists 7 + import kotlin.io.path.readText 8 + import groovy.json.JsonOutput 9 + import `java.nio`.file.Files; 10 + import kotlin.io.path.deleteIfExists 11 + import util.P 12 + import net.fabricmc.loom.api.* 13 + 14 + buildscript { 15 + repositories { 16 + mavenCentral() 17 + maven { url = uri("https://maven.fabricmc.net") } 18 + } 19 + dependencies { 20 + classpath("net.fabricmc:fabric-loom:1.13-SNAPSHOT") 21 + } 22 + } 23 + 24 + plugins { 25 + id("scala") 26 + kotlin("jvm") version "2.2.0" 27 + id("maven-publish") 28 + id("idea") 29 + id("de.undercouch.download") version "5.6.0" 30 + id("org.eu.net.pool.mc-plugin") version "0.1.1" 31 + } 32 + 33 + allprojects { 34 + try { 35 + tasks.named("downloadRenderDoc") { 36 + setProperty("output", file("$buildDir/renderdoc_1.37.tar.gz")) 37 + } 38 + 39 + tasks.named("extractRenderDoc") { 40 + enabled = false 41 + } 42 + 43 + val erd by tasks.register<Sync>("myExtractRenderDoc") { 44 + dependsOn("downloadRenderDoc") 45 + from(tarTree(resources.gzip("$buildDir/renderdoc_1.37.tar.gz"))) 46 + into("$buildDir/renderdoc") 47 + } 48 + 49 + tasks.named("runClientRenderDoc") { 50 + dependsOn(erd) 51 + } 52 + } catch (ignored: UnknownTaskException) {} 53 + } 54 + 55 + val release: Boolean = !System.getenv("release").isNullOrEmpty() 56 + ext["release"] = release 57 + allprojects { 58 + val p = P(project) 59 + val modid: String by project.properties 60 + ext.set("p", p) 61 + version = project.property("mod_version") as String 62 + if (!release) version = "${version}+${p.commit_id.take(7)}" 63 + group = rootProject.property("maven_group") as String 64 + println("configuring $modid ($project) v$version @ $group") 65 + plugins.withId("java") { 66 + base { 67 + archivesName.set(modid) 68 + } 69 + java { 70 + toolchain.languageVersion = JavaLanguageVersion.of(17) 71 + withSourcesJar() 72 + } 73 + 74 + tasks.named<Jar>("jar").configure { 75 + from("LICENSE") { 76 + rename { "LICENSE_$modid" } 77 + } 78 + duplicatesStrategy = DuplicatesStrategy.WARN 79 + } 80 + } 81 + 82 + plugins.withId("scala") { 83 + scala { 84 + scalaVersion = "3.7.1" 85 + } 86 + } 87 + 88 + plugins.withId("fabric-loom") { 89 + extensions.getByType<LoomGradleExtensionAPI>().apply { 90 + splitEnvironmentSourceSets() 91 + runs["client"].programArgs += listOf("--username", "Player", "--uuid", "9e1b34e3-8031-4623-8918-eb7914ab564b") 92 + 93 + mods { 94 + register(modid) { 95 + sourceSet("main") 96 + sourceSet("client") 97 + } 98 + } 99 + 100 + mixin.useLegacyMixinAp = false 101 + } 102 + 103 + extensions.getByType<net.fabricmc.loom.api.fabricapi.FabricApiExtension>().apply { 104 + configureTests { 105 + modId = modid 106 + eula = true 107 + } 108 + } 109 + 110 + dependencies { 111 + "modLocalRuntime"("maven.modrinth:ears:1.4.7+fabric-1.20") 112 + } 113 + 114 + if (project != rootProject) { 115 + tasks.named("runClient") { 116 + doFirst { 117 + val rootOptions = rootProject.file("run/options.txt").toPath() 118 + val options = file("run/options.txt").toPath() 119 + options.deleteIfExists() 120 + Files.createSymbolicLink(options, rootOptions) 121 + } 122 + } 123 + } 124 + 125 + tasks.processResources { 126 + val bookRoot = destinationDir.resolve("assets/hexcasting/patchouli_books/thehexbook") 127 + val langRoot = destinationDir.resolve("assets/$modid/lang") 128 + 129 + doLast { 130 + bookRoot.list()?.forEach { lang -> 131 + val langFile = langRoot.resolve("$lang.json") 132 + if (langFile.exists()) { 133 + val entries = JsonSlurper().parseText(langFile.readText()) as MutableMap<String, String> 134 + var n = 0 135 + for (bookFile in bookRoot.resolve(lang).walkTopDown()) { 136 + if (bookFile.isFile) { 137 + val json = JsonSlurper().parseText(bookFile.readText()) 138 + if (json !is Map<*, *>) continue 139 + json as MutableMap<Any, Any> 140 + val name = json["name"] 141 + if (name is String) { 142 + entries["text.$modid.book.${n}"] = name 143 + json["name"] = "text.$modid.book.${n}" 144 + n++ 145 + } 146 + val pages = json["pages"] 147 + if (pages !is MutableList<*>) continue 148 + pages as MutableList<Any> 149 + for (i in pages.indices) { 150 + val page = pages[i] 151 + if (page is String) { 152 + entries["text.$modid.book.${n}"] = page 153 + pages[i] = "text.$modid.book.${n}" 154 + n++ 155 + } else if (page is MutableMap<*, *>) { 156 + page as MutableMap<Any, Any> 157 + for (key in listOf("text", "title", "header")) { 158 + val text = page[key] 159 + if (text != null && text is String) { 160 + entries["text.$modid.book.${n}"] = text 161 + page[key] = "text.$modid.book.${n}" 162 + n++ 163 + } 164 + } 165 + } 166 + } 167 + bookFile.writeText(JsonOutput.toJson(json)) 168 + } 169 + } 170 + langFile.writeText(JsonOutput.toJson(entries)) 171 + } 172 + } 173 + } 174 + } 175 + } 176 + 177 + repositories { 178 + fun exactRepo(url: String, vararg groups: String, recursive: Boolean = true) { 179 + exclusiveContent { 180 + forRepository { 181 + maven(url) 182 + } 183 + filter { 184 + for (group in groups) { 185 + if (recursive) { 186 + includeGroupAndSubgroups(group) 187 + } else { 188 + includeGroup(group) 189 + } 190 + } 191 + } 192 + } 193 + } 194 + 195 + mavenCentral() 196 + exactRepo("https://api.modrinth.com/maven", 197 + "maven.modrinth") 198 + exactRepo("https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/", 199 + "com.eliotlash.mclib", 200 + "software.bernie.geckolib") 201 + exactRepo("https://jitpack.io/", 202 + "com.github.Chocohead", 203 + "com.github.LlamaLad7", 204 + "com.github.Virtuoel", 205 + "com.github.mattidragon") 206 + exactRepo("https://maven.blamejared.com/", 207 + "at.petra-k", 208 + "com.samsthenerd.inline", 209 + "gay.object", 210 + "miyucomics.hexpose", 211 + "net.darkhax.openloader", 212 + "vazkii.patchouli") 213 + exactRepo("https://maven.hexxy.media/", 214 + "io.github.tropheusj", 215 + "ram.talia") 216 + exactRepo("https://maven.jamieswhiteshirt.com/libs-release/", 217 + "com.jamieswhiteshirt") 218 + exactRepo("https://maven.kosmx.dev/", 219 + "dev.kosmx") 220 + exactRepo("https://maven.ladysnake.org/releases/", 221 + "dev.onyxstudios") 222 + exactRepo("https://pool.net.eu.org/", 223 + "dev.kineticcat.hexportation", 224 + "miyucomics.hexcellular", 225 + "miyucomics.hexical", 226 + "miyucomics.overevaluate", 227 + "org.eu.net.pool", 228 + "poollovernathan") 229 + exactRepo("https://maven.shedaniel.me/", 230 + "dev.architectury", 231 + "me.shedaniel") 232 + exactRepo("https://maven.terraformersmc.com/", 233 + "com.terraformersmc", 234 + "dev.emi") 235 + exactRepo("https://repo.sleeping.town/", 236 + "com.unascribed") 237 + exactRepo("https://masa.dy.fi/maven/", 238 + "carpet") 239 + exactRepo("https://maven.nucleoid.xyz/", 240 + "xyz.nucleoid") 241 + } 242 + }
+1 -1
project/hexxychests/build.gradle.kts
··· 1 1 plugins { 2 - id("fabric-loom") version "1.13-SNAPSHOT" 2 + id("fabric-loom") 3 3 id("scala") 4 4 kotlin("jvm") version "2.2.0" 5 5 id("maven-publish")
+1 -1
project/hexxytounge/build.gradle.kts
··· 1 1 plugins { 2 - id("fabric-loom") version "1.13-SNAPSHOT" 2 + id("fabric-loom") 3 3 id("scala") 4 4 kotlin("jvm") version "2.2.0" 5 5 id("maven-publish")
+1 -1
project/iotaworks/build.gradle.kts
··· 1 1 plugins { 2 - id("fabric-loom") version "1.13-SNAPSHOT" 2 + id("fabric-loom") 3 3 id("scala") 4 4 kotlin("jvm") version "2.2.0" 5 5 id("maven-publish")
+2 -1
settings.gradle.kts
··· 21 21 include("util", "iotaworks", "hexxytounge", "hexxychests") 22 22 project(":iotaworks").projectDir = file("project/iotaworks") 23 23 project(":hexxytounge").projectDir = file("project/hexxytounge") 24 - project(":hexxychests").projectDir = file("project/hexxychests") 24 + project(":hexxychests").projectDir = file("project/hexxychests") 25 + project(":").projectDir = file("config") // 2026-01-02 pool: do not ever do this
+1 -1
util/build.gradle.kts
··· 1 1 plugins { 2 - id("fabric-loom") version "1.13-SNAPSHOT" 2 + id("fabric-loom") 3 3 id("scala") 4 4 kotlin("jvm") version "2.2.0" 5 5 id("maven-publish")