Dynamic load depenedency in the task


(Alan Lee) #1

I want to load the dependency in the gradle task instead of being configuration stage (via beforeEvaluate) , is there any ways to load the dependency dynamically in the task ? i need to write my own one ?

Another question is about the dependency version. I want to get the exact 20140130.062809-1 version. How to mention in the dependency?

classpath “com.abc:plugin:2.0.3-20140130.062809-1” ? <-- it fails

plugin-2.0.3-20140130.062809-1.jar


(Peter Niederwieser) #2

I don’t understand the first question. To answer the second question, I don’t think it’s currently possible to resolve a Maven snapshot dependency by its unique version.


(Alan Lee) #3

My first question is to load the dependency dynmaically based on the argument of the task. When run the task, it reads the arguments and then load the dependency.


(Alan Lee) #4

My first question is to load the dependency dynmaically based on the argument of the task. When run the task, it reads the arguments and then load the dependency.


(Peter Niederwieser) #5

It’s impossible to add task dependencies in the execution phase.