Skip to content

Commit f3878fe

Browse files
authored
Update java-gradle-bootstrap.sh
Signed-off-by: SimiHunjan <simi.hunjan.k@gmail.com>
1 parent 6652a57 commit f3878fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/scripts/java-gradle-bootstrap.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,15 @@ def exampleFiles = examplesDir.exists()
5252
tasks.register('runExample', JavaExec) {
5353
group = 'examples'
5454
description = 'Run a single Java example (use -PexampleClass=<FQN>)'
55+
classpath = sourceSets.examples.runtimeClasspath
56+
5557
doFirst {
5658
if (!project.hasProperty('exampleClass')) {
5759
throw new GradleException("Missing -PexampleClass=<fully.qualified.ClassName>")
5860
}
59-
// Set it to a concrete String value at execution time
61+
// Set to a concrete String value at execution time
6062
mainClass.set(project.property('exampleClass').toString())
63+
}
6164
}
6265
6366
// Create a JavaExec task per discovered example: run_<FQN with dots replaced by underscores>

0 commit comments

Comments
 (0)