aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.idea/kotlinc.xml7
-rw-r--r--build.gradle.kts3
-rw-r--r--core/src/main/kotlin/analysis/AnalysisEnvironment.kt34
-rw-r--r--coreDependencies/build.gradle.kts1
-rw-r--r--gradle.properties8
-rw-r--r--runners/cli/src/main/kotlin/cli/main.kt12
-rw-r--r--settings.gradle.kts1
7 files changed, 32 insertions, 34 deletions
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index 5a05248b..35cd5ac3 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
- <component name="Kotlin2JsCompilerArguments">
- <option name="sourceMapEmbedSources" />
- <option name="sourceMapPrefix" />
- </component>
<component name="KotlinCommonCompilerArguments">
<option name="apiVersion" value="1.3" />
<option name="languageVersion" value="1.3" />
</component>
+ <component name="KotlinCompilerSettings">
+ <option name="additionalArguments" value="-version -Xskip-metadata-version-check" />
+ </component>
</project> \ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index aab928e7..0b3c0da8 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -18,7 +18,7 @@ allprojects {
val language_version: String by project
tasks.withType(KotlinCompile::class).all {
kotlinOptions {
- freeCompilerArgs += "-Xjsr305=strict"
+ freeCompilerArgs += "-Xjsr305=strict -Xskip-metadata-version-check"
languageVersion = language_version
apiVersion = language_version
jvmTarget = "1.8"
@@ -30,6 +30,7 @@ allprojects {
mavenCentral()
mavenLocal()
maven(url = "https://dl.bintray.com/jetbrains/markdown/")
+ maven(url = "https://dl.bintray.com/kotlin/kotlin-dev")
}
configureDistMaven()
diff --git a/core/src/main/kotlin/analysis/AnalysisEnvironment.kt b/core/src/main/kotlin/analysis/AnalysisEnvironment.kt
index 7ed55acf..fea3516c 100644
--- a/core/src/main/kotlin/analysis/AnalysisEnvironment.kt
+++ b/core/src/main/kotlin/analysis/AnalysisEnvironment.kt
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.analyzer.common.CommonResolverForModuleFactory
import org.jetbrains.kotlin.builtins.DefaultBuiltIns
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.builtins.jvm.JvmBuiltIns
-import org.jetbrains.kotlin.caches.resolve.KotlinCacheService
+import org.jetbrains.kotlin.caches.resolve.JsResolverForModuleFactory
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
import org.jetbrains.kotlin.cli.common.config.ContentRoot
import org.jetbrains.kotlin.cli.common.config.KotlinSourceRoot
@@ -46,13 +46,9 @@ import org.jetbrains.kotlin.context.withModule
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl
-import org.jetbrains.kotlin.ide.konan.NativeLibraryInfo
import org.jetbrains.kotlin.ide.konan.analyzer.NativeResolverForModuleFactory
-import org.jetbrains.kotlin.ide.konan.decompiler.KotlinNativeLoadingMetadataCache
-import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
import org.jetbrains.kotlin.js.config.JSConfigurationKeys
import org.jetbrains.kotlin.js.resolve.JsPlatformAnalyzerServices
-import org.jetbrains.kotlin.js.resolve.JsResolverForModuleFactory
import org.jetbrains.kotlin.library.impl.createKotlinLibrary
import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
import org.jetbrains.kotlin.name.Name
@@ -61,7 +57,6 @@ import org.jetbrains.kotlin.platform.TargetPlatform
import org.jetbrains.kotlin.platform.js.JsPlatforms
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms.unspecifiedJvmPlatform
-import org.jetbrains.kotlin.platform.konan.KonanPlatforms
import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.BindingTrace
@@ -72,11 +67,17 @@ import org.jetbrains.kotlin.resolve.jvm.JvmPlatformParameters
import org.jetbrains.kotlin.resolve.jvm.JvmResolverForModuleFactory
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatformAnalyzerServices
import org.jetbrains.kotlin.resolve.konan.platform.NativePlatformAnalyzerServices
-import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
import org.jetbrains.kotlin.resolve.lazy.ResolveSession
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.util.slicedMap.ReadOnlySlice
import org.jetbrains.kotlin.util.slicedMap.WritableSlice
+import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
+import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
+import org.jetbrains.kotlin.caches.resolve.KotlinCacheService
+import org.jetbrains.kotlin.descriptors.konan.KlibModuleOrigin
+import org.jetbrains.kotlin.ide.konan.NativeKlibLibraryInfo
+import org.jetbrains.kotlin.load.java.structure.impl.classFiles.BinaryJavaClass
+import org.jetbrains.kotlin.platform.konan.NativePlatforms
import java.io.File
const val JAR_SEPARATOR = "!/"
@@ -123,7 +124,6 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
ModuleManager::class.java, moduleManager
)
- Extensions.registerAreaClass("IDEA_MODULE", null)
CoreApplicationEnvironment.registerExtensionPoint(
Extensions.getRootArea(),
OrderEnumerationHandler.EP_NAME, OrderEnumerationHandler.Factory::class.java
@@ -159,7 +159,7 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
val targetPlatform = when (analysisPlatform) {
Platform.js -> JsPlatforms.defaultJsPlatform
Platform.common -> CommonPlatforms.defaultCommonPlatform
- Platform.native -> KonanPlatforms.defaultKonanPlatform
+ Platform.native -> NativePlatforms.unspecifiedNativePlatform
Platform.jvm -> JvmPlatforms.defaultJvmPlatform
}
@@ -246,16 +246,16 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
}
private fun createNativeLibraryModuleInfo(libraryFile: File): LibraryModuleInfo {
- val kotlinLibrary = createKotlinLibrary(org.jetbrains.kotlin.konan.file.File(libraryFile.absolutePath), false)
+ val kotlinLibrary = createKotlinLibrary(org.jetbrains.kotlin.konan.file.File(libraryFile.absolutePath), "",false)
return object : LibraryModuleInfo {
override val analyzerServices: PlatformDependentAnalyzerServices =
analysisPlatform.analyzerServices()
override val name: Name = Name.special("<klib>")
- override val platform: TargetPlatform = KonanPlatforms.defaultKonanPlatform
+ override val platform: TargetPlatform = NativePlatforms.unspecifiedNativePlatform
override fun dependencies(): List<ModuleInfo> = listOf(this)
override fun getLibraryRoots(): Collection<String> = listOf(libraryFile.absolutePath)
override val capabilities: Map<ModuleDescriptor.Capability<*>, Any?>
- get() = super.capabilities + (NativeLibraryInfo.NATIVE_LIBRARY_CAPABILITY to kotlinLibrary)
+ get() = super.capabilities + (KlibModuleOrigin.CAPABILITY to kotlinLibrary)
}
}
@@ -345,15 +345,11 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
descriptor: ModuleDescriptor,
moduleInfo: ModuleInfo
): ResolverForModule {
- (ApplicationManager.getApplication() as MockApplication).addComponent(
- KotlinNativeLoadingMetadataCache::class.java,
- KotlinNativeLoadingMetadataCache()
- )
return NativeResolverForModuleFactory(
PlatformAnalysisParameters.Empty,
CompilerEnvironment,
- KonanPlatforms.defaultKonanPlatform
+ NativePlatforms.unspecifiedNativePlatform
).createResolverForModule(
descriptor as ModuleDescriptorImpl,
projectContext.withModule(descriptor),
@@ -413,14 +409,14 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
addRoots(javaRoots, messageCollector)
}
}, {
- val file = (it as JavaClassImpl).psi.containingFile.virtualFile
+ val file = (it as? BinaryJavaClass)?.virtualFile ?: (it as JavaClassImpl).psi.containingFile.virtualFile
if (file in sourcesScope)
module
else
library
}),
CompilerEnvironment,
- KonanPlatforms.defaultKonanPlatform
+ unspecifiedJvmPlatform
).createResolverForModule(
descriptor as ModuleDescriptorImpl,
projectContext.withModule(descriptor),
diff --git a/coreDependencies/build.gradle.kts b/coreDependencies/build.gradle.kts
index bd1d3a18..17a71c04 100644
--- a/coreDependencies/build.gradle.kts
+++ b/coreDependencies/build.gradle.kts
@@ -30,6 +30,7 @@ dependencies {
implementation("org.jetbrains:markdown:0.1.41") {
because("it's published only on bintray")
}
+ implementation("org.jetbrains.kotlin:ide-common-ij193:$kotlin_plugin_version")
}
tasks {
diff --git a/gradle.properties b/gradle.properties
index 96dfefb5..2924c778 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,10 +2,10 @@ dokka_version_base=0.11.0
dokka_publication_channel=dokka
# Kotlin compiler and plugin
-kotlin_version=1.3.61
-kotlin_plugin_version=1.3.61-release-180
-idea_version=192.5728.98
-language_version=1.3
+kotlin_version=1.4-M2-eap-70
+kotlin_plugin_version=1.4-M2-eap-63
+idea_version=193.6494.35
+language_version=1.4
# Code style
kotlin.code.style=official \ No newline at end of file
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt
index 607a58a7..f0d22aff 100644
--- a/runners/cli/src/main/kotlin/cli/main.kt
+++ b/runners/cli/src/main/kotlin/cli/main.kt
@@ -71,7 +71,7 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi
"main"
)
- override val classpath: List<String> by parser.repeatableOption(
+ override val classpath: List<String> by parser.repeatableOption<String>(
listOf("-classpath"),
"Classpath for symbol resolution"
)
@@ -86,12 +86,12 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi
"Source file or directory (allows many paths separated by the system path separator)"
) { SourceRootImpl(it) }
- override val samples: List<String> by parser.repeatableOption(
+ override val samples: List<String> by parser.repeatableOption<String>(
listOf("-sample"),
"Source root for samples"
)
- override val includes: List<String> by parser.repeatableOption(
+ override val includes: List<String> by parser.repeatableOption<String>(
listOf("-include"),
"Markdown files to load (allows many paths separated by the system path separator)"
)
@@ -150,7 +150,7 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi
"Disable documentation link to JDK"
)
- override val suppressedFiles: List<String> by parser.repeatableOption(
+ override val suppressedFiles: List<String> by parser.repeatableOption<String>(
listOf("-suppressedFile"),
""
)
@@ -173,7 +173,7 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi
{ Platform.DEFAULT }
)
- override val targets: List<String> by parser.repeatableOption(
+ override val targets: List<String> by parser.repeatableOption<String>(
listOf("-target"),
"Generation targets"
)
@@ -192,7 +192,7 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi
{ mutableListOf() }
)
- override val sourceLinks: MutableList<DokkaConfiguration.SourceLinkDefinition> by parser.repeatableOption(
+ override val sourceLinks: MutableList<DokkaConfiguration.SourceLinkDefinition> by parser.repeatableOption<DokkaConfiguration.SourceLinkDefinition>(
listOf("-srcLink"),
"Mapping between a source directory and a Web site for browsing the code"
) {
diff --git a/settings.gradle.kts b/settings.gradle.kts
index cc86f4fc..82bc8f5d 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -25,6 +25,7 @@ pluginManagement {
}
repositories {
+ maven(url="https://dl.bintray.com/kotlin/kotlin-dev/")
mavenLocal()
mavenCentral()
jcenter()