Skip to content
代码片段 群组 项目
提交 f3257cf7 编辑于 作者: Stanislav Kozlovski's avatar Stanislav Kozlovski 提交者: Ismael Juma
浏览文件

MINOR: Ensure a single version of scala-library is used (#9155)

This patch ensures we use a force resolution strategy for the scala-library dependency.

I've tested this locally and saw a difference in the output.

With the change (using 2.4 and the jackson library 2.10.5):
```
./core/build/dependant-libs-2.12.10/scala-java8-compat_2.12-0.9.0.jar
./core/build/dependant-libs-2.12.10/scala-collection-compat_2.12-2.1.2.jar
./core/build/dependant-libs-2.12.10/scala-reflect-2.12.10.jar
./core/build/dependant-libs-2.12.10/scala-logging_2.12-3.9.2.jar
./core/build/dependant-libs-2.12.10/scala-library-2.12.10.jar
```

Without (using 2.4 and the jackson library 2.10.5):
```
 find . -name 'scala*.jar'
./core/build/dependant-libs-2.12.10/scala-java8-compat_2.12-0.9.0.jar
./core/build/dependant-libs-2.12.10/scala-collection-compat_2.12-2.1.2.jar
./core/build/dependant-libs-2.12.10/scala-reflect-2.12.10.jar
./core/build/dependant-libs-2.12.10/scala-logging_2.12-3.9.2.jar
./core/build/dependant-libs-2.12.10/scala-library-2.12.12.jar
```

Reviewers: Ismael Juma <ismael@juma.me.uk>
上级 cd05b69c
无相关合并请求
......@@ -77,6 +77,12 @@ allprojects {
runtime {
resolutionStrategy {
force(
// ensure we have a single version of scala jars in the classpath, we enable inlining
// in the scala compiler for the `core` module so binary compatibility is only
// guaranteed if the exact same version of the scala jars is used for compilation
// and at runtime
libs.scalaLibrary,
libs.scalaReflect,
// ensures we have a single version of jackson-annotations in the classpath even if
// some modules only have a transitive reference to an older version
libs.jacksonAnnotations,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册