0

I Have the following build.gradle file:

buildscript {
    ext {
        scalaVersion = '2.12.10'
        gatlingVersion = '3.8.4'
    }

    all {
        resolutionStrategy {
            force("com.google.protobuf:protobuf-java:2.4.1")
        }
        exclude group: 'org.slf4j', module: 'slf4j-log4j12'
        exclude group: 'log4j', module: 'log4j'
    }
}

dependencies {
    implementation("org.scala-lang:scala-library:${scalaVersion}")
    implementation("org.scala-lang:scala-reflect:${scalaVersion}")

    implementation("io.gatling:gatling-app:${gatlingVersion}")
    implementation("io.gatling.highcharts:gatling-charts-highcharts:${gatlingVersion}")
    implementation('org.scala-lang.modules:scala-parser-combinators_2.12:1.1.2')
    implementation('io.netty:netty-all:4.1.81.Final')
}

When I try to build it shows me:

* What went wrong:
Execution failed for task ':compileTestScala'.
> Could not resolve all dependencies for configuration ':zinc'.
   > Conflict(s) found for the following module(s):
       - org.scala-lang:scala-library between versions 2.12.10, 2.12.2, 2.12.8, 2.12.4 and 2.12.0
       - org.scala-lang:scala-reflect between versions 2.12.10 and 2.12.8

Why it shows me to choose from these version when I already import one of these versions? Thanks in advance

Rain03
  • 41
  • 1
  • 7
  • I don't think you have to manually import reflection. It should be included in the scala-library. Probably `scala-parser-combinators` has a different minor version than your scala version. – Alin Gabriel Arhip Sep 20 '22 at 07:41
  • 1
    yea, you are right, scala-parser-combinators comes with scala-library 2.12.8 – Rain03 Sep 20 '22 at 10:14

0 Answers0