aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.run/dolovov_ -unresolved-types.run.xml2
-rw-r--r--gradle.properties7
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts9
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt5
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt7
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt7
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt13
-rw-r--r--integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt7
-rw-r--r--kotlin-analysis/build.gradle.kts6
-rw-r--r--kotlin-analysis/compiler-dependency/build.gradle.kts28
-rw-r--r--kotlin-analysis/intellij-dependency/build.gradle.kts (renamed from kotlin-analysis/dependencies/build.gradle.kts)10
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt12
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt36
-rw-r--r--settings.gradle.kts3
14 files changed, 127 insertions, 25 deletions
diff --git a/.run/dolovov_ -unresolved-types.run.xml b/.run/dolovov_ -unresolved-types.run.xml
index 3f5d341c..8fd6ef70 100644
--- a/.run/dolovov_ -unresolved-types.run.xml
+++ b/.run/dolovov_ -unresolved-types.run.xml
@@ -4,7 +4,7 @@
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/integration-tests/gradle/projects/it-multiplatform-0" />
<option name="externalSystemIdString" value="GRADLE" />
- <option name="scriptParameters" value="" />
+ <option name="scriptParameters" value="--stacktrace" />
<option name="taskDescriptions">
<list />
</option>
diff --git a/gradle.properties b/gradle.properties
index 0ddc85f7..9fda2985 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,18 +2,15 @@
dokka_version_base=1.4.0-rc
dokka_publication_channel=dokka
dokka_integration_test_parallelism=2
-
# Versions
kotlin_version=1.4.0-rc
-kotlin_plugin_version=1.4-M3-release-207
-coroutines_version=1.3.7-1.4-M3
+coroutines_version=1.3.8-1.4.0-rc
kotlinx_html_version=0.7.1-1.4-M3
+kotlin_plugin_version=1.4.0-rc-release-221
idea_version=193.6494.35
language_version=1.4
-
# Code style
kotlin.code.style=official
-
# Gradle settings
org.gradle.jvmargs=-Xmx4g
org.gradle.parallel=true
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts b/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts
index 247e4c15..aded7b15 100644
--- a/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts
+++ b/integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts
@@ -11,7 +11,13 @@ kotlin {
jvm()
linuxX64("linux")
macosX64("macos")
- js()
+ sourceSets {
+ named("commonMain") {
+ dependencies {
+ implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8-1.4.0-rc")
+ }
+ }
+ }
}
tasks.withType<DokkaTask> {
@@ -20,6 +26,5 @@ tasks.withType<DokkaTask> {
create("jvmMain")
create("linuxMain")
create("macosMain")
- create("jsMain")
}
}
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt b/integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt
new file mode 100644
index 00000000..8eee326f
--- /dev/null
+++ b/integration-tests/gradle/projects/it-multiplatform-0/src/commonMain/kotlin/it/mpp0/coroutines.kt
@@ -0,0 +1,5 @@
+package it.mpp0
+
+import kotlinx.coroutines.CoroutineScope
+
+expect fun <T> CoroutineScope.runBlocking(block: suspend () -> T) : T
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt b/integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt
new file mode 100644
index 00000000..03b3b0ea
--- /dev/null
+++ b/integration-tests/gradle/projects/it-multiplatform-0/src/jsMain/kotlin/it/mpp0/runBlocking.kt
@@ -0,0 +1,7 @@
+package it.mpp0
+
+import kotlinx.coroutines.CoroutineScope
+
+actual fun <T> CoroutineScope.runBlocking(block: suspend () -> T): T {
+ TODO("Not yet implemented")
+}
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt b/integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt
new file mode 100644
index 00000000..03b3b0ea
--- /dev/null
+++ b/integration-tests/gradle/projects/it-multiplatform-0/src/jvmMain/kotlin/it/mpp0/runBlocking.kt
@@ -0,0 +1,7 @@
+package it.mpp0
+
+import kotlinx.coroutines.CoroutineScope
+
+actual fun <T> CoroutineScope.runBlocking(block: suspend () -> T): T {
+ TODO("Not yet implemented")
+}
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt b/integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt
new file mode 100644
index 00000000..b56fb80a
--- /dev/null
+++ b/integration-tests/gradle/projects/it-multiplatform-0/src/linuxMain/kotlin/it/mpp0/runBlocking.kt
@@ -0,0 +1,13 @@
+package it.mpp0
+
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Deferred
+import kotlinx.coroutines.async
+
+actual fun <T> CoroutineScope.runBlocking(block: suspend () -> T): T {
+ TODO("Not yet implemented")
+}
+
+fun <T> CoroutineScope.customAsync(block: suspend () -> T): Deferred<T> {
+ return async { block() }
+}
diff --git a/integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt b/integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt
new file mode 100644
index 00000000..03b3b0ea
--- /dev/null
+++ b/integration-tests/gradle/projects/it-multiplatform-0/src/macosMain/kotlin/it/mpp0/runBlocking.kt
@@ -0,0 +1,7 @@
+package it.mpp0
+
+import kotlinx.coroutines.CoroutineScope
+
+actual fun <T> CoroutineScope.runBlocking(block: suspend () -> T): T {
+ TODO("Not yet implemented")
+}
diff --git a/kotlin-analysis/build.gradle.kts b/kotlin-analysis/build.gradle.kts
index 8458ecc4..9f1588f3 100644
--- a/kotlin-analysis/build.gradle.kts
+++ b/kotlin-analysis/build.gradle.kts
@@ -8,10 +8,8 @@ plugins {
dependencies {
compileOnly(project(":core"))
-
- val kotlin_version: String by project
- api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version")
- api(project(":kotlin-analysis:dependencies", configuration = "shadow"))
+ api(project("intellij-dependency", configuration = "shadow"))
+ api(project("compiler-dependency", configuration = "shadow"))
}
registerDokkaArtifactPublication("dokkaAnalysis") {
diff --git a/kotlin-analysis/compiler-dependency/build.gradle.kts b/kotlin-analysis/compiler-dependency/build.gradle.kts
new file mode 100644
index 00000000..4d099a70
--- /dev/null
+++ b/kotlin-analysis/compiler-dependency/build.gradle.kts
@@ -0,0 +1,28 @@
+import org.jetbrains.DokkaPublicationBuilder.Component.Shadow
+import org.jetbrains.registerDokkaArtifactPublication
+
+plugins {
+ id("com.github.johnrengelman.shadow")
+ `maven-publish`
+ id("com.jfrog.bintray")
+}
+
+dependencies {
+ val kotlin_version: String by project
+ api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version")
+
+}
+
+tasks {
+ shadowJar {
+ val dokka_version: String by project
+ archiveFileName.set("dokka-kotlin-analysis-compiler-$dokka_version.jar")
+ archiveClassifier.set("")
+ exclude("**/intellij**")
+ }
+}
+
+registerDokkaArtifactPublication("kotlinAnalysisCompiler") {
+ artifactId = "kotlin-analysis-compiler"
+ component = Shadow
+}
diff --git a/kotlin-analysis/dependencies/build.gradle.kts b/kotlin-analysis/intellij-dependency/build.gradle.kts
index a12e697d..4ff68e4e 100644
--- a/kotlin-analysis/dependencies/build.gradle.kts
+++ b/kotlin-analysis/intellij-dependency/build.gradle.kts
@@ -30,12 +30,16 @@ dependencies {
val idea_version: String by project
intellijCore("com.jetbrains.intellij.idea:intellij-core:$idea_version")
implementation(intellijCoreAnalysis())
+
+ val kotlin_version: String by project
+ api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version")
+
}
tasks {
shadowJar {
val dokka_version: String by project
- archiveFileName.set("dokka-kotlin-analysis-dependencies-$dokka_version.jar")
+ archiveFileName.set("dokka-kotlin-analysis-intellij-$dokka_version.jar")
archiveClassifier.set("")
exclude("colorScheme/**")
@@ -50,7 +54,7 @@ tasks {
}
}
-registerDokkaArtifactPublication("kotlinAnalysisDependencies"){
- artifactId = "kotlin-analysis-dependencies"
+registerDokkaArtifactPublication("kotlinAnalysisIntelliJ") {
+ artifactId = "kotlin-analysis-intellij"
component = Shadow
}
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
index c8b324a0..e70be408 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
@@ -285,12 +285,11 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
Platform.common -> createCommonResolverForProject(
projectContext,
module,
- library,
modulesContent,
environment
)
- Platform.js -> createJsResolverForProject(projectContext, module, library, modulesContent)
- Platform.native -> createNativeResolverForProject(projectContext, module, library, modulesContent)
+ Platform.js -> createJsResolverForProject(projectContext, module, modulesContent)
+ Platform.native -> createNativeResolverForProject(projectContext, module, modulesContent)
}
val libraryModuleDescriptor = resolverForProject.descriptorForModule(library)
@@ -355,14 +354,13 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
private fun createCommonResolverForProject(
projectContext: ProjectContext,
module: ModuleInfo,
- library: LibraryModuleInfo,
modulesContent: (ModuleInfo) -> ModuleContent<ModuleInfo>,
environment: KotlinCoreEnvironment
): ResolverForProject<ModuleInfo> {
return object : AbstractResolverForProject<ModuleInfo>(
"Dokka",
projectContext,
- modules = listOf(module, library)
+ modules = module.dependencies()
) {
override fun sdkDependency(module: ModuleInfo): ModuleInfo? = null
@@ -394,13 +392,12 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
private fun createJsResolverForProject(
projectContext: ProjectContext,
module: ModuleInfo,
- library: LibraryModuleInfo,
modulesContent: (ModuleInfo) -> ModuleContent<ModuleInfo>
): ResolverForProject<ModuleInfo> {
return object : AbstractResolverForProject<ModuleInfo>(
"Dokka",
projectContext,
- modules = listOf(module, library)
+ modules = module.dependencies()
) {
override fun modulesContent(module: ModuleInfo): ModuleContent<ModuleInfo> = modulesContent(module)
override fun createResolverForModule(
@@ -425,7 +422,6 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
private fun createNativeResolverForProject(
projectContext: ProjectContext,
module: ModuleInfo,
- library: LibraryModuleInfo,
modulesContent: (ModuleInfo) -> ModuleContent<ModuleInfo>
): ResolverForProject<ModuleInfo> {
return object : AbstractResolverForProject<ModuleInfo>(
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt
index d0e0bb4f..346a305e 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt
@@ -1,7 +1,6 @@
package org.jetbrains.dokka.analysis
import com.intellij.openapi.Disposable
-import com.intellij.openapi.components.BaseComponent
import com.intellij.openapi.extensions.ExtensionPointName
import com.intellij.openapi.module.Module
import com.intellij.openapi.project.Project
@@ -54,6 +53,17 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
}
override fun getName(): String = "<Dokka module>"
+ override fun isLoaded(): Boolean {
+ throw UnsupportedOperationException()
+ }
+
+ override fun setOption(p0: String, p1: String?) {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getOptionValue(p0: String): String? {
+ throw UnsupportedOperationException()
+ }
override fun getModuleWithLibrariesScope(): GlobalSearchScope {
throw UnsupportedOperationException()
@@ -67,6 +77,14 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
throw UnsupportedOperationException()
}
+ override fun getModuleContentScope(): GlobalSearchScope {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getModuleContentWithDependenciesScope(): GlobalSearchScope {
+ throw UnsupportedOperationException()
+ }
+
override fun getModuleWithDependenciesAndLibrariesScope(p0: Boolean): GlobalSearchScope {
throw UnsupportedOperationException()
}
@@ -79,6 +97,10 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
throw UnsupportedOperationException()
}
+ override fun getModuleScope(p0: Boolean): GlobalSearchScope {
+ throw UnsupportedOperationException()
+ }
+
override fun getModuleRuntimeScope(p0: Boolean): GlobalSearchScope {
throw UnsupportedOperationException()
}
@@ -98,6 +120,18 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
throw UnsupportedOperationException()
}
+ override fun getModuleFile(): VirtualFile? {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getModuleFilePath(): String {
+ throw UnsupportedOperationException()
+ }
+
+ override fun getProject(): Project {
+ throw UnsupportedOperationException()
+ }
+
override fun getPicoContainer(): PicoContainer {
throw UnsupportedOperationException()
}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index a9c50387..c0445e9d 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -8,7 +8,8 @@ include("runners:gradle-plugin")
include("runners:cli")
include("runners:maven-plugin")
include("kotlin-analysis")
-include("kotlin-analysis:dependencies")
+include("kotlin-analysis:intellij-dependency")
+include("kotlin-analysis:compiler-dependency")
include("plugins:base")
include("plugins:base:frontend")
include("plugins:base:test-utils")