File tree Expand file tree Collapse file tree
src/main/groovy/com/github/hauner/openapi/gradle Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,15 +145,28 @@ class OpenApiProcessorPlugin implements Plugin<Project> {
145145
146146 def project = task. getProject ()
147147 def handler = project. getDependencies ()
148- Dependency api = handler . create( " io.openapiprocessor:openapi-processor-api: ${ Version.api } " )
148+ List< Dependency > dependencies = []
149149
150- if (! config. processorLib ) {
150+ if (config. dependencies . empty ) {
151151 task. logger. warn (" 'openapiProcessor.${ name} .processor' not set!" )
152152 }
153153
154- Dependency dep = handler. create (config. processorLib)
154+ dependencies. add (handler. create(
155+ " io.openapiprocessor:openapi-processor-api:${ Version.api} " ))
155156
156- Configuration cfg = project. getConfigurations (). detachedConfiguration (api, dep)
157+ config. dependencies. each {
158+ dependencies. add (handler. create (it))
159+ }
160+
161+ Dependency [] deps = dependencies. toArray (new Dependency [0 ])
162+
163+ Configuration cfg = project. getConfigurations ()
164+ .detachedConfiguration (deps)
165+ // needed ?
166+ // cfg.resolutionStrategy {
167+ // force ("io.openapiprocessor:openapi-processor-api:${Version.api}")
168+ // force (config.dependencies)
169+ // }
157170 cfg. setVisible (false )
158171 cfg. setTransitive (true )
159172 cfg. setDescription (" the dependencies of the process${ name.capitalize ()} task." )
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class Processor {
2828 public static final String TARGET_DIR = ' targetDir'
2929
3030 String name
31- def processorLib // String | FileCollection...
31+ def dependencies = [] // String | FileCollection...
3232
3333 Map<String , Object > other = [:]
3434
@@ -37,11 +37,11 @@ class Processor {
3737 }
3838
3939 void processor (FileCollection fc ) {
40- processorLib = fc
40+ dependencies . add (fc)
4141 }
4242
4343 void processor (String dep ) {
44- processorLib = dep
44+ dependencies . add ( dep)
4545 }
4646
4747 void targetDir (String targetDir ) {
You can’t perform that action at this time.
0 commit comments