Guest User

Untitled

a guest
Feb 8th, 2024
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 3.71 KB | None | 0 0
  1. here is my whole gradle build file
  2. ```
  3.  
  4. //import io.gitlab.arturbosch.detekt.Detekt
  5.  
  6. val ktor_version: String by project
  7. val kotlin_version: String by project
  8. val logback_version: String by project
  9. val koin_ktor: String = "3.5.1"
  10. val mapStructVersion = "1.4.2.Final"
  11.  
  12. val project_version = "0.0.1"
  13.  
  14. plugins {
  15.     kotlin("jvm") version "1.9.20"
  16.     kotlin("kapt") version "1.9.20"
  17.     id("io.ktor.plugin") version "2.3.6"
  18.     id("org.jetbrains.kotlin.plugin.serialization") version "1.9.20"
  19.  
  20.     //kotlin("plugin.noarg") version "1.9.20"
  21. }
  22.  
  23. //noArg {
  24. //    annotation("com.my.Annotation")
  25. //    invokeInitializers = true
  26. //}
  27.  
  28. group = "com.example"
  29. version = project_version
  30.  
  31. application {
  32.     mainClass.set("io.ktor.server.netty.EngineMain")
  33.  
  34.     val isDevelopment: Boolean = project.ext.has("development")
  35.     applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
  36. }
  37.  
  38. repositories {
  39.     mavenCentral()
  40. }
  41.  
  42.  
  43.  
  44. tasks.test {
  45.     useJUnitPlatform()
  46. }
  47. dependencies {
  48. }
  49.  
  50.  
  51. subprojects {
  52.     apply(plugin = "kotlin")
  53.     apply(plugin = "kotlin-kapt")
  54.     apply(plugin = "org.jetbrains.kotlin.jvm")
  55.     apply(plugin = "org.jetbrains.kotlin.plugin.serialization")
  56.     apply(plugin = "io.ktor.plugin")
  57.  
  58.  
  59.     application {
  60.         mainClass.set("io.ktor.server.netty.EngineMain")
  61.  
  62.         val isDevelopment: Boolean = project.ext.has("development")
  63.         applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
  64.     }
  65.  
  66.     tasks.test {
  67.         useJUnitPlatform()
  68.     }
  69.  
  70.     repositories {
  71.         mavenCentral()
  72.     }
  73. //    kapt {
  74. //        correctErrorTypes = true
  75. //    }
  76.  
  77.     dependencies {
  78.         //mapstruct
  79.  
  80. //        implementation("org.mapstruct:mapstruct:1.5.3.Final")
  81. //        kapt("org.mapstruct:mapstruct-processor:1.5.3.Final")
  82. //        kapt("groupId:artifactId:version")
  83.  
  84.  
  85.         implementation("org.mapstruct:mapstruct:$mapStructVersion")
  86.         kapt("org.mapstruct:mapstruct-processor:$mapStructVersion")
  87.  
  88.  
  89.  
  90.  
  91.  
  92.         //CORS
  93.         implementation("io.ktor:ktor-server-cors:$ktor_version")
  94.  
  95.         //GSON
  96.         implementation("io.ktor:ktor-serialization-gson:$ktor_version")
  97.         implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
  98.  
  99.         //ouath
  100.         implementation("io.ktor:ktor-server-auth:$ktor_version")
  101.         implementation("io.ktor:ktor-server-auth-jwt:$ktor_version")
  102.         implementation("io.ktor:ktor-client-apache:$ktor_version")
  103.  
  104.         //date and time
  105.         implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
  106.  
  107.         //konform
  108.         implementation("io.konform:konform:0.4.0")
  109.  
  110.         //MONGODB
  111.         implementation("io.ktor:ktor-server-netty:2.2.3") // latest
  112.         implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
  113.         implementation("org.litote.kmongo:kmongo-coroutine:4.8.0") // latest:
  114.  
  115.         // Koin for Ktor
  116.         implementation ("io.insert-koin:koin-ktor:$koin_ktor")
  117.         // SLF4J Logger
  118.         implementation ("io.insert-koin:koin-logger-slf4j:$koin_ktor")
  119.  
  120.         implementation("io.ktor:ktor-server-content-negotiation-jvm")
  121.         implementation("io.ktor:ktor-server-core-jvm")
  122.         implementation("io.ktor:ktor-serialization-kotlinx-json-jvm")
  123.         implementation("io.ktor:ktor-server-host-common-jvm")
  124.         implementation("io.ktor:ktor-server-status-pages-jvm")
  125.         implementation("io.ktor:ktor-server-netty-jvm")
  126.         implementation("ch.qos.logback:logback-classic:$logback_version")
  127.         implementation("org.testng:testng:7.1.0")
  128.  
  129.         testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
  130.         testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
  131.     }
  132. }
Add Comment
Please, Sign In to add comment