Skip to content

Support new maven central publication scheme #554

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fzhinkin
Copy link
Contributor

@fzhinkin fzhinkin commented Jul 7, 2025

It is not longer possible to publish artifacts to sonatype staging repositories and the central publishing portal has to be used instead.
The PR adds TC jobs publishing all the artifacts into intermediate maven repo and then collect all the artifacts into a single deployment uploaded to the portal.

@fzhinkin fzhinkin requested review from dkhalanskyjb and ilya-g July 7, 2025 12:37
@fzhinkin
Copy link
Contributor Author

fzhinkin commented Jul 7, 2025

@ilya-g proposed to move these new jobs directly to kotlinx infra plugin and then simply regenerate configs in related projects. That's definitely the way to go, but I want to merge this PR into the datetime first, to avoid further 0.7.1 release delays.

@dkhalanskyjb
Copy link
Collaborator

@fzhinkin, we don't need to actually merge it to publish 0.7.1, we can just set this branch as the default one (and also check how well it works along the way before merging). The current branch from where TeamCity obtains its settings is #553; could you please rebase on top of it so that we have a branch where all's well?

"publishAndroidNativeX64PublicationToCentralRepository",
"publishAndroidNativeX86PublicationToCentralRepository",
"publishLinuxArm64PublicationToCentralRepository",
"publishLinuxX64PublicationToCentralRepository"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where do all these tasks come from? /gradlew tasks | grep publish | grep Central returns nothing for me. The old Deploy builds only have clean publish, and I do have publish in my list of tasks.

Also, if this conditional publication depending on the platform is an optimization here, then can't kotlinx-datetime be optimized to just clean publish on just MacOS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Where do all these tasks come from?

You have to add following Gradle properties to get those tasks:
-Pteamcity=on -Plibs.repo.url=https://localhost -Plibs.repo.user=user -Plibs.repo.password=password

Also, if this conditional publication depending on the platform is an optimization here, then can't kotlinx-datetime be optimized to just clean publish on just MacOS?

Sure, let's do that!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@fzhinkin fzhinkin force-pushed the publish-to-central branch from 6d88a66 to 637db6c Compare July 7, 2025 14:34
@fzhinkin
Copy link
Contributor Author

fzhinkin commented Jul 7, 2025

@dkhalanskyjb

The current branch from where TeamCity obtains its settings is #553

But now it's master, right?

@fzhinkin fzhinkin requested a review from dkhalanskyjb July 7, 2025 14:38
dependsOnSnapshot(startDeployment)

triggers {
finishBuildTrigger {
Copy link
Member

@ilya-g ilya-g Jul 8, 2025

Choose a reason for hiding this comment

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

I wonder why finishBuildTrigger is used here, i.e. why the first build in chain triggers subsequent ones instead of an aggregate build configuration running dependencies, like it was before?
Will it be possible not to publish TZ info for -compat versions, for example, with this setup?

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.

3 participants