I too have this problem.
Idea version is 2017.2.1
I do next:
- Create new project Gradle->Kotlin
- Create main file in folder kotlin
- Create new default artifacts
- Build artifacts
- Run app:
java -jar Test.jar
no main manifest attribute, in Test.jar
My generated Mainfest is:
Manifest-Version: 1.0
Main-Class: MainKt
Manifest from jar file is:
Manifest-Version: 1.0
Implementation-Title: kotlin-stdlib-jre7
Kotlin-Runtime-Component: Main
Kotlin-Version: 1.1
Implementation-Version: 1.1.3-2
Build-Jdk: 1.8.0_131
Implementation-Vendor: JetBrains
build.gradle file is:
group ‘org.test’
version ‘1.0-SNAPSHOT’
buildscript {
ext.kotlin_version = ‘1.1.3-2’
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: ‘kotlin’
repositories {
mavenCentral()
}
dependencies {
compile “org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version”
}
compileKotlin {
kotlinOptions.jvmTarget = “1.8”
}
compileTestKotlin {
kotlinOptions.jvmTarget = “1.8”
}