-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix collection of KotlinCompilation classpath using stable Kotlin Gradle Plugin API #114
Merged
aSemy
merged 10 commits into
adamko-dev:main
from
antohaby:alakotka/collectKotlinCompilationClasspath-fix
Aug 31, 2023
Merged
Fix collection of KotlinCompilation classpath using stable Kotlin Gradle Plugin API #114
aSemy
merged 10 commits into
adamko-dev:main
from
antohaby:alakotka/collectKotlinCompilationClasspath-fix
Aug 31, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Additionally, for Native compilations explicitly include stdlib and platform dependencies from Kotlin Native distribution. Home location of Kotlin Native distribution is collected via Internal API of Kotlin Gradle Plugin. It is safe for few reasons: * konanHome property is accessed only for past Kotlin versions (up to 1.9.X) * In Kotlin 2.0 `compileDependencyFiles` will include native-specific dependencies
This prevents from unnecessary dependency resolutions, including compile tasks. Particularly test source sets depend on compilations output of main source sets. And if test source sets are not skipped then Kotlin compilation will be triggered unnecessary.
Kotlin 1.9.0 supports Gradle Configuration Cache for Multiplatform projects Dokka generation task now depends on `transform{sourceSetName}DependenciesMetadata` tasks from Kotlin Gradle Plugin that didn't support Gradle Configuration Cache in earlier versions of Kotlin. Making whole gradle build incompatible with configuration cache.
aSemy
reviewed
Aug 29, 2023
Nice one, thanks! I will take a look. |
aSemy
reviewed
Aug 29, 2023
modules/dokkatoo-plugin/src/main/kotlin/internal/KotlinNativeDistributionAccessor.kt
Outdated
Show resolved
Hide resolved
modules/dokkatoo-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt
Outdated
Show resolved
Hide resolved
modules/dokkatoo-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt
Outdated
Show resolved
Hide resolved
modules/dokkatoo-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt
Outdated
Show resolved
Hide resolved
sellmair
reviewed
Aug 30, 2023
modules/dokkatoo-plugin/src/main/kotlin/internal/parseKotlinVersion.kt
Outdated
Show resolved
Hide resolved
aSemy
reviewed
Aug 30, 2023
modules/dokkatoo-plugin/src/main/kotlin/adapters/DokkatooKotlinAdapter.kt
Outdated
Show resolved
Hide resolved
aSemy
reviewed
Aug 30, 2023
- use KotlinToolingVersion to get the Kotlin version - rename 'isMain' properties/functions to 'isPublished', because it makes a bit more sense - fetch the konanHome prop by using extraProperties
…ub Actions doesn't like them (OOM), so I'll deal with them in adamko-dev#115
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous version of
collectKotlinCompilationClasspath
was using bunch of heuristic sourcesto get the correct classpath for KotlinCompilation for dokka analysis.
The proposed changes uses stable Kotlin Gradle Plugin API to get this data.
Except for Kotlin Native compilations which were special-cased for historical reasons.
It is planned to fix for Kotlin 2.0 https://youtrack.jetbrains.com/issue/KT-61559/Include-stdlib-and-platform-dependencies-to-KotlinNativeCompilation.compileDependencyFiles-API
This PR should also fix: #82
See also