martmists
04/05/2023, 10:30 AMkotlin {
js("frontendPublic", IR) {
browser {
commonWebpackConfig {
outputFileName = "index.js"
}
}
binaries.executable()
}
js("frontendAdmin", IR) {
browser {
commonWebpackConfig {
outputFileName = "index-admin.js"
}
}
binaries.executable()
}
sourceSets {
val frontendCommonMain by creating
val frontendPublicMain by getting {
dependsOn(frontendCommonMain)
}
val frontendAdminMain by getting {
dependsOn(frontendCommonMain)
}
}
}
The error I'm getting: Caused by: org.gradle.api.GradleException: Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':frontendPublicApiElements' and [configuration ':frontendAdminApiElements'] contain identical attribute sets. Consider adding an additional attribute to one of the configurations to disambiguate them. Run the 'outgoingVariants' task for more details. See <https://docs.gradle.org/8.0.1/userguide/upgrading_version_7.html#unique_attribute_sets> for more details.
Adam S
04/05/2023, 10:43 AMmartmists
04/05/2023, 12:08 PMA problem was found with the configuration of task ':compileProductionExecutableKotlinFrontendPublic' (type 'KotlinJsIrLink').
- Gradle detected a problem with the following location: '/home/mart/git/sites/teamexr_wiki/build/compileSync/js/main/productionExecutable/kotlin'.
Reason: Task ':frontendAdminProductionExecutableCompileSync' uses this output of task ':compileProductionExecutableKotlinFrontendPublic' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
How would I solve this?Adam S
04/05/2023, 12:09 PMmartmists
04/05/2023, 12:30 PMAdam S
04/05/2023, 12:45 PMmartmists
04/05/2023, 12:57 PMmain
in the path above rather than frontendPublicMain
)Adam S
04/05/2023, 1:01 PMval compileKotlinProductionExecTasks = tasks.matching {
it.name.startsWith("compileProductionExecutable")
}
val compileSyncTasks = tasks.matching {
it.name.endsWith("CompileSync")
}
compileSyncTasks.configureEach {
dependsOn(compileKotlinProductionExecTasks)
}
dependsOn(tasks.withType<WhateverKotlinTaskType>())
martmists
04/05/2023, 1:22 PM