pinterest / ktlint

An anti-bikeshedding Kotlin linter with built-in formatter
https://pinterest.github.io/ktlint/
MIT License
6.2k stars 509 forks source link

Distribute ktlint via SDKMAN! #1363

Closed helpermethod closed 2 years ago

helpermethod commented 2 years ago

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 commented 2 years ago

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

helpermethod commented 2 years ago

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

paul-dingemans commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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

eygraber commented 1 year ago

@helpermethod any plans to make this PR?

eygraber commented 1 year ago

@paul-dingemans I've started the process here https://github.com/sdkman/sdkman-db-migrations/pull/639

Looks like you will need to request API credentials following this process https://github.com/sdkman/sdkman-db-migrations/pull/639

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

helpermethod commented 1 year ago

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

eygraber commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@shashachu the PR on sdkman's side has been merged https://github.com/sdkman/sdkman-db-migrations/pull/639

Did you receive credentials from them?

paul-dingemans commented 1 year ago

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

eygraber commented 1 year ago

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

cimi commented 4 months ago

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 commented 4 months ago

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.