Merged in dmitriymx/fix/gradle (pull request #4)
fix: gradle run application Approved-by: Daniil Glazko <daniil@glazko.su>
This commit is contained in:
24
build.gradle
24
build.gradle
@@ -1,4 +1,4 @@
|
||||
subprojects {
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
|
||||
compileJava {
|
||||
@@ -10,7 +10,9 @@ subprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
ext {
|
||||
slf4j_version = '1.7.21'
|
||||
spring_version = '4.2.5.RELEASE'
|
||||
@@ -44,3 +46,23 @@ subprojects {
|
||||
delete 'libs'
|
||||
}
|
||||
}
|
||||
|
||||
task runApp(type: JavaExec) {
|
||||
main = 'mc.core.Main'
|
||||
|
||||
workingDir = (project.hasProperty("workDir") ? project.workDir : '.')
|
||||
|
||||
subprojects.findAll().each{ prj ->
|
||||
classpath += prj.sourceSets.main.runtimeClasspath
|
||||
}
|
||||
/* Uncomment, if your Log Implements are folder '{workDir}/log-impl' */
|
||||
//classpath += files(fileTree(dir: new File(workingDir, "log-impl")))
|
||||
|
||||
/* Uncomment, if you used VM args */
|
||||
//jvmArgs = [
|
||||
// "-DspringConfig=app.xml",
|
||||
// "-Dlog4j.configurationFile=log4j2.xml"
|
||||
//]
|
||||
|
||||
ignoreExitValue = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user