Skip to content

Instantly share code, notes, and snippets.

@wojciech-zurek
Created September 16, 2019 17:10
Show Gist options
  • Save wojciech-zurek/42bd6ff528bb81f16187026fcde65178 to your computer and use it in GitHub Desktop.
Save wojciech-zurek/42bd6ff528bb81f16187026fcde65178 to your computer and use it in GitHub Desktop.
example of gradle, kotlin, shadow jar and application plugin
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