Skip to content

Commit

Permalink
Change (sub)project run from gradlew run to bot
Browse files Browse the repository at this point in the history
  • Loading branch information
kantenkugel committed Nov 11, 2018
1 parent d29db98 commit 8797165
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ task getBotVersionInfo(type: Exec) {
commandLine 'git', 'log', '-1', '--format=[%ci]%n%H%n%s'

if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine = ['cmd', '/c'] + commandLine //don't use trailing ", it will get printed for some reason
commandLine = ['cmd', '/c'] + commandLine
}

//store the output instead of printing to the console:
Expand Down
26 changes: 24 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,28 @@ subprojects {
}
}

project(':bot') {
//Configurations for run
project(':launcher') {
tasks.run.enabled = false
}
}

/*
Due to gradle not terminating processes run via the run task correctly,
running the launcher results in a stranded (still running) bot process when ctrl+c-ing
*/
//project('launcher') {
// clean.doFirst {
// delete "${project.rootDir}/Bot-all.jar"
// }
//
// run {
// systemProperties System.properties
// dependsOn ':bot:shadowJar'
// doFirst {
// copy {
// from project(':bot').buildDir.toPath().resolve('libs/Bot-all.jar')
// into project.rootDir
// }
// }
// }
//}

0 comments on commit 8797165

Please sign in to comment.