Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task exportCompileLibs << {
- subprojects.each { iSubProject ->
- iSubProject.configurations.findAll{it.name == "compile"}.each{ jConfig ->
- println "copying compile libs for ${iSubProject.name}..."
- copy {
- into "${iSubProject.buildDir}/gradle-lib-export"
- from jConfig
- eachFile {println it.name}
- }
- }
- }
- }
- task exportDependencies << {
- def deps = project.extensions.getByType(IdeaModel).module.resolveDependencies()
- copy {
- from deps*.classes.file
- into "${buildDir}/gradle-lib-export/libs"
- }
- copy {
- from deps*.sources.file
- into "${buildDir}/gradle-lib-export/sources"
- }
- }
- task exportDependencies(description: "export project dependency jars") << {
- subprojects.each { Project iSubProject ->
- String target = "${iSubProject.buildDir}/gradle-lib-export"
- IdeaPlugin ideaPlugin = new IdeaPlugin()
- ideaPlugin.apply(iSubProject)
- Set<Dependency> deps = ideaPlugin.model.module.resolveDependencies()
- println "exporting dependencies for $iSubProject.name into $target"
- copy {
- from deps*.classes.file
- into "${target}/libs"
- eachFile { println "lib -> $it.name" }
- }
- copy {
- from deps*.sources.file
- into "${target}/sources"
- eachFile{ println "source -> $it.name" }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement