From ed6489e97daf3d9518239bfbfef2c1d7b074e842 Mon Sep 17 00:00:00 2001 From: Alberto Goffi Date: Wed, 28 Feb 2018 15:28:26 +0100 Subject: [PATCH] Add a workaround for https://github.com/johnrengelman/shadow/issues/336 --- build.gradle | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 197097ea..2c4121a8 100644 --- a/build.gradle +++ b/build.gradle @@ -2,24 +2,27 @@ buildscript { ext.kotlin_version = '1.2.21' repositories { + jcenter() mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2' // Workaround for https://github.com/johnrengelman/shadow/issues/336 } } plugins { id 'java' id 'application' - id 'com.github.johnrengelman.shadow' version '2.0.1' // For creating the fat JAR id 'de.undercouch.download' version '3.3.0' // For the download tasks id 'eclipse' // Support for Eclipse projects id 'idea' // Support for IntelliJ IDEA projects } apply plugin: 'kotlin' -// apply plugin: 'jacoco' + +mainClassName = "org.toradocu.Toradocu" +apply plugin: 'com.github.johnrengelman.shadow' // Workaround for https://github.com/johnrengelman/shadow/issues/336 task downloadGlove(type: Download) { src 'http://star-rep.inf.usi.ch/alberto/glove/raw/master/glove-binary.zip' @@ -55,7 +58,6 @@ processResources.dependsOn(unzipGlove, unzipGloveModels) sourceCompatibility = 1.8 targetCompatibility = 1.8 -mainClassName = "org.toradocu.Toradocu" version = '1.0' jar { manifest { @@ -71,11 +73,24 @@ sourceSets { } test { java { - excludes = ['org/toradocu/util/old*', 'org/toradocu/regression/*', 'org/toradocu/accuracy/paper/*'] + excludes = ['org/toradocu/util/old*', 'org/toradocu/regression/*', + 'org/toradocu/accuracy/paper/*', 'org/toradocu/generator/**'] } } } +test { + exclude 'org/toradocu/generator/**' + reports { + html.enabled = true + } + // Print standard output during tests execution. + testLogging { + events = ['STANDARD_OUT', 'FAILED'] + exceptionFormat = 'FULL' + } +} + /* Pass Java system properties from the command line to test tasks. */ tasks.withType(Test) { systemProperties System.getProperties() @@ -107,18 +122,6 @@ compileJava { options.compilerArgs << '-Xlint:unchecked,deprecation' } -test { - exclude 'org/toradocu/generator/**' - reports { - html.enabled = true - } - // Print standard output during tests execution. - testLogging { - events = ['STANDARD_OUT', 'FAILED'] - exceptionFormat = 'FULL' - } -} - repositories { mavenCentral() }