summaryrefslogtreecommitdiff
path: root/bank/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'bank/build.gradle')
-rw-r--r--bank/build.gradle95
1 files changed, 95 insertions, 0 deletions
diff --git a/bank/build.gradle b/bank/build.gradle
new file mode 100644
index 00000000..71e44a5a
--- /dev/null
+++ b/bank/build.gradle
@@ -0,0 +1,95 @@
+plugins {
+ id 'kotlin'
+ id 'java'
+ id 'application'
+ id 'org.jetbrains.kotlin.jvm'
+ id "com.github.johnrengelman.shadow" version "5.2.0"
+}
+
+sourceCompatibility = "11"
+targetCompatibility = "11"
+version = rootProject.version
+
+compileKotlin {
+ kotlinOptions {
+ jvmTarget = "11"
+ }
+}
+
+compileTestKotlin {
+ kotlinOptions {
+ jvmTarget = "11"
+ }
+}
+
+task installToPrefix(type: Copy) {
+ dependsOn(installShadowDist)
+ from("build/install/bank-shadow") {
+ include("**/libeufin-bank")
+ 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'
+
+sourceSets {
+ main.java.srcDirs = ['src/main/kotlin']
+}
+
+dependencies {
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1-native-mt'
+ implementation "com.hubspot.jinjava:jinjava:2.5.9"
+ implementation 'ch.qos.logback:logback-classic:1.4.5'
+ implementation project(":util")
+
+ // XML:
+ 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'
+
+ implementation group: 'org.bouncycastle', name: 'bcprov-jdk16', version: '1.46'
+ implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.36.0.1'
+ implementation 'org.postgresql:postgresql:42.2.23.jre7'
+ implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.21'
+ implementation('com.github.ajalt:clikt:2.8.0')
+ implementation "org.jetbrains.exposed:exposed-core:$exposed_version"
+ implementation "org.jetbrains.exposed:exposed-dao:$exposed_version"
+ implementation "org.jetbrains.exposed:exposed-jdbc:$exposed_version"
+
+ implementation "io.ktor:ktor-server-core:$ktor_version"
+ implementation "io.ktor:ktor-server-call-logging:$ktor_version"
+ implementation "io.ktor:ktor-server-cors:$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"
+ 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"
+
+ testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.5.21'
+ testImplementation 'org.jetbrains.kotlin:kotlin-test:1.5.21'
+ testImplementation group: "junit", name: "junit", version: '4.13.2'
+
+ // UNIX domain sockets support (used to connect to PostgreSQL)
+ implementation 'com.kohlschutter.junixsocket:junixsocket-core:2.6.2'
+}
+
+application {
+ mainClassName = "tech.libeufin.bank.MainKt"
+ applicationName = "libeufin-bank"
+ applicationDefaultJvmArgs = ['-Djava.net.preferIPv6Addresses=true']
+}
+
+jar {
+ manifest {
+ attributes "Main-Class": "tech.libeufin.bank.MainKt"
+ }
+} \ No newline at end of file