Skip to content

Commit

Permalink
Add a workaround for GradleUp/shadow#336
Browse files Browse the repository at this point in the history
  • Loading branch information
albertogoffi committed Feb 28, 2018
1 parent a5dd735 commit ed6489e
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -55,7 +58,6 @@ processResources.dependsOn(unzipGlove, unzipGloveModels)

sourceCompatibility = 1.8
targetCompatibility = 1.8
mainClassName = "org.toradocu.Toradocu"
version = '1.0'
jar {
manifest {
Expand All @@ -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()
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit ed6489e

Please sign in to comment.