We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21939b3 commit c1eebc5Copy full SHA for c1eebc5
finch-java-example/build.gradle.kts
@@ -17,5 +17,12 @@ tasks.withType<JavaCompile>().configureEach {
17
}
18
19
application {
20
- mainClass = "com.tryfinch.api.example.Main"
+ // 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
+ }"
28
0 commit comments