Value of mainClassName, 'application' plugin already applied

Basically, there are 28 sub projects and one mega-build.gradle file on the project path, and I have included application plug-in everywhere to ensure that mainClassName property was set. However, in installApp step, I still run into this error. I am not sure what’s the way to go about this.

12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter]
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] A problem was found with the configuration of task ‘:startScripts’.
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] > No value has been specified for property ‘mainClassName’.
12:59:02.845 [ERROR] [org.gradle.BuildExceptionReporter]
12:59:02.845 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
12:59:02.845 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
12:59:02.845 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:59:02.846 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED

You have to specify the value of this property to the full name of your main class
e.g. mainClassName=‘org.package.MyMainClass’

1 Like

Thank you very much Francois, your answers helped me a lot in resolving my issues.
For future inquirers, key was to specify mainClassName in a project build.gradle itself as well.