Skip to content

Commit

Permalink
Use proper configuration as classpath for testing and building jars s…
Browse files Browse the repository at this point in the history
…o implementation and api configurations can be used
  • Loading branch information
chali committed Aug 6, 2020
1 parent f65da55 commit 800722f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ class ClojureBasePlugin implements Plugin<Project> {
def clojureTest = project.task("clojureTest", type: ClojureTest) {
from project.sourceSets.test.clojure
delayedJvmOptions = { compileTask.jvmOptions }
delayedClasspath = { project.configurations.testRuntime }
delayedClasspath = { project.configurations.testRuntimeClasspath }
delayedOutputDir = { findOutputDir(project.sourceSets.main) }
delayedJunitOutputDir = {
project.file(project.buildDir.path + "/test-results")
}
dependsOn project.tasks.classes, project.configurations.testRuntime
dependsOn project.tasks.classes, project.configurations.testRuntimeClasspath
description = "Run Clojure tests in src/test."
group = JavaBasePlugin.VERIFICATION_GROUP
if (project.hasProperty("clojuresque.test.vars")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class ClojureExtrasDepsPlugin implements Plugin<Project> {
'Copy runtime dependencies into the "lib" directory'
group = "other"
into 'lib'
from project.configurations.runtime
from project.configurations.runtimeClasspath
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public class ClojureExtrasUberJarPlugin implements Plugin<Project> {
description =
'Constructs a jar with all runtime dependencies included'
group = "other"
dependsOn jar.source, project.configurations.runtime
dependsOn jar.source, project.configurations.runtimeClasspath
String baseName = jar.archiveBaseName.getOrNull() + '-standalone'
archiveBaseName.convention baseName
archiveBaseName.set baseName
enabled = false
doFirst {
project.configurations.runtime.each {
project.configurations.runtimeClasspath.each {
from project.zipTree(it)
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ClojureReplPlugin implements Plugin<Project> {
project.files(
sourceRoots,
project.sourceSets.collect { it.output },
project.configurations.testRuntime,
project.configurations.testRuntimeClasspath,
project.configurations.development
)
}
Expand Down

0 comments on commit 800722f

Please sign in to comment.