https://kotlinlang.org logo
Title
s

stepango

10/05/2019, 5:12 AM
Hi everyone! I’m trying to do some weird stuff with gradle and I need your help:) I have main module which is `Android Application`(1) and I have one more module with `no plugins applied`(2). The current problem I have is: I want module (1) to get jar dependency from (2) like:
exec {
// very long operation to get this jar file from somewhere
}

configurations.maybeCreate("default")
artifacts.add("default", file("${libName}.jar"))
But what if I want to do this in execution stage? First problem I faced is I can’t add artifacts lazily and second one is - there is no tasks executed in project (2) by default. I bit more context is here https://github.com/stepango/bali/blob/master/bazel_wrapper/build.gradle Any suggestions are welcome.
s

Sam Garfinkel

10/05/2019, 2:23 PM
I don’t entirely understand what your objective is here. Are you trying to let Bazel build something then use the built artifact as a project dependency or something?
s

stepango

10/06/2019, 3:32 AM
yes
n

no

10/06/2019, 8:34 PM
why?
s

stepango

10/12/2019, 1:31 AM
why is not so important,
how?
this is the real question here