CLOVIS
05/16/2025, 5:13 PMorg.jetbrains.kotlin.platform.type = native
, and are differentiated using the attribute org.jetbrains.kotlin.native.target = linux_x64
(for example).
I see that I can get the platform type using org.jetbrains.kotlin.gradle.plugin.KotlinTarget#getPlatformType
, however I don't see how I can access the native target type (other than through parsing apiElementsConfigurationName
etc).Oleg Nenashev
05/17/2025, 11:29 AMursus
05/18/2025, 7:31 PMsarif
so github PR ui will pick it up automatically.
Is gradle problems api
coming in 2.2 the way to do it?martmists
05/21/2025, 10:14 AM* What went wrong:
A problem was found with the configuration of task ':site-frontend:webProductionExecutableCompileSync' (type 'DefaultIncrementalSyncTask').
- Gradle detected a problem with the following location: '/home/mart/nintendo-posts/build/js/packages/nintendo-today-site-site-frontend-web/kotlin'.
Reason: Task ':site-frontend:webBrowserDevelopmentWebpack' uses this output of task ':site-frontend:webProductionExecutableCompileSync' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':site-frontend:webProductionExecutableCompileSync' as an input of ':site-frontend:webBrowserDevelopmentWebpack'.
2. Declare an explicit dependency on ':site-frontend:webProductionExecutableCompileSync' from ':site-frontend:webBrowserDevelopmentWebpack' using Task#dependsOn.
3. Declare an explicit dependency on ':site-frontend:webProductionExecutableCompileSync' from ':site-frontend:webBrowserDevelopmentWebpack' using Task#mustRunAfter.
For more information, please refer to <https://docs.gradle.org/8.11/userguide/validation_problems.html#implicit_dependency> in the Gradle documentation.
From what I can tell I touch neither of these tasks in my build.gradle.kts, nor do I touch those generated files.rad
05/24/2025, 9:12 AM:shared
) in another subproject (:orchestrator
). I've tried KotlinCompilation#associateWith
but that errors because the target instances are not the same (Both are JVM though). So now I'm trying this to circumvent that check:
val orchestratorMain = kotlin.target.compilations["main"]
project(":shared").afterEvaluate {
val associatedCompilations = (orchestratorMain.allAssociatedCompilations as MutableObservableSet<KotlinCompilation<*>>)
val sharedMain = kotlin.target.compilations["main"]
sharedMain.allAssociatedCompilations.forAll { compilation -> associatedCompilations.add(compilation) }
}
But this is still throwing compilation errors about the declaration being privateCagdas Caglak
05/27/2025, 12:31 PMandroid.packaging
with me, especially for excluding duplicated files? Thank you.Oleg Nenashev
05/27/2025, 4:13 PMadjorno
05/31/2025, 9:06 AM./gradlew jsBrowserProductionWebpack
creates js files in the build/kotlin-webpack/productionExecutable
but the index.html ends up in the build/processedResources
folder so I have to collect them manually. Which feels weird.
Any docs on how to create prod releases?Mario Andhika
06/02/2025, 4:03 AMCLOVIS
06/03/2025, 10:09 AMKotlinJsIrCompilation
instance in a kotlin("multiplatform")
project with js()
enabled?Oleg Nenashev
06/04/2025, 9:49 AMAnonymike
06/04/2025, 7:50 PMUnable to find method ''org.gradle.internal.buildoption.BuildOption$Value org.gradle.api.internal.StartParameterInternal.getIsolatedProjects()''
More info in thread...
Any help is greatly appreciated! Right now to work on anything I have to downgrade every build involved to 2.1.20, do my work, avoid committing the changed version and rely on the rest of my team for final testing because I cannot run any 2.1.21 project.Justin Tullgren
06/11/2025, 1:00 PMimplementation
dependency for a custom gradle plugin without applying the kotlin-dsl plugin to the custom gradle plugin build? I tried depending on this target but a lot of the kotlin extension functions weren’t found (same with others in the group).mbonnin
06/11/2025, 3:02 PMw: ⚠️ Usage of Internal Kotlin Gradle Plugin Properties Detected
Can I suppress this ☝️svenjacobs
06/16/2025, 11:48 AMconst val VERSION = "1.0.0"
in my code that can be specified during compile time. Of course I could use sed
or something similar to dynamically edit a file before compilation but is there maybe a nicer way, something that the Kotlin Gradle plugin offers, maybe?eygraber
06/17/2025, 9:14 PMMario Andhika
06/19/2025, 2:18 AMwasmJs {
outputModuleName = "composeApp"
browser {
val rootDirPath = project.rootDir.path
val projectDirPath = project.projectDir.path
commonWebpackConfig {
outputFileName = "composeApp.js"
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
static = (static ?: mutableListOf()).apply {
// Serve sources to debug inside browser
add(rootDirPath)
add(projectDirPath)
}
}
}
}
binaries.executable()
}
Josh Friend
06/19/2025, 12:36 PMreactormonk
06/20/2025, 12:32 PMincludeBuild("kable") {
dependencySubstitution {
substitute(module("com.juul.kable:kable-core")).using(project(":kable-core"))
}
}
Oleg Nenashev
06/23/2025, 8:38 AMhfhbd
06/23/2025, 1:05 PMjvm().withJava()
because it is deprecated with error in Gradle 9.0.0? I need MPP due to expect/actual in JVM code.eygraber
06/23/2025, 6:22 PMpublishAllLibraryVariants
with the deprecation message saying:
Publishing all Android Variants implicitly is not recommendedCalling
publishAllLibraryVariants
is not implicit, it is explicit, and I am explicitly saying I want all variants published. I don't want to have to specify each variant that I want published (especially when I have lots of flavors).
Furthermore, the doc for publishLibraryVariants
says:
If set to null, which can also be done with publishAllLibraryVariants, all library variants will be published, but not test or application variants.
martmists
06/23/2025, 9:29 PMorg.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin 'org.jetbrains.kotlin.jvm'.
...
org.gradle.api.internal.DefaultMutationGuard$IllegalMutationException: Gradle#projectsEvaluated(Action) on build 'project_root_name' cannot be executed in the current context.
...
The dependency is added as api(project(":B", "namedElements"))
as required by the toolchain.
How would I go about fixing it?eygraber
06/23/2025, 11:25 PMorg.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.KotlinProjectExtension.targets
is deprecated, and says to replace it with org.jetbrains.kotlin.gradle.utils.KotlinProjectExtension.targets
but that is internal
Piotr Krzemiński
06/26/2025, 9:03 PMe: file:///home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/2.2.0/4258f471b10f4fce1b1c000b59495b7413e1af9a/kotlin-reflect-2.2.0.jar!/META-INF/descriptors.jvm.kotlin_module Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.2.0, expected version is 2.0.0.
Do I think correctly that we need to wait for Gradle supporting metadata of at least 2.1.0?Hugo Costa
07/01/2025, 1:24 PMjrod
07/01/2025, 9:06 PMexplicitApi()
when enabled?rnett
07/02/2025, 12:03 AMKotlinBaseExtension.sourceSets.configureEach { ... }
. However, the source sets appear to be configured/resolved before the build script is ran, meaning setting properties in my extension isn't reflected in the configuration since the added configuration runs first. Is this known or expected behaviour? I can probably slap an afterEvaluate
on it but I'd prefer to avoid that if possible since it's a whole can of worms.Kelvin Chung
07/02/2025, 6:17 AMallTests
or jvmTests
at all.andrew
07/02/2025, 4:30 PMkotlin.uuid.Uuid
API and Gradle cannot find the class. Is there a good way to ensure my gradle daemon uses the right version of Kotlin under the hood + opt into the experimental API?