aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-10-30 18:48:26 +0100
committerLinnea Gräf <nea@nea.moe>2024-10-30 18:48:26 +0100
commit9aa5f7c883a7d2e01bfec2039322b8060ebff044 (patch)
tree5506bd5b4703293592fe838a1f34044d8837815f /build.gradle.kts
parentb11b12585d3e4dfd67f73beebf7cf950799f087c (diff)
downloadFirmament-9aa5f7c883a7d2e01bfec2039322b8060ebff044.tar.gz
Firmament-9aa5f7c883a7d2e01bfec2039322b8060ebff044.tar.bz2
Firmament-9aa5f7c883a7d2e01bfec2039322b8060ebff044.zip
Force resolution of unpacked jars
[no changelog]
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts12
1 files changed, 8 insertions, 4 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index effa917..15a5e78 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,7 +7,6 @@
*/
import com.google.devtools.ksp.gradle.KspTaskJvm
-import com.google.gson.JsonArray
import moe.nea.licenseextractificator.LicenseDiscoveryTask
import moe.nea.mcautotranslations.gradle.CollectTranslations
import net.fabricmc.loom.LoomGradleExtension
@@ -101,7 +100,7 @@ kotlin {
}
}
fun String.capitalizeN() = replaceFirstChar { it.uppercaseChar() }
-fun innerJarsOf(name: String, dependency: Dependency): FileCollection {
+fun innerJarsOf(name: String, dependency: Dependency): Provider<FileTree> {
val task = tasks.create("unpackInnerJarsFor${name.capitalizeN()}", InnerJarsUnpacker::class) {
this.inputJars.setFrom(files(configurations.detachedConfiguration(dependency)))
this.outputDir.set(layout.buildDirectory.dir("unpackedJars/$name").also {
@@ -109,7 +108,11 @@ fun innerJarsOf(name: String, dependency: Dependency): FileCollection {
})
}
println("Constructed innerJars task: ${project.files(task).toList()}")
- return project.files(task)
+ return project.provider {
+ val files = project.files(task)
+ files.files // Force resolution
+ files.asFileTree
+ }
}
val collectTranslations by tasks.registering(CollectTranslations::class) {
@@ -242,7 +245,8 @@ dependencies {
(sodiumSourceSet.modImplementationConfigurationName)(libs.sodium)
(citResewnSourceSet.modImplementationConfigurationName)(
- innerJarsOf("citresewn", dependencies.create(libs.citresewn.get())).asFileTree)
+ innerJarsOf("citresewn", dependencies.create(libs.citresewn.get()))
+ )
(citResewnSourceSet.modImplementationConfigurationName)(libs.citresewn)
(yaclSourceSet.modImplementationConfigurationName)(libs.yacl)