diff --git a/dokka-subprojects/analysis-kotlin-symbols/README.md b/dokka-subprojects/analysis-kotlin-symbols/README.md index 7c84ffc59d..4ca53ee7ed 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/README.md +++ b/dokka-subprojects/analysis-kotlin-symbols/README.md @@ -16,3 +16,9 @@ The `.jar` produced by this project shadows all dependencies. There are several 2. There are many intertwining transitive dependencies of different versions, as well as direct copy-paste, that can lead to runtime errors due to classpath conflicts, so it's best to let Gradle take care of dependency resolution, and then pack everything into a single jar in a single place that can be tuned. + +## Testing with an override version of Analysis API + +To build it with an override version of Analysis API, the property +`org.jetbrains.dokka.build.overrideAnalysisAPIVersion=2.2.0-dev-*` should be added to the project. Any version can be set in the property instead of `2.2.0-dev-*`. + \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index a622a3ca53..9da9e287d3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -104,3 +104,20 @@ include( project(":dokka-subprojects:core").name = "dokka-core" enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +// OVERWRITING CATALOG VERSIONS +// for testing against the latest dev version of Analysis API +// currently, Analysis API is used only in the analysis-kotlin-symbols project +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + val kotlinCompilerK2Version = providers.gradleProperty( + "org.jetbrains.dokka.build.overrideAnalysisAPIVersion" + ).orNull + if (kotlinCompilerK2Version != null) { + logger.lifecycle("Using the override version $kotlinCompilerK2Version of Analysis API") + version("kotlin-compiler-k2", kotlinCompilerK2Version) + } + } + } +} \ No newline at end of file