Skip to content

Commit c1eebc5

Browse files
chore(internal): allow running specific example from cli
1 parent 21939b3 commit c1eebc5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

finch-java-example/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,12 @@ tasks.withType<JavaCompile>().configureEach {
1717
}
1818

1919
application {
20-
mainClass = "com.tryfinch.api.example.Main"
20+
// Use `./gradlew :finch-java-example:run` to run `Main`
21+
// Use `./gradlew :finch-java-example:run -Dexample=Something` to run `SomethingExample`
22+
mainClass = "com.tryfinch.api.example.${
23+
if (project.hasProperty("example"))
24+
"${project.property("example")}Example"
25+
else
26+
"Main"
27+
}"
2128
}

0 commit comments

Comments
 (0)