Skip to content

Commit

Permalink
update gitignore
Browse files Browse the repository at this point in the history
project dependencies are of type File and not URL
  • Loading branch information
janv authored and janv committed Sep 27, 2013
1 parent 2841b49 commit 324a317
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build/
.gradle/
/.nb-gradle/profiles/private/
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ class GenerateDescriptorTask extends DefaultTask {

def scrProject = new Project()
def dependenciesAsUrl = new ArrayList<URL>()
def dependenciesAsFile = new ArrayList<File>()
def sources = new ArrayList<Source>()

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 ->

Expand Down Expand Up @@ -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())

Expand Down

0 comments on commit 324a317

Please sign in to comment.