plugins { id 'kotlin' id 'java' id 'application' id 'org.jetbrains.kotlin.jvm' id "com.github.johnrengelman.shadow" version "5.2.0" } sourceSets { main.java.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' } } dependencies { // Core language libraries implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1-native-mt' // LibEuFin util library implementation project(":util") // Logging implementation 'ch.qos.logback:logback-classic:1.4.5' // XML parsing/binding and encryption implementation "javax.xml.bind:jaxb-api:2.3.0" implementation "org.glassfish.jaxb:jaxb-runtime:2.3.1" implementation 'org.apache.santuario:xmlsec:2.2.2' // Compression implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.21' // Command line parsing implementation('com.github.ajalt:clikt:2.8.0') // Exposed, an SQL library 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.36.0.1' implementation 'org.postgresql:postgresql:42.2.23.jre7' // Ktor, an HTTP client and server library implementation "io.ktor:ktor-server-core:$ktor_version" implementation "io.ktor:ktor-server-content-negotiation:$ktor_version" implementation "io.ktor:ktor-server-status-pages:$ktor_version" implementation "io.ktor:ktor-client-apache:$ktor_version" implementation "io.ktor:ktor-client-auth:$ktor_version" implementation "io.ktor:ktor-server-netty:$ktor_version" // Brings the call-logging library too. implementation "io.ktor:ktor-server-test-host:$ktor_version" implementation "io.ktor:ktor-auth:$ktor_auth_version" implementation "io.ktor:ktor-serialization-jackson:$ktor_version" // PDF generation implementation 'com.itextpdf:itext7-core:7.1.16' // Cron syntax implementation 'com.cronutils:cron-utils:9.1.5' // Unit testing // testImplementation 'junit:junit:4.13.2' // From https://docs.gradle.org/current/userguide/java_testing.html#sec:java_testing_basics: testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1' testImplementation 'org.jetbrains.kotlin:kotlin-test:1.5.21' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.5.21' testImplementation project(":sandbox") } test { useJUnit() failFast = true testLogging.showStandardStreams = false environment.put("LIBEUFIN_SANDBOX_ADMIN_PASSWORD", "foo") environment.put("LIBEUFIN_CASHOUT_TEST_TAN", "foo") environment.put( "LIBEUFIN_NEXUS_DB_CONNECTION", "jdbc:postgresql://localhost:5432/libeufincheck?user=${System.properties["user.name"]}" ) } application { mainClassName = "tech.libeufin.nexus.MainKt" applicationName = "libeufin-nexus" applicationDefaultJvmArgs = ['-Djava.net.preferIPv6Addresses=true'] } jar { manifest { attributes "Main-Class": "tech.libeufin.nexus.MainKt" } } run { standardInput = System.in }