Skip to content
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

Alternative solution how to add compiler plugin dependency to the project #386

Merged
merged 12 commits into from
Jan 15, 2024

Conversation

mvicsokolova
Copy link
Collaborator

Add a transitive dependency to the compiler plugin in atomicfu-gradle-plugin.

Do not require to add it manually.

Problem: not sure that compiler plugin dependency will be resolved correctly on the user side.

@mvicsokolova mvicsokolova changed the base branch from master to develop December 20, 2023 12:49
@mvicsokolova
Copy link
Collaborator Author

  • I've added runtimeOnly "org.jetbrains.kotlin:atomicfu:1.7.0" dependency to :atomicfu-gradle-plugin
  • Removed manual addition of the compiler plugin to the classpath of user projects (in jvm-sample, mpp-sample)
  • plugin-order-bug test now builds successfuly

@@ -17,4 +18,14 @@ class PluginOrderBugTest {
val buildResult = pluginOrderBugProject.cleanAndBuild()
assertTrue(buildResult.isSuccessful, buildResult.output)
}

@Test
fun testResolvedCompilerPluginDependency() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added some check that there is org.jetbrains.kotlin:atomicfu:1.9.20 dependency in the project classpath.

In the buildEnvironment we can also find the resolution string:
org.jetbrains.kotlin:atomicfu:1.6.20 -> 1.9.20

but probably just checking for the kotlin version is enough

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks to covering such a scenario!

@mvicsokolova
Copy link
Collaborator Author

Rebased on the latest develop with increased Metaspace

@mvicsokolova
Copy link
Collaborator Author

Maybe we can postpone solution of the problem with the compileOnly atomicfu dependency in Native targets for now?
Seems, that it requires more discussion and there is no quick solution. WDYT?

Though the resolution of this warning for kotlin-stdlib dependency seems ok for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants