plugins { id 'kotlin' id 'java' id 'application' id 'org.jetbrains.kotlin.jvm' /** * Design choice: native installation logic doesn't provide one * single command to generate a unique jar, and even by generating * a unique jar manually, then the usual gradle wrappers wouldn't be * able to run those. Therefore, the dependency below ('shadow') * was added as it provides _both_: unique jar packaging _and_ a * suitable launch script. */ id "com.github.johnrengelman.shadow" version "5.2.0" } sourceSets { main.kotlin.srcDirs = ["src/main/kotlin"] } task installToPrefix(type: Copy) { dependsOn(installShadowDist) from("build/install/nexus-shadow") { include("**/libeufin-nexus") include("**/*.jar") } /** * Reads from command line -Pkey=value options, * with a default (/tmp) if the key is not found. * * project.findProperty('prefix') ?: '/tmp' */ into "${project.findProperty('prefix') ?: '/tmp'}" } apply plugin: 'kotlin-kapt' sourceCompatibility = '11' targetCompatibility = '11' version = rootProject.version compileKotlin { kotlinOptions { jvmTarget = '11' } } compileTestKotlin { kotlinOptions { jvmTarget = '11' } } def ktor_version = "1.5.0" def exposed_version = "0.25.1" dependencies { // Core language libraries implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2' // LibEuFin util library implementation project(":util") // Logging implementation "ch.qos.logback:logback-classic:1.2.3" // XML parsing/binding and encryption implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' implementation "javax.xml.bind:jaxb-api:2.3.0" implementation group: 'xerces', name: 'xercesImpl', version: '2.6.2-jaxb-1.0.6' implementation "org.glassfish.jaxb:jaxb-runtime:2.3.1" implementation 'org.apache.santuario:xmlsec:2.1.4' // Compression implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.20' // Command line parsing implementation("com.github.ajalt:clikt:2.7.0") // Exposed, an SQL library implementation "org.jetbrains.exposed:exposed-core:$exposed_version" implementation "org.jetbrains.exposed:exposed-dao:$exposed_version" implementation "org.jetbrains.exposed:exposed-jdbc:$exposed_version" // Database connection driver implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.28.0' implementation "org.postgresql:postgresql:42.2.18" // Ktor, an HTTP client and server library implementation "io.ktor:ktor-server-core:$ktor_version" implementation "io.ktor:ktor-client-apache:$ktor_version" implementation "io.ktor:ktor-server-netty:$ktor_version" implementation "io.ktor:ktor-auth:$ktor_version" implementation "io.ktor:ktor-jackson:$ktor_version" // PDF generation implementation 'com.itextpdf:itext7-core:7.1.11' // Cron syntax implementation "com.cronutils:cron-utils:9.0.2" // Unit testing testImplementation 'junit:junit:4.12' testImplementation 'org.jetbrains.kotlin:kotlin-test:1.4.30-RC' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.4.30-RC' } application { mainClassName = "tech.libeufin.nexus.MainKt" applicationName = "libeufin-nexus" } jar { manifest { attributes "Main-Class": "tech.libeufin.nexus.MainKt" } } run { standardInput = System.in }