[imltogradle] Do not resolve transitive dependencies in gralde if don't resolve them in JPS

This fixes problems of Gradle not being possible to find transitive maven artifacts
if actually we don't need them
This commit is contained in:
Nikita Bobko
2021-06-09 15:10:19 +02:00
parent d76bb45716
commit 8bb98f8f86
@@ -128,7 +128,9 @@ fun convertJpsLibrary(lib: JpsLibrary, scope: JpsJavaDependencyScope, exported:
}
else -> {
val dependencyNotation = "\"${mavenRepositoryLibraryDescriptor.mavenId}\""
listOf(JpsLikeJarDependency(dependencyNotation, scope, dependencyConfiguration = null, exported = exported))
val dependencyConfiguration =
"{ isTransitive = false }".takeIf { !mavenRepositoryLibraryDescriptor.isIncludeTransitiveDependencies }
listOf(JpsLikeJarDependency(dependencyNotation, scope, dependencyConfiguration, exported = exported))
}
}
}