refactor: Fix translation collection not working for other source sets

This commit is contained in:
Linnea Gräf
2025-03-18 14:08:05 +01:00
parent 54173dfc44
commit 7393f0081f
3 changed files with 6 additions and 9 deletions

View File

@@ -32,7 +32,7 @@ plugins {
id("fabric-loom") version "1.9.2" id("fabric-loom") version "1.9.2"
alias(libs.plugins.shadow) alias(libs.plugins.shadow)
id("moe.nea.licenseextractificator") id("moe.nea.licenseextractificator")
id("moe.nea.mc-auto-translations") version "0.1.0" id("moe.nea.mc-auto-translations") version "0.2.0"
} }
version = getGitTagInfo(libs.versions.minecraft.get()) version = getGitTagInfo(libs.versions.minecraft.get())
@@ -163,7 +163,7 @@ fun createIsolatedSourceSet(name: String, path: String = "compat/$name", isEnabl
extendsFrom(getByName(mainSS.annotationProcessorConfigurationName)) extendsFrom(getByName(mainSS.annotationProcessorConfigurationName))
} }
(mainSS.runtimeOnlyConfigurationName) { (mainSS.runtimeOnlyConfigurationName) {
// extendsFrom(getByName(ss.runtimeClasspathConfigurationName)) extendsFrom(getByName(ss.runtimeClasspathConfigurationName))
} }
("ksp$upperName") { ("ksp$upperName") {
extendsFrom(ksp.get()) extendsFrom(ksp.get())
@@ -171,7 +171,8 @@ fun createIsolatedSourceSet(name: String, path: String = "compat/$name", isEnabl
} }
dependencies { dependencies {
runtimeOnly(ss.output) runtimeOnly(ss.output)
(ss.implementationConfigurationName)(sourceSets.main.get().output) (ss.implementationConfigurationName)(project.files(tasks.compileKotlin))
(ss.implementationConfigurationName)(project.files(tasks.compileJava))
} }
tasks.shadowJar { tasks.shadowJar {
from(ss.output) from(ss.output)
@@ -181,8 +182,7 @@ fun createIsolatedSourceSet(name: String, path: String = "compat/$name", isEnabl
classpath.from(configurations.getByName(ss.compileClasspathConfigurationName)) classpath.from(configurations.getByName(ss.compileClasspathConfigurationName))
} }
collectTranslations { collectTranslations {
// TODO: this does not work, somehow this.classes.from(ss.kotlin.classesDirectory)
this.classes.from(sourceSets.main.get().kotlin.classesDirectory)
} }
return ss return ss
} }

View File

@@ -4,6 +4,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@@ -296,7 +296,6 @@
"firmament.inventory-buttons.import-failed": "One of your buttons could only be imported partially", "firmament.inventory-buttons.import-failed": "One of your buttons could only be imported partially",
"firmament.inventory-buttons.load-preset": "Load Preset", "firmament.inventory-buttons.load-preset": "Load Preset",
"firmament.inventory-buttons.save-preset": "Save Preset", "firmament.inventory-buttons.save-preset": "Save Preset",
"firmament.jade.breaking_power": "Required Breaking Power: %s",
"firmament.key.category": "Firmament", "firmament.key.category": "Firmament",
"firmament.keybinding.external": "%s", "firmament.keybinding.external": "%s",
"firmament.mixins.start": "Applied firmament mixins:", "firmament.mixins.start": "Applied firmament mixins:",
@@ -349,8 +348,6 @@
"firmament.recipe.mobs.name": "§8[§7Lv %d§8] §c%s", "firmament.recipe.mobs.name": "§8[§7Lv %d§8] §c%s",
"firmament.recipe.mobs.name.nolevel": "§c%s", "firmament.recipe.mobs.name.nolevel": "§c%s",
"firmament.recipe.novanilla": "Hypixel cannot super craft vanilla recipes", "firmament.recipe.novanilla": "Hypixel cannot super craft vanilla recipes",
"firmament.recipecategory.reforge": "Reforge",
"firmament.recipecategory.reforge.basic": "This is a basic reforge, available at the Blacksmith.",
"firmament.reiwarning": "Firmament needs RoughlyEnoughItems to display its item list!", "firmament.reiwarning": "Firmament needs RoughlyEnoughItems to display its item list!",
"firmament.reiwarning.disable": "Click here to disable this warning", "firmament.reiwarning.disable": "Click here to disable this warning",
"firmament.reiwarning.disabled": "Disabled the RoughlyEnoughItems warning. Keep in mind that you will not have an item list without REI.", "firmament.reiwarning.disabled": "Disabled the RoughlyEnoughItems warning. Keep in mind that you will not have an item list without REI.",