Kotlin Facet: Scan classpath backwards when looking for kotlin-gradle-plugin dependency

#KT-15899 Fixed
This commit is contained in:
Alexey Sedunov
2017-02-09 18:03:44 +03:00
parent 330beebb2c
commit 7fbca4e122
2 changed files with 3 additions and 1 deletions

View File

@@ -183,6 +183,8 @@ fun KotlinFacet.configureFacet(
}
}
compilerInfo.coroutineSupport = coroutineSupport
compilerInfo.commonCompilerArguments?.languageVersion = versionInfo.languageLevel!!.versionString
compilerInfo.commonCompilerArguments?.apiVersion = versionInfo.apiLevel!!.versionString
}
}

View File

@@ -79,7 +79,7 @@ private val KOTLIN_PLUGIN_PATH_MARKER_FOR_MAVEN_LOCAL_REPO =
"${KotlinWithGradleConfigurator.GROUP_ID.replace('.', '/')}/${KotlinWithGradleConfigurator.GRADLE_PLUGIN_ID}/"
internal fun findKotlinPluginVersion(classpathData: BuildScriptClasspathData): String? {
for (classPathEntry in classpathData.classpathEntries) {
for (classPathEntry in classpathData.classpathEntries.asReversed()) {
for (path in classPathEntry.classesFile) {
val uniformedPath = path.replace('\\', '/')
// check / for local maven repo, and '.' for gradle