6

gradle is infuriating.

firstly there are so limited resources to understand how it's building a java/android code. everything happens by magic and hit+trial

secondly the plugins and the tasks works in mysterious ways. sometime they work when applied in the project root's gradle file, other times they work when applied in module's gradle file, nd other times they need configuration at both levels.

then there are gradle tasks like build ,test, assemble , clean etc. these are less of an action and more of an alias to run a bundle of actions.

then we have 3rd party plugins which attach themselves to these "fat-actions" and run before/after them

and finally we have the fuckup from the java world where the only available code coverage plugin is jacoco and IT FUCKING SUCKS!!! it is a test environment plugin, it should impact test tasks , but somehow it's fucking with the assemble taskin such a manner, that the jars ans aar files generated via plugin are giving runtime errrors. yes , runtime! as if we are back in the messed up js world of "everything is good unless running live"

even if it was a compile time eeror, i would have considered. but runtime?!! fucking runtime error?! i barely understand this shit, there is absolutely no info available as to which classes are being used to create a build and how, and i am supposed to fix this? wtf?!

Comments
  • 2
    Yeah, Gradle magic. You would need a dedicated person to only configure Gradle scripts all day 😆

    Hope following helps a bit.

    Each task has dependencies. If you want to "assemble", it needs to first "build" for example. That's why so many tasks run before it.

    You can try Kover for code coverage, which simplifies things a lot and can also use IntelliJ coverage.
  • 0
    @WildOrangutan we have 90% code in java, will it work correctly?
  • 0
    @dotenvironment it says it does. At the end of the day it depends on Jacoco and IntelliJ and they both support Java.
  • 2
    Ever tried using protobuf with Java? It’s very fun, especially when you add it to the gradle and makes you fucking wanna die.
Add Comment