Skip to content

Fix atomicfu plugin application #3488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def configureKotlinJvmPlatform(configuration) {
configuration.attributes.attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm)
}

// Configure subprojects with Kotlin sources
apply plugin: "configure-compilation-conventions"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this particular kludge.

What puzzles me is the general debuggability, i.e. consider the same situation happens to an external user:

When we apply the atomicfu plugin too late in the configuration -- the AtomicfuKotlinGradleSubplugin$isApplicable may be called earlier, when the properties are not set yet and the compiler plugin is not applied.

What are the option for them to debug it and understand what's going on? Are there better options?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho this case is nothing to do with Atomicfu plugin as it is not even present when core project evaluates. This is more Gradle edge-case. BTW why do you need evaluationDependsOn for core project? 🤔


allprojects {
// the only place where HostManager could be instantiated
project.ext.hostManager = new HostManager()
Expand Down Expand Up @@ -167,9 +170,6 @@ configure(subprojects.findAll { !sourceless.contains(it.name) && it.name != core

apply plugin: "bom-conventions"

// Configure subprojects with Kotlin sources
apply plugin: "configure-compilation-conventions"

if (build_snapshot_train) {
println "Hacking test tasks, removing stress and flaky tests"
allprojects {
Expand Down