Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove Maven, Use Gradle #445

Closed
jaredsburrows opened this issue Jun 2, 2019 · 13 comments
Closed

Remove Maven, Use Gradle #445

jaredsburrows opened this issue Jun 2, 2019 · 13 comments

Comments

@jaredsburrows
Copy link
Contributor

There are Maven and Gradle files. Can we go through and make this a Gradle based project?

@shashachu
Copy link
Contributor

Yes, I'd love for it to be gradle-based. Just haven't had the time to do it.

@jaredsburrows
Copy link
Contributor Author

Do you have a list of items that remain? project seems to build just file. What about testing and publishing?

@shashachu
Copy link
Contributor

We haven't tried testing and deploying with gradle yet so I'm unsure if they work or not.

@bethcutler
Copy link
Contributor

On a related note, it would be nice to remove the MavenDependencyResolver. The dependency on Maven source is the #1 blocker to being able to compile ktlint within the Google codebase. I will likely keep looking for a solution for it, but would appreciate others chiming in if they have any information about how this is used or what it could be replaced with.

@shashachu
Copy link
Contributor

shashachu commented Jun 3, 2019

@bethcutler doing some GitHub archaeology, it looks like it was added to support loading 3rd party reporters directly from the command line: #176

@shashachu
Copy link
Contributor

I would personally be fine slightly breaking that functionality and requiring command-line users to download reporter jars locally instead of resolving them automatically, but I don't have a good sense of how important this functionality is. @jeremymailen @JLLeitschuh is this used in either of your plugins?

@jeremymailen
Copy link
Contributor

Nope, kotlinter-gradle doesn't need the MavenDependencyResolver.

Reporters aren't extensible yet and if they were, would use Gradle's ability to resolve dependencies similar to adding rulesets https://github.com/jeremymailen/kotlinter-gradle#custom-rules

@JLLeitschuh
Copy link
Contributor

@shashachu No, we use Gradle's jar resolver.

The only security vulnerability ever reported against Ktlint was due to the internal KtLint repository resolver.

https://nvd.nist.gov/vuln/detail/CVE-2019-1010260
#332

Thankfully, that's been fixed.

I don't know how the Ktlint maven plugin works though.

https://github.com/gantsign/ktlint-maven-plugin

CC: @Tapchicoma

@Tapchicoma
Copy link
Collaborator

Originally ticket was about using Gradle build system to build ktlint itself.

Imho, removing MavenDependencyResolver should be a separate issue. I may imagine use-cases when people are using just command-line ktlint installation with 3rd party rules/dependencies and this should be discussed with them.

@bethcutler
Copy link
Contributor

Fair point. I've started a new discussion in #451.

@jaredsburrows
Copy link
Contributor Author

@shashachu The last task we have to do is create the runnable binary that the maven plugin provides, correct? Then we can remove maven completely.

@Tapchicoma
Copy link
Collaborator

@jaredsburrows it is already there - shadowJarExecutable:

tasks.register("shadowJarExecutable", DefaultTask.class) {

@jaredsburrows
Copy link
Contributor Author

@Tapchicoma Awesome! Time to remove maven now.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants