junit-insights icon indicating copy to clipboard operation
junit-insights copied to clipboard

Remove embedded copy of Kotlin

Open manuelprinz opened this issue 4 years ago • 6 comments

The Kotlin version used to build the project is included in the JAR and causes downstream projects to fail to compile. When removing the dependency the tester module needs to provide Kotlin, so a dependency was added.

Closes: #125

manuelprinz avatar Nov 21 '20 13:11 manuelprinz

I am not sure how to best address this in the documentation. It now needs to have a dependency on the Kotlin Standard Library, but I suspect all projects will have that anyway (at least those affected by the issue). Suggestions welcome, I can update accordingly.

manuelprinz avatar Nov 21 '20 13:11 manuelprinz

Having a deeper look at the API, the following would properly be a better solution:

api("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("com.google.code.gson:gson:2.7")

The project currently only uses one Kotlin-specific class from the standard library in its public API (a constructor marker in the init method of the Event data class). Both the reflection API and GSON are only used internally and implementation details.

This declaration only works with more recent versions of Gradle, though.

manuelprinz avatar Nov 21 '20 21:11 manuelprinz

Hi Manuel and thank you very much for your interest in the JUnit Insights project. As you probably have noticed, the project is not under active development anymore. I can't really reproduce the issue described in #125 so I do not really know what to do with this PR. If you are confident that you have found a proper solution to the problem, please let me know and I will try to review and merge your contribution.

florianluediger avatar May 10 '21 19:05 florianluediger

Hi Florian, it's been a while, I need to check again. I will get back to you as soon as I can.

manuelprinz avatar Jun 27 '21 17:06 manuelprinz

I can reproduce this one too, though the fix seems not to be working for me

sergeyamaslov avatar Dec 05 '21 22:12 sergeyamaslov

@sergeyamaslov have you tried simple exclude: testCompile ('de.adesso:junit-insights:1.1.0'){ exclude group: 'org.jetbrains.kotlin', module: 'kotlin-reflect' }

dhasilin avatar Mar 06 '23 12:03 dhasilin