Files
Sourcetrail/bin/app/data/java/gradle/init.gradle
T
mlangkabel e604d24c40 logic: added Gradle project setup (issue #379)
* added implementation for Gradle project setup (icon is still missing)
* refactored project loading/saving and SourceGroupSettings
* removed long deprecated Cxx UseSourcePathsForHeaderSearch option

fortune cookie message = There is true and sincere friendship between you and your friends.
2017-10-02 18:43:59 +02:00

42 lines
1.2 KiB
Groovy

allprojects { pp ->
task printMainSrcDirs << {
if (project.hasProperty("sourceSets")) {
project.sourceSets.main.java.srcDirs.each { dir ->
println "${dir}"
}
}
}
task printTestSrcDirs << {
if (project.hasProperty("sourceSets")) {
project.sourceSets.test.java.srcDirs.each { dir ->
println "${dir}"
}
}
}
task copyCompileLibs << {
File rootDir = pp.getRootDir()
String destination = project.hasProperty('sourcetrail_lib_path') ? project.property('sourcetrail_lib_path').replace("\"", "") : rootDir.getPath() + rootDir.separator + "lib"
println destination;
if (pp.configurations.hasProperty("compile")) {
copy {
into destination
from pp.configurations.compile
eachFile { println "copying file \"" + it.file.name + "\" to \"" + destination + "\"" }
}
}
}
task copyTestCompileLibs << {
File rootDir = pp.getRootDir()
String destination = project.hasProperty('sourcetrail_lib_path') ? project.property('sourcetrail_lib_path') : rootDir.getPath() + rootDir.separator + "lib"
if (pp.configurations.hasProperty("testCompile")) {
copy {
into destination
from pp.configurations.testCompile
eachFile { println "copying file \"" + it.file.name + "\" to \"" + destination + "\"" }
}
}
}
}