summaryrefslogtreecommitdiff
path: root/sandbox/build.gradle
blob: 1f80b41ad20a5467d91dbf98860c7b4975876706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
plugins {
    id 'java'
    id 'org.jetbrains.kotlin.jvm'
    id 'application'
    id "com.github.johnrengelman.shadow" version "5.2.0"
}

sourceCompatibility = "11"
targetCompatibility = "11"
version = rootProject.version

compileKotlin {
    kotlinOptions {
        jvmTarget = "11"
    }
}

task installToPrefix(type: Copy) {
    dependsOn(installShadowDist)
    from("build/install/sandbox-shadow") {
        include("**/libeufin-sandbox")
        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'}"
}

compileTestKotlin {
    kotlinOptions {
        jvmTarget = "11"
    }
}

sourceSets {
    main.java.srcDirs = ['src/main/java', 'src/main/kotlin']
}

def ktor_version = '1.6.1'
def exposed_version = '0.32.1'

dependencies {
    implementation "com.hubspot.jinjava:jinjava:2.5.9"
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21'
    implementation 'ch.qos.logback:logback-classic:1.2.5'

    // XML Stuff
    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-client-apache:$ktor_version"
    implementation "io.ktor:ktor-server-netty:$ktor_version"
    implementation "io.ktor:ktor-jackson:$ktor_version"
    implementation "io.ktor:ktor-auth:$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'

    implementation project(":util")
}


application {
    mainClassName = "tech.libeufin.sandbox.MainKt"
    applicationName = "libeufin-sandbox"
}


jar {
    manifest {
        attributes "Main-Class": "tech.libeufin.sandbox.MainKt"
    }
}