Skip to content
This repository has been archived by the owner on Mar 20, 2020. It is now read-only.

Commit

Permalink
fixed gradle build: made MTC jar creation a gradle task
Browse files Browse the repository at this point in the history
  • Loading branch information
fastily committed Apr 22, 2017
1 parent 9f4fe99 commit b3ac05f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
20 changes: 8 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'

description="ctools build script"
version="1.0.0"

compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}

repositories {
jcenter()
Expand All @@ -25,17 +18,20 @@ task wrapper(type: Wrapper) {
gradleVersion = '3.5'
}

jar {
archiveName = "MTC-1.0.0.jar"

task mtc(type: Jar) {
baseName = "MTC"
version = "1.0.0"

from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
}

manifest {
attributes 'Main-Class': 'mtc.App'
}

exclude "**/bots/**", "**/reports/**", "**/tools/**"
exclude "**/bots/**", "**/reports/**", "**/tools/**", "META-INF/*.SF", "**/LICENSE*", "**/NOTICE*", "**/maven/**"

with jar
}
2 changes: 1 addition & 1 deletion src/main/java/mtc/MTCController.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ else if (currTask.isRunning())
*
* @param msg The new message to add.
*/
private void printToConsole(String msg)
private synchronized void printToConsole(String msg)
{
console.appendText(String.format("(%s): %s%n", LocalDateTime.now().format(df), msg));
}
Expand Down

0 comments on commit b3ac05f

Please sign in to comment.