I\'ve written a simple kotlin source file in order to get started, and a gradle script file. But I can\'t figure out how to add the main func to the manifest, so that the ja
None of the above solution worked for me while building Artifact.
IDE version IntelliJ IDEA 2019.1.1.
To fix the issue, do the following
Steps
Step 1 - Create Artifact
Go to File -> Project Structure -> Artifacts
Click the + -> JAR -> From modules with dependencies
Main ClassStep 2 - Change MANIFEST Path
Change value of Directory for META-INF/MANIFEST.MF to your project root.
For example , from /your/project/directory/src/main/kotlin to /your/project/directory
OK,then Press Apply and OK.Step 3 - Build Artifact
Build -> Build Artifacts -> [your-artifact-name] -> Build.The generated JAR file can be found in the out/artifact/[your-artifact-name] directory. (y)