Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Expression 'application' cannot be invoked as a function

I have a Kotlin application with kotlin-dsl gradle files. I’d like to set mainClassName to be able to use com.github.johnrengelman.shadow.

I’d like use the application for this and I gradle cannot resolve it even if I have application plugin applied.

Kotlin version: 1.6.10

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

After a lot of research it looks like I’m the only one who doesn’t have application in the gradle file.

>Solution :

you need to add application to your plugins list like

plugins {
    ...
    application
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading