Skip to content

Fix gradle resolving of guava dependencies, add workaround for #1262 #1263

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

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion utbot-analytics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ dependencies {
testImplementation project(':utbot-sample')
testImplementation group: 'junit', name: 'junit', version: junit4Version

implementation "org.unittestbot.soot:soot-utbot-fork:${sootVersion}"
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
exclude group:'com.google.guava', module:'guava'
}
implementation group: 'com.github.haifengl', name: 'smile-kotlin', version: '2.6.0'
implementation group: 'com.github.haifengl', name: 'smile-plot', version: '2.6.0'
implementation group: 'com.github.haifengl', name: 'smile-core', version: '2.6.0'
Expand Down
4 changes: 3 additions & 1 deletion utbot-framework-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ dependencies {
api(project(":utbot-rd"))
implementation(group ="com.jetbrains.rd", name = "rd-framework", version = "2022.3.1")
implementation(group ="com.jetbrains.rd", name = "rd-core", version = "2022.3.1")
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}")
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
exclude(group="com.google.guava", module="guava")
}
implementation(group = "io.github.microutils", name = "kotlin-logging", version = kotlinLoggingVersion)
// TODO do we really need apache commons?
implementation(group = "org.apache.commons", name = "commons-lang3", version = commonsLangVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,8 @@ enum class CodegenLanguage(
"--add-exports", "java.base/sun.text=ALL-UNNAMED",
).plus(sourcesFiles)

KOTLIN -> listOf("-d", buildDirectory, "-jvm-target", jvmTarget, "-cp", classPath).plus(sourcesFiles)
// TODO: -Xskip-prerelease-check is needed to handle #1262, check if this is good enough solution
KOTLIN -> listOf("-d", buildDirectory, "-jvm-target", jvmTarget, "-cp", classPath, "-Xskip-prerelease-check").plus(sourcesFiles)
}
if (this == KOTLIN && System.getenv("KOTLIN_HOME") == null) {
throw RuntimeException("'KOTLIN_HOME' environment variable is not defined. Standard location is {IDEA installation dir}/plugins/Kotlin/kotlinc")
Expand Down
4 changes: 3 additions & 1 deletion utbot-framework-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ dependencies {
testImplementation project(":utbot-framework").sourceSets.test.output
testImplementation project(":utbot-core").sourceSets.test.output

implementation "org.unittestbot.soot:soot-utbot-fork:${sootVersion}"
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
exclude group:'com.google.guava', module:'guava'
}

implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: jacksonVersion
implementation group: 'org.sosy-lab', name: 'javasmt-solver-z3', version: javasmtSolverZ3Version
Expand Down
5 changes: 4 additions & 1 deletion utbot-framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ dependencies {
implementation group: 'com.jetbrains.rd', name: 'rd-framework', version: '2022.3.1'
implementation group: 'com.jetbrains.rd', name: 'rd-core', version: '2022.3.1'

implementation "org.unittestbot.soot:soot-utbot-fork:${sootVersion}"
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
exclude group:'com.google.guava', module:'guava'
}
implementation group: 'com.google.guava', name: 'guava', version: guavaVersion
implementation group: 'com.esotericsoftware.kryo', name: 'kryo5', version: kryoVersion
// this is necessary for serialization of some collections
implementation group: 'de.javakaffee', name: 'kryo-serializers', version: kryoSerializersVersion
Expand Down
4 changes: 3 additions & 1 deletion utbot-fuzzers/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ tasks {
dependencies {
implementation(project(":utbot-framework-api"))

implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}")
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
exclude(group="com.google.guava", module="guava")
}
implementation(group = "io.github.microutils", name = "kotlin-logging", version = kotlinLoggingVersion)
implementation(group = "com.github.curious-odd-man", name = "rgxgen", version = rgxgenVersion)
}
Expand Down
4 changes: 3 additions & 1 deletion utbot-junit-contest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ dependencies {
implementation project(":utbot-framework")
implementation project(":utbot-analytics")

implementation "org.unittestbot.soot:soot-utbot-fork:${sootVersion}"
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
exclude group:'com.google.guava', module:'guava'
}
implementation group: 'org.apache.commons', name: 'commons-exec', version: '1.2'
implementation group: 'io.github.microutils', name: 'kotlin-logging', version: kotlinLoggingVersion
implementation group: 'org.jsoup', name: 'jsoup', version: '1.6.2'
Expand Down
4 changes: 3 additions & 1 deletion utbot-summary/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ val mockitoVersion: String by rootProject

dependencies {
implementation(project(":utbot-framework-api"))
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}")
implementation("org.unittestbot.soot:soot-utbot-fork:${sootVersion}") {
exclude(group="com.google.guava", module="guava")
}
implementation(project(":utbot-fuzzers"))
implementation(project(":utbot-instrumentation"))
implementation(group = "com.github.haifengl", name = "smile-kotlin", version = "2.6.0")
Expand Down