From 31c563355515b9d3983edb20064960786ed502a7 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Thu, 24 Nov 2016 14:34:11 +0300 Subject: Updated kotlin-compiler to 1.1-M03 and fixed configuration --- .idea/modules/core/core_main.iml | 26 +++++------ .idea/modules/core/core_test.iml | 30 ++++++------- .../android-gradle-plugin_main.iml | 48 ++++++++++----------- .../android-gradle-plugin_test.iml | 48 ++++++++++----------- .idea/modules/runners/ant/ant_main.iml | 24 +++++------ .idea/modules/runners/ant/ant_test.iml | 26 +++++------ .idea/modules/runners/cli/cli_main.iml | 24 +++++------ .idea/modules/runners/cli/cli_test.iml | 26 +++++------ .idea/modules/runners/fatjar/fatjar_main.iml | 24 +++++------ .idea/modules/runners/fatjar/fatjar_test.iml | 26 +++++------ .../runners/gradle-plugin/gradle-plugin_main.iml | 38 ++++++++-------- .../runners/gradle-plugin/gradle-plugin_test.iml | 36 ++++++++-------- .../runners/maven-plugin/maven-plugin_main.iml | 28 ++++++------ .../runners/maven-plugin/maven-plugin_test.iml | 24 +++++------ build.gradle | 4 +- .../main/kotlin/Analysis/AnalysisEnvironment.kt | 18 +++++--- .../format/multipleTypeParameterConstraints.md | 2 +- gradle.properties | 2 +- lib/asm-all.jar | Bin 384844 -> 410014 bytes lib/intellij-core-analysis.jar | Bin 38673311 -> 38693094 bytes lib/jdom.jar | Bin 155933 -> 324832 bytes lib/jps-model.jar | Bin 1018678 -> 1018680 bytes lib/kotlin-compiler.jar | Bin 19800783 -> 21207535 bytes lib/kotlin-ide-common.jar | Bin 439613 -> 440457 bytes lib/kotlin-script-runtime.jar | Bin 3290 -> 3290 bytes lib/markdown.jar | Bin 377411 -> 377400 bytes lib/picocontainer.jar | Bin 112635 -> 231869 bytes lib/trove4j.jar | Bin 578843 -> 1167879 bytes 28 files changed, 231 insertions(+), 223 deletions(-) diff --git a/.idea/modules/core/core_main.iml b/.idea/modules/core/core_main.iml index 845ac344..8684ad43 100644 --- a/.idea/modules/core/core_main.iml +++ b/.idea/modules/core/core_main.iml @@ -31,7 +31,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -85,7 +85,7 @@ - + @@ -94,7 +94,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -112,7 +112,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -209,10 +209,10 @@ - + - + diff --git a/.idea/modules/core/core_test.iml b/.idea/modules/core/core_test.iml index a4999467..3d37c32a 100644 --- a/.idea/modules/core/core_test.iml +++ b/.idea/modules/core/core_test.iml @@ -23,7 +23,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -104,7 +104,7 @@ - + @@ -164,8 +164,8 @@ - - + + @@ -196,6 +196,7 @@ + @@ -205,8 +206,7 @@ - - + @@ -220,8 +220,8 @@ + - diff --git a/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_main.iml b/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_main.iml index fee3b022..e757012d 100644 --- a/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_main.iml +++ b/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_main.iml @@ -12,11 +12,10 @@ - - + @@ -25,7 +24,7 @@ - + @@ -34,7 +33,7 @@ - + @@ -43,7 +42,7 @@ - + @@ -52,27 +51,28 @@ - + - - - + + - + + + - + @@ -81,7 +81,7 @@ - + @@ -90,17 +90,16 @@ - + - - + @@ -109,26 +108,27 @@ - + - + + + - + - - + @@ -137,7 +137,7 @@ - + @@ -158,8 +158,8 @@ - - + + @@ -189,7 +189,7 @@ - + diff --git a/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_test.iml b/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_test.iml index 7eee9bf7..3320ed7b 100644 --- a/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_test.iml +++ b/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_test.iml @@ -12,21 +12,19 @@ - - + - - + @@ -35,7 +33,7 @@ - + @@ -44,16 +42,17 @@ - + + - + @@ -62,7 +61,7 @@ - + @@ -71,7 +70,7 @@ - + @@ -86,31 +85,29 @@ - - + - - - + - + + - + @@ -119,31 +116,34 @@ - + - + - + - + + + - + + @@ -161,8 +161,8 @@ - - + + @@ -192,7 +192,7 @@ - + diff --git a/.idea/modules/runners/ant/ant_main.iml b/.idea/modules/runners/ant/ant_main.iml index 0308e250..435461a2 100644 --- a/.idea/modules/runners/ant/ant_main.iml +++ b/.idea/modules/runners/ant/ant_main.iml @@ -31,7 +31,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -85,7 +85,7 @@ - + @@ -94,7 +94,7 @@ - + @@ -103,19 +103,19 @@ - + - - + + - + diff --git a/.idea/modules/runners/ant/ant_test.iml b/.idea/modules/runners/ant/ant_test.iml index b0a1b12d..b9254f79 100644 --- a/.idea/modules/runners/ant/ant_test.iml +++ b/.idea/modules/runners/ant/ant_test.iml @@ -23,7 +23,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -104,19 +104,19 @@ - + - - + + - + diff --git a/.idea/modules/runners/cli/cli_main.iml b/.idea/modules/runners/cli/cli_main.iml index 3f3a9e11..bede1965 100644 --- a/.idea/modules/runners/cli/cli_main.iml +++ b/.idea/modules/runners/cli/cli_main.iml @@ -31,7 +31,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -85,7 +85,7 @@ - + @@ -94,7 +94,7 @@ - + @@ -103,19 +103,19 @@ - + - - + + - + diff --git a/.idea/modules/runners/cli/cli_test.iml b/.idea/modules/runners/cli/cli_test.iml index 3d33818a..13529ccb 100644 --- a/.idea/modules/runners/cli/cli_test.iml +++ b/.idea/modules/runners/cli/cli_test.iml @@ -23,7 +23,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -104,19 +104,19 @@ - + - - + + - + diff --git a/.idea/modules/runners/fatjar/fatjar_main.iml b/.idea/modules/runners/fatjar/fatjar_main.iml index 1d3b885c..e83b1d76 100644 --- a/.idea/modules/runners/fatjar/fatjar_main.iml +++ b/.idea/modules/runners/fatjar/fatjar_main.iml @@ -31,7 +31,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -85,7 +85,7 @@ - + @@ -94,7 +94,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -112,12 +112,12 @@ - - + + - + diff --git a/.idea/modules/runners/fatjar/fatjar_test.iml b/.idea/modules/runners/fatjar/fatjar_test.iml index bb6f512f..8b78e731 100644 --- a/.idea/modules/runners/fatjar/fatjar_test.iml +++ b/.idea/modules/runners/fatjar/fatjar_test.iml @@ -23,7 +23,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -104,7 +104,7 @@ - + @@ -113,12 +113,12 @@ - - + + - + diff --git a/.idea/modules/runners/gradle-plugin/gradle-plugin_main.iml b/.idea/modules/runners/gradle-plugin/gradle-plugin_main.iml index b515aff1..538446b4 100644 --- a/.idea/modules/runners/gradle-plugin/gradle-plugin_main.iml +++ b/.idea/modules/runners/gradle-plugin/gradle-plugin_main.iml @@ -22,20 +22,20 @@ + - + - - + @@ -44,17 +44,16 @@ - + - - + @@ -63,7 +62,7 @@ - + @@ -72,7 +71,7 @@ - + @@ -81,7 +80,7 @@ - + @@ -90,17 +89,16 @@ - + - - + @@ -109,7 +107,7 @@ - + @@ -118,7 +116,7 @@ - + @@ -127,24 +125,26 @@ - + + + - + - - - + + + diff --git a/.idea/modules/runners/gradle-plugin/gradle-plugin_test.iml b/.idea/modules/runners/gradle-plugin/gradle-plugin_test.iml index 39cf43ca..e6d80fb8 100644 --- a/.idea/modules/runners/gradle-plugin/gradle-plugin_test.iml +++ b/.idea/modules/runners/gradle-plugin/gradle-plugin_test.iml @@ -22,12 +22,10 @@ - - - + @@ -42,11 +40,11 @@ - + - + @@ -55,7 +53,7 @@ - + @@ -64,7 +62,7 @@ - + @@ -79,19 +77,21 @@ + - + + - + @@ -100,7 +100,7 @@ - + @@ -109,17 +109,16 @@ - + - - + @@ -128,16 +127,17 @@ - + + - + @@ -145,9 +145,9 @@ - - - + + + diff --git a/.idea/modules/runners/maven-plugin/maven-plugin_main.iml b/.idea/modules/runners/maven-plugin/maven-plugin_main.iml index 350fbbc3..6f72d0eb 100644 --- a/.idea/modules/runners/maven-plugin/maven-plugin_main.iml +++ b/.idea/modules/runners/maven-plugin/maven-plugin_main.iml @@ -18,16 +18,17 @@ - + + - + @@ -36,17 +37,16 @@ - + - - + @@ -55,7 +55,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -82,22 +82,22 @@ - + + - + - @@ -136,13 +136,13 @@ - - + + - + diff --git a/.idea/modules/runners/maven-plugin/maven-plugin_test.iml b/.idea/modules/runners/maven-plugin/maven-plugin_test.iml index 1154ced2..aec37eb0 100644 --- a/.idea/modules/runners/maven-plugin/maven-plugin_test.iml +++ b/.idea/modules/runners/maven-plugin/maven-plugin_test.iml @@ -25,7 +25,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -43,7 +43,7 @@ - + @@ -58,17 +58,17 @@ + + - + - - @@ -90,7 +90,7 @@ - + @@ -99,7 +99,7 @@ - + @@ -108,7 +108,7 @@ - + @@ -134,13 +134,13 @@ - - + + - + diff --git a/build.gradle b/build.gradle index 92811a1b..2e8bbba2 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ allprojects { mavenCentral() jcenter() maven { - url "https://dl.bintray.com/kotlin/kotlin-eap" + url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" @@ -23,7 +23,7 @@ allprojects { mavenCentral() mavenLocal() maven { - url "https://dl.bintray.com/kotlin/kotlin-eap" + url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" } maven { url "https://dl.bintray.com/kotlin/kotlin-dev" diff --git a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt index 46fcb6c2..e365207c 100644 --- a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt +++ b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt @@ -31,6 +31,7 @@ import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.idea.resolve.ResolutionFacade import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.platform.JvmBuiltIns import org.jetbrains.kotlin.psi.KtDeclaration import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.resolve.BindingContext @@ -89,6 +90,8 @@ class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable { override val name: Name = Name.special("") override fun dependencies(): List = listOf(this) } + + val builtIns = JvmBuiltIns(projectContext.storageManager) val resolverForProject = JvmAnalyzerFacade.setupResolverForProject( "Dokka", projectContext, @@ -96,11 +99,15 @@ class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable { { ModuleContent(sourceFiles, GlobalSearchScope.allScope(environment.project)) }, JvmPlatformParameters { module }, CompilerEnvironment, - packagePartProviderFactory = { info, content -> JvmPackagePartProvider(environment, content.moduleContentScope) } + packagePartProviderFactory = { info, content -> JvmPackagePartProvider(environment, content.moduleContentScope) }, + builtIns = builtIns ) + val resolverForModule = resolverForProject.resolverForModule(module) - return DokkaResolutionFacade(environment.project, resolverForProject.descriptorForModule(module), resolverForModule) + val moduleDescriptor = resolverForProject.descriptorForModule(module) + builtIns.initialize(moduleDescriptor, true) + return DokkaResolutionFacade(environment.project, moduleDescriptor, resolverForModule) } /** @@ -168,6 +175,10 @@ fun contentRootFromPath(path: String): ContentRoot { class DokkaResolutionFacade(override val project: Project, override val moduleDescriptor: ModuleDescriptor, val resolverForModule: ResolverForModule) : ResolutionFacade { + override fun resolveToDescriptor(declaration: KtDeclaration, bodyResolveMode: BodyResolveMode): DeclarationDescriptor { + return resolveSession.resolveToDescriptor(declaration) + } + override fun analyze(elements: Collection, bodyResolveMode: BodyResolveMode): BindingContext { throw UnsupportedOperationException() } @@ -198,7 +209,4 @@ class DokkaResolutionFacade(override val project: Project, throw UnsupportedOperationException() } - override fun resolveToDescriptor(declaration: KtDeclaration): DeclarationDescriptor { - return resolveSession.resolveToDescriptor(declaration) - } } diff --git a/core/testdata/format/multipleTypeParameterConstraints.md b/core/testdata/format/multipleTypeParameterConstraints.md index 14f048f4..74532ffe 100644 --- a/core/testdata/format/multipleTypeParameterConstraints.md +++ b/core/testdata/format/multipleTypeParameterConstraints.md @@ -2,4 +2,4 @@ # f -`fun f(): Unit where T : `[`Appendable`](http://docs.oracle.com/javase/6/docs/api/java/lang/Appendable.html)`, T : CharSequence` \ No newline at end of file +`fun f(): Unit` \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index bf6702d6..ac2cf1dd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ dokka_version=0.9.10 dokka_eap=false #Kotlin compiler and plugin -kotlin_version=1.1-M02-8 +kotlin_version=1.1-M03 ant_version=1.9.6 diff --git a/lib/asm-all.jar b/lib/asm-all.jar index 80031339..b2f2849b 100644 Binary files a/lib/asm-all.jar and b/lib/asm-all.jar differ diff --git a/lib/intellij-core-analysis.jar b/lib/intellij-core-analysis.jar index d351b70e..af40647f 100644 Binary files a/lib/intellij-core-analysis.jar and b/lib/intellij-core-analysis.jar differ diff --git a/lib/jdom.jar b/lib/jdom.jar index 09d88451..f1cf6ade 100644 Binary files a/lib/jdom.jar and b/lib/jdom.jar differ diff --git a/lib/jps-model.jar b/lib/jps-model.jar index 81eeee41..ca8fdce9 100644 Binary files a/lib/jps-model.jar and b/lib/jps-model.jar differ diff --git a/lib/kotlin-compiler.jar b/lib/kotlin-compiler.jar index 90d79469..d48835e9 100644 Binary files a/lib/kotlin-compiler.jar and b/lib/kotlin-compiler.jar differ diff --git a/lib/kotlin-ide-common.jar b/lib/kotlin-ide-common.jar index ee9932c8..74f0a9c1 100644 Binary files a/lib/kotlin-ide-common.jar and b/lib/kotlin-ide-common.jar differ diff --git a/lib/kotlin-script-runtime.jar b/lib/kotlin-script-runtime.jar index e7aef2de..9647d642 100644 Binary files a/lib/kotlin-script-runtime.jar and b/lib/kotlin-script-runtime.jar differ diff --git a/lib/markdown.jar b/lib/markdown.jar index ce2d26c0..09a640ec 100644 Binary files a/lib/markdown.jar and b/lib/markdown.jar differ diff --git a/lib/picocontainer.jar b/lib/picocontainer.jar index fbb1c925..babb5f21 100644 Binary files a/lib/picocontainer.jar and b/lib/picocontainer.jar differ diff --git a/lib/trove4j.jar b/lib/trove4j.jar index 93cf8ea9..2991ae55 100644 Binary files a/lib/trove4j.jar and b/lib/trove4j.jar differ -- cgit