https://kotlinlang.org logo
#detekt
Title
# detekt
m

Michael Marshall

06/23/2021, 6:19 AM
How can I change the output location of
detekt-rules.jar
when I run
./gradlew detektMain
? The default location is
detekt-rules/build/libs/detekt-rules.jar
but I want to move it to somewhere not auto ignored by git
g

gammax

06/23/2021, 7:38 AM
I’m not sure what you’re referring to 🤔 Are you building
detekt-rules
and you want to have it placed somewhere else? Are you talking about your own custom rules module or are you referring to this module?
m

Michael Marshall

06/23/2021, 7:51 AM
It's the jar of the custom rules module I have, sorry should have specified
I believe it gets generated when
detektMain
is run. Hold on, is this just the same artifact that's compiled when you do a gradle build on the module?
g

gammax

06/23/2021, 7:54 AM
What’s the name of your custom module?
m

Michael Marshall

06/23/2021, 7:56 AM
detekt-rules
g

gammax

06/23/2021, 10:28 AM
So the question is not really detekt related, as it involves the
java
plugin for Gradle. Ideally you could follow the approach described here: https://discuss.gradle.org/t/how-redefine-the-directory-where-generated-jar-files-libsdirname/6576
m

Michael Marshall

06/24/2021, 3:28 AM
Thanks for this, I'll look into it 🙂
5 Views