arrow-kt / arrow-kt/arrow-analysis
Adding the Gradle plugin to `buildSrc` triggers warnings
- Dominant language
- Kotlin
- Stars
- 30
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
A simple `buildSrc/build.gradle.kts` file like below:
```kotlin
plugins {
`embedded-kotlin`
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0")
implementation("io.arrow-kt.analysis.kotlin:io.arrow-kt.analysis.kotlin.gradle.plugin:2.0.2")
}
```
triggers these warnings:
```
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
/Users/mbonnin/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4/lib/kotlin-stdlib-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4/lib/kotlin-stdlib-common-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4/lib/kotlin-stdlib-jdk7-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4/lib/kotlin-stdlib-jdk8-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4/lib/kotlin-reflect-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.5.31/ff5d99aecd328872494e8921b72bf6e3af97af3e/kotlin-stdlib-jdk8-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.5.31/1523fcd842a47da0820cea772b19c51056fec8a9/kotlin-reflect-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.31/77e0f2568912e45d26c31fd417a332458508acdf/kotlin-stdlib-jdk7-1.5.31.jar (version 1.5)
/Users/mbonnin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.6.20/6cedc143badbb4f1c6b7f5a340b04edff1743208/kotlin-stdlib-1.6.20.jar (version 1.6)
/Users/mbonnin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.6.20/27b4562b6713d70f458c6d7ea39aadacb8e6a92b/kotlin-stdlib-common-1.6.20.jar (version 1.6)
/Users/mbonnin/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.6.20/a115c367e0fd9c8909293b208689afca0c88a6f1/kotlin-script-runtime-1.6.20.jar (version 1.6)
```
I believe `kotlin-stdlib` should be excluded from the dependencies because Gradle will provide its own. I'm not sure about `kotlin-script-runtime`. Is it something that's used by the Gradle plugin?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal buildSrc/build.gradle.kts example in the issue and reproduce the Kotlin runtime version warnings using the embedded-kotlin plugin and listed dependencies. Investigate which Kotlin runtime artifacts are supplied by Gradle versus the plugin dependencies, including kotlin-stdlib and kotlin-script-runtime. Done means the dependency setup is documented or adjusted so the reported warnings no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100