Skip to content
Snippets Groups Projects
build.gradle 2.38 KiB
Newer Older
plugins {
    id 'java-library'
    id 'idea'
    id 'org.jetbrains.kotlin.jvm'
    id 'org.jetbrains.kotlin.kapt'
    id "org.jlleitschuh.gradle.ktlint" version "$ktlint_plugin_version"
    id 'checkstyle'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    api 'com.google.code.findbugs:jsr305:3.0.2'
    api 'javax.inject:javax.inject:1' // required for @Qualifier in @Wakeful
    implementation "com.google.dagger:hilt-core:$hilt_version"
Torsten Grote's avatar
Torsten Grote committed
    kapt "com.google.dagger:dagger-compiler:$hilt_version"

Torsten Grote's avatar
Torsten Grote committed
    implementation 'org.briarproject:jtorctl:0.3'

    def ktor_version = '1.6.2'
    implementation "io.ktor:ktor-server-core:$ktor_version"
    implementation "io.ktor:ktor-server-netty:$ktor_version"
    implementation "io.ktor:ktor-auth:$ktor_version"
    implementation "io.ktor:ktor-jackson:$ktor_version"
    api "org.slf4j:slf4j-api:1.7.32"
Sebastian's avatar
Sebastian committed
    implementation 'com.h2database:h2:1.4.200'
Sebastian's avatar
Sebastian committed

    // Base 32
    implementation 'dev.keiji.rfc4648:rfc4648:1.0.0'
    // QrCode
    implementation 'com.google.zxing:core:3.4.1'
    testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
    testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"
    testImplementation "org.junit.jupiter:junit-jupiter-engine:$junit_version"
    testImplementation "io.mockk:mockk:$mockk_version"
    testImplementation "ch.qos.logback:logback-classic:1.2.5"
    testImplementation "io.ktor:ktor-client-cio:$ktor_version"
    testImplementation "io.ktor:ktor-client-jackson:$ktor_version"
    testImplementation "io.ktor:ktor-client-logging:$ktor_version"
    testImplementation "com.google.dagger:hilt-core:$hilt_version"
    kaptTest "com.google.dagger:dagger-compiler:$hilt_version"
}

test {
    useJUnitPlatform()
    testLogging {
        events "passed", "skipped", "failed"
    }
}
// At the moment for non-Android projects we need to explicitly mark the code generated by kapt
// as 'generated source code' for correct highlighting and resolve in IDE.
idea {
    module {
        sourceDirs += file('build/generated/source/kapt/main')
        testSourceDirs += file('build/generated/source/kapt/test')
        generatedSourceDirs += file('build/generated/source/kapt/main')
    }
}

apply from: "${rootProject.rootDir}/gradle/ktlint.gradle"