Is the order of the various blocks important? ie. ...
# gradle
n
Is the order of the various blocks important? ie.
tasks {...}
coming before/after
dependencies {...}
?
o
not if you write correct gradle code (delayed configuration via lambdas, resolving stuff at the right time ) if you're not writing custom code you don't need to worry about that
though plugins & buildscript do need to be at the top
n
I have
Copy code
tasks {
    jar {
        ....
    }
}

dependencies {
    ....
}
in the jar section i’m setting the class path and such. then in dependencies, i get an error when gradle tries to run it:
Cannot change dependencies of configuration ':implementation' after it has been included in dependency resolution.
o
you must be changing the configuration, not sure what to say -- I'd have to see your whole file
n
I decided to forgo the java/jar plugin and use
application
instead, so now all the dependency bundling is taken care of. 😅
g
decided to forgo the java/jar plugin
Not sure what you mean. application plugin works only for Java (or Kotlin JVM) projects
Your problem is that you configure your task eagerly, this is not a problem of dependencies order. This is exactly the reason why better to use proper plugin rather than own ad-hoc implementation for such standard use cases