Created
September 16, 2019 17:10
-
-
Save wojciech-zurek/42bd6ff528bb81f16187026fcde65178 to your computer and use it in GitHub Desktop.
example of gradle, kotlin, shadow jar and application plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
plugins { | |
application | |
kotlin("jvm") version "1.3.50" | |
id("com.github.johnrengelman.shadow") version "5.1.0" | |
} | |
group = "eu.wojciechzurek" | |
version = "1.0-SNAPSHOT" | |
application{ | |
mainClassName = "eu.wojciechzurek.example.MainKt" | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
implementation(kotlin("stdlib-jdk8")) | |
} | |
tasks.withType<KotlinCompile> { | |
kotlinOptions.jvmTarget = "1.8" | |
} | |
tasks.withType<Jar> { | |
manifest { | |
attributes( | |
mapOf( | |
"Main-Class" to application.mainClassName | |
) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment