From 324a31702ae29116e5ae0b34910263303a0177e9 Mon Sep 17 00:00:00 2001 From: janv Date: Fri, 27 Sep 2013 13:52:00 +0200 Subject: [PATCH] update gitignore project dependencies are of type File and not URL --- .gitignore | 1 + .../be/jlrhome/gradle/scr/GenerateDescriptorTask.groovy | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 19046d7..f1a6363 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /build/ .gradle/ +/.nb-gradle/profiles/private/ \ No newline at end of file diff --git a/src/main/groovy/be/jlrhome/gradle/scr/GenerateDescriptorTask.groovy b/src/main/groovy/be/jlrhome/gradle/scr/GenerateDescriptorTask.groovy index 47301dc..950b8cb 100644 --- a/src/main/groovy/be/jlrhome/gradle/scr/GenerateDescriptorTask.groovy +++ b/src/main/groovy/be/jlrhome/gradle/scr/GenerateDescriptorTask.groovy @@ -15,14 +15,17 @@ class GenerateDescriptorTask extends DefaultTask { def scrProject = new Project() def dependenciesAsUrl = new ArrayList() + def dependenciesAsFile = new ArrayList() def sources = new ArrayList() project.configurations.compile.resolvedConfiguration.getResolvedArtifacts().each { artifact -> def f = artifact.getFile() + dependenciesAsFile.add(f) dependenciesAsUrl.add(f.toURI().toURL()) project.logger.info("dependency add: {}", f) } + dependenciesAsFile.add(project.sourceSets.main.output.classesDir) dependenciesAsUrl.add(project.sourceSets.main.output.classesDir.toURI().toURL()) project.scr.sources.each{File f -> @@ -56,7 +59,7 @@ class GenerateDescriptorTask extends DefaultTask { scrProject.setClassLoader(new URLClassLoader((URL[])dependenciesAsUrl.toArray(), this.getClass().getClassLoader())) - scrProject.setDependencies(dependenciesAsUrl) + scrProject.setDependencies(dependenciesAsFile) scrProject.setSources(sources) scrProject.setClassesDirectory(project.sourceSets.main.output.classesDir.getAbsolutePath())