Skip to content
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

Refactor publishing configuration #3030

Closed

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Jun 4, 2023

This is an infrastructure Everything related to builds tools, CI configurations and project tooling issue, part of #2703, specifically this comment

This PR is larger than I intended, I started picking things apart and I couldn't stop! I think it's worth having it all in one place so you can have a general overview, but just give me the word and I'll split out anything worth investigating into a separate PR.

I've done some preliminary tests using ./gradlew publishAllPublicationsToSpaceDokkaDevRepository --dry-run, but of course this isn't a real-life scenario.

Summary

  • ⚠️ rename dokka_publication_channel, dokka_publication_channels to org.jetbrains.dokka.publicationChannels, so the properties are consistent
  • add publicationChannels do DokkaBuildProperties, so it's more easily accessible
  • refactor registerDokkaArtifactPublication() helper
  • add docs to ValidatePublications task
  • move dokka_build val to DokkaBuildProperties, but don't start updating usages yet
  • refactor projectsWithoutOptInDependency to be more generic
  • migrate ValidatePublications checks into maven-publish.gradle.kts (which is just a messy first draft and could use with a re-write)

Additional changes:

- ⚠️ rename `dokka_publication_channel`, `dokka_publication_channels` to `org.jetbrains.dokka.publicationChannels`
- add `publicationChannels` do `DokkaBuildProperties`
- refactor `registerDokkaArtifactPublication()` helper
- add docs to `ValidatePublications` task
- moving `dokka_build` val to `DokkaBuildProperties`, but don't start updating usages yet
- refactor `projectsWithoutOptInDependency` to be more generic
- migrate `ValidatePublications` checks into `maven-publish.gradle.kts` (which is just a messy first draft and could use with a re-write)

Additional changes:

- move integration test properties (parallelism and exhaustive) into DokkaBuildProperties
- re-write 'disable DokkaHtml for MavenLocal' check
Comment on lines 90 to 94
afterEvaluate { // Workaround for an interesting design choice https://github.com/gradle/gradle/blob/c4f935f77377f1783f70ec05381c8182b3ade3ea/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/plugins/MavenPluginPublishPlugin.java#L49
configureSpacePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven")
configureSonatypePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven")
createDokkaPublishTaskIfNecessary()
// configureSpacePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven")
// configureSonatypePublicationIfNecessary("pluginMaven", "dokkaGradlePluginPluginMarkerMaven")
// createDokkaPublishTaskIfNecessary()
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure if the changes I've made are equivalent to this existing config, and it's difficult to check without actually publishing.

…ing_build_config

# Conflicts:
#	build-logic/src/main/kotlin/org/jetbrains/ValidatePublications.kt
#	build-logic/src/main/kotlin/org/jetbrains/conventions/dokka.gradle.kts
#	docs-developer/build.gradle.kts
#	kotlin-analysis/build.gradle.kts
#	kotlin-analysis/compiler-dependency/build.gradle.kts
#	kotlin-analysis/intellij-dependency/build.gradle.kts
@whyoleg
Copy link
Contributor

whyoleg commented Mar 14, 2024

I believe this PR can be closed, as the publishing setup is changed? @adam-enko ?

@adam-enko
Copy link
Contributor

I believe this PR can be closed, as the publishing setup is changed? @adam-enko ?

Yes, agreed, the refactoring was mostly completed as part of #3132

@adam-enko adam-enko closed this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants