logic: minor gradle project setup fix
This commit is contained in:
@@ -1,41 +1,53 @@
|
||||
allprojects { pp ->
|
||||
task printMainSrcDirs << {
|
||||
if (project.hasProperty("sourceSets")) {
|
||||
project.sourceSets.main.java.srcDirs.each { dir ->
|
||||
println "${dir}"
|
||||
}
|
||||
task printMainSrcDirs {
|
||||
doLast {
|
||||
if (project.hasProperty("sourceSets")) {
|
||||
if (project.sourceSets.hasProperty("main")) {
|
||||
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 printTestSrcDirs {
|
||||
doLast {
|
||||
if (project.hasProperty("sourceSets")) {
|
||||
if (project.sourceSets.hasProperty("test")) {
|
||||
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 copyCompileLibs {
|
||||
doLast {
|
||||
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 + "\"" }
|
||||
task copyTestCompileLibs {
|
||||
doLast {
|
||||
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 + "\"" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace utility
|
||||
{
|
||||
// TODO: move error handling to caller of this function
|
||||
const std::string dialogMessage =
|
||||
"The following error occurred while executing a Maven command:\n\n" + utility::replace(output, "\r\n", "\n");
|
||||
"The following error occurred while executing a Gradle command:\n\n" + utility::replace(output, "\r\n", "\n");
|
||||
MessageStatus(dialogMessage, true, false).dispatch();
|
||||
Application::getInstance()->handleDialog(dialogMessage);
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace utility
|
||||
{
|
||||
// TODO: move error handling to caller of this function
|
||||
const std::string dialogMessage =
|
||||
"The following error occurred while executing a Maven command:\n\n" + utility::replace(output, "\r\n", "\n");
|
||||
"The following error occurred while executing a Gradle command:\n\n" + utility::replace(output, "\r\n", "\n");
|
||||
MessageStatus(dialogMessage, true, false).dispatch();
|
||||
Application::getInstance()->handleDialog(dialogMessage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user