libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

build.gradle (2305B)


      1 plugins {
      2     id("kotlin")
      3     id("org.jetbrains.kotlin.plugin.serialization") version "$kotlin_version"
      4 }
      5 
      6 version = rootProject.version
      7 
      8 java {
      9     sourceCompatibility = JavaVersion.VERSION_17
     10     targetCompatibility = JavaVersion.VERSION_17
     11 }
     12 
     13 compileKotlin.kotlinOptions.jvmTarget = "17"
     14 compileTestKotlin.kotlinOptions.jvmTarget = "17"
     15 
     16 task versionConstant {
     17     def outputDir = file("$buildDir/generated/constants")
     18     def outputFile = new File(outputDir, "CompileConstants.kt")
     19 
     20     outputs.dir outputDir
     21     
     22     doLast {
     23         // Ensure output directory exists
     24         outputDir.mkdirs()
     25         
     26         // Generate the Kotlin constants file
     27         outputFile.text = """
     28             package tech.libeufin.common
     29 
     30             val VERSION: String = "${getVersionWithGitHash()}"
     31         """.stripIndent()
     32     }
     33 }
     34 
     35 dokkaGenerateModuleHtml {
     36     dependsOn versionConstant
     37 }
     38 
     39 clean {
     40     delete "$buildDir/generated"
     41 }
     42 
     43 
     44 sourceSets.main.java.srcDirs = ["src/main/kotlin", "$buildDir/generated/constants"]
     45 
     46 
     47 compileKotlin {
     48     dependsOn versionConstant
     49 }
     50 
     51 dependencies {
     52     implementation("org.slf4j:slf4j-api:2.0.17")
     53     // Crypto
     54     implementation("org.bouncycastle:bcprov-jdk18on:1.82")
     55     implementation("org.bouncycastle:bcpkix-jdk18on:1.82")
     56     // Database helper
     57     implementation("org.postgresql:postgresql:$postgres_version")
     58     implementation("com.zaxxer:HikariCP:7.0.2")
     59     
     60     implementation("io.ktor:ktor-server-core:$ktor_version")
     61     implementation("io.ktor:ktor-server-call-logging:$ktor_version")
     62     implementation("io.ktor:ktor-server-content-negotiation:$ktor_version")
     63     implementation("io.ktor:ktor-server-status-pages:$ktor_version")
     64     implementation("io.ktor:ktor-server-cio:$ktor_version")
     65     implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
     66     implementation("io.ktor:ktor-server-forwarded-header:$ktor_version")
     67     implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
     68     implementation("io.ktor:ktor-server-test-host:$ktor_version")
     69     implementation("io.ktor:ktor-server-call-id:$ktor_version")
     70     
     71     implementation("com.github.ajalt.clikt:clikt:$clikt_version")
     72 
     73     implementation("org.jetbrains.kotlin:kotlin-test:$kotlin_version")
     74     testImplementation("uk.org.webcompere:system-stubs-core:2.1.8")
     75 }