From fd9b81582b807d07f3c542f6613c4a16d954f224 Mon Sep 17 00:00:00 2001 From: Xyxen Date: Sun, 17 Dec 2017 22:10:31 -0700 Subject: [PATCH] Fix runClient and runServer Gradle tasks (#2673) Compile dependencies are placed on the runtime classpath by Gradle. Because the compile configuration is set to extend from the provided config, all of those dependencies are put on the runtime classpath as well. In this patch, provided is instead made a separate configuration, and explicitly added to ONLY the compile classpath of the main sourceset. --- build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1d653e168..76520abd0 100644 --- a/build.gradle +++ b/build.gradle @@ -178,7 +178,7 @@ repositories { configurations { provided embedded - compile.extendsFrom provided, embedded + compile.extendsFrom embedded } dependencies { @@ -230,6 +230,9 @@ dependencies { testCompile "org.scalatest:scalatest_2.11:2.2.6" } +// Add the "provided" dependencies to the compile (but NOT runtime) classpath. +sourceSets.main.compileClasspath += [configurations.provided] + idea.module.scopes.PROVIDED.plus += [configurations.provided] // TODO Causes errors on Gradle 2 for me (No such property: allDependencies for class: java.io.File). //eclipse.classpath.plusConfigurations += [configurations.provided]