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

Distribute ktlint via SDKMAN! #1363

Closed
helpermethod opened this issue Feb 9, 2022 · 20 comments · Fixed by #1978
Closed

Distribute ktlint via SDKMAN! #1363

helpermethod opened this issue Feb 9, 2022 · 20 comments · Fixed by #1978

Comments

@helpermethod
Copy link

Expected Behavior

It would be awesome if I could just use SDKMAN! to install the ktlint binary.

Current Behavior

Currently ktlint can only be installed manually or via Homebrew.

Additional information

To publish ktlint via SDKMAN!, the the binary would need to be packaged in a ZIP, with a top-level directory (the name does not actually matter) and a bin directory underneath, which would contain the ktlint binary, similar to

image

New versions could be published to SDKMAN! automatically via JReleaser

Wdyt? I also wouldn't mind helping out if you are interested!

@paul-dingemans
Copy link
Collaborator

If it can be fully automated, I would not have any objections against it. Please feel free to submit a PR.

@helpermethod
Copy link
Author

helpermethod commented Feb 12, 2022

I'm currently a little bit sick but expect a PR somewhere around the end of the next week 😄 .

@paul-dingemans
Copy link
Collaborator

@helpermethod We are ramping up to the 0.45.0 release in a couple of week max. So this would be a good time to submit your PR.

@paul-dingemans
Copy link
Collaborator

@helpermethod We are ramping up to the 0.46.0 release in a couple of week max. So this would be a good time to submit your PR.

@jayvdb
Copy link

jayvdb commented May 29, 2022

ping @helpermethod
Do you need some help with this?
Do you know the process to get a new sdk/tool accepted into sdkman?
I know kscript is in sdkman, but https://github.com/search?q=org%3Asdkman+kscript&type=code seems to show there isnt a github entry which controls its inclusion. There must be some non-Github process for adding new sdk/tools.

@helpermethod
Copy link
Author

Hi @jayvdb!

I was occupied with some stuff at work and family, but I'll see if I can prepare the PR this evening :). kscript seems to be using the Vendor API, which is the preferred way to automatically distribute releases to SDKMAN!.

The easiest way to use the Vendor API is via JReleaser, which automates most of the steps, and also enables other useful things like announcing new releases on Twitter, distribute releases via HomeBrew, Scoop, Chocolatey and many more.

@paul-dingemans
Copy link
Collaborator

@helpermethod @jayvdb Just a heads-up, I am almost ready to request the build of the next release. So, if you want to get on board of this release train, you only have a couple of days left to submit and get a PR merged.

@paul-dingemans
Copy link
Collaborator

Feel free to re-open once as PR is submitted.

@paul-dingemans paul-dingemans closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2022
@eygraber
Copy link
Contributor

@helpermethod any plans to make this PR?

@eygraber
Copy link
Contributor

@paul-dingemans I've started the process here sdkman/sdkman-db-migrations#639

Looks like you will need to request API credentials following this process sdkman/sdkman-db-migrations#639

I will follow up with a PR in this repo to add the sdkman-vendor-gradle-plugin to the release process.

@helpermethod
Copy link
Author

Hi @eygraber, if I remember correctly the problem with ktlint was that it didn't fit SDKMAN!s conventions, which is that an SDK needs to be distributed as a .zip/.tar.gz

  • which contains a top-level directory
  • with a bin directory underneath

@eygraber
Copy link
Contributor

That is being handled in the PR https://github.com/pinterest/ktlint/pull/1978/files#r1175844899

@paul-dingemans I think this will have to be done manually for 0.49.0; I can send you the zip on the Kotlin slack, or you can make it yourself (it's too large to attach here) and then manually add it to the 0.49.0 release.

@paul-dingemans
Copy link
Collaborator

That is being handled in the PR https://github.com/pinterest/ktlint/pull/1978/files#r1175844899

@paul-dingemans I think this will have to be done manually for 0.49.0; I can send you the zip on the Kotlin slack, or you can make it yourself (it's too large to attach here) and then manually add it to the 0.49.0 release.

@shashachu Can you handle this? I don't think that I am priviliged to do so.

@shashachu
Copy link
Contributor

That is being handled in the PR https://github.com/pinterest/ktlint/pull/1978/files#r1175844899

@paul-dingemans I think this will have to be done manually for 0.49.0; I can send you the zip on the Kotlin slack, or you can make it yourself (it's too large to attach here) and then manually add it to the 0.49.0 release.

@eygraber This just means a .zip artifact needs to be added to the 0.49.0 release?

@eygraber
Copy link
Contributor

@shashachu yes, in a specific format. I can send it to you in slack (depending on what their size limits on file sharing are) or Google Drive

@eygraber
Copy link
Contributor

eygraber commented May 7, 2023

@shashachu the PR on sdkman's side has been merged sdkman/sdkman-db-migrations#639

Did you receive credentials from them?

@paul-dingemans
Copy link
Collaborator

I have checked with @shashachu yesterday. No credentials were yet received, so a new request has been sent.

@eygraber
Copy link
Contributor

eygraber commented May 7, 2023

One of the sdkman maintainers mentioned that he sent it today.

@cimi
Copy link

cimi commented Jun 6, 2024

ktlint is not available through sdkman, even though the ktlint docs state it is.

The sdkman docs do not list ktlint: https://sdkman.io/sdks

Trying to install gives an error:

sdk install ktlint


Stop! ktlint is not a valid candidate.

I am using the latest sdkman:

sdk version

SDKMAN!
script: 5.18.2
native: 0.4.2

@paul-dingemans
Copy link
Collaborator

ktlint is not available through sdkman, even though the ktlint docs state it is.

The sdkman docs do not list ktlint: https://sdkman.io/sdks

Sorry about that. Almost every release we had troubles with SDKMan. Eventually SDKMan has never been enabled after its last failure. I will remove it entire from release process and documentation. Apparently there are not a lot of users that depend on SDKMan for installing ktlint. Sorry, if you are one of those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants