diff --git a/.gitignore b/.gitignore index 7bec898..696b755 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # Project exclude paths -/.gradle/ \ No newline at end of file +/.gradle/ +/.idea/ diff --git a/build.gradle.kts b/build.gradle.kts index 982ed74..6b01f92 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,10 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + plugins { java kotlin("jvm") version "1.6.0" + id("com.github.johnrengelman.shadow").version("6.1.0") } group = "com.badr.vertx" @@ -12,6 +16,20 @@ repositories { dependencies { implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) - api("io.vertx:vertx-web:4.2.1") - api(kotlin("stdlib")) + compileOnly("io.vertx:vertx-web:4.2.1") + compileOnly(kotlin("stdlib")) } + +val compileKotlin: KotlinCompile by tasks +compileKotlin.kotlinOptions.jvmTarget = "11" + +val compileTestKotlin: KotlinCompile by tasks +compileTestKotlin.kotlinOptions.jvmTarget = "11" + +tasks.withType { + archiveClassifier.set("fat") + manifest { + attributes["version"] = project.version + } + archiveFileName.set("Throttling.${archiveExtension.get()}") +} \ No newline at end of file