Skip to content

Commit 7f43e71

Browse files
committed
feat(gradle): add execution task for examples
1 parent 2418447 commit 7f43e71

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ subprojects {
118118
}
119119
}
120120
}
121+
122+
// only apply to example sub-projects
123+
if (project.path.startsWith(':examples:')) {
124+
task execute(type:JavaExec) {
125+
main = System.getProperty('mainClass')
126+
classpath = sourceSets.main.runtimeClasspath
127+
}
128+
}
121129
}
122130

123131
tasks.withType(Test).configureEach {

0 commit comments

Comments
 (0)