a96c8867ae
Resolves #13841
60 lines
1.2 KiB
Kotlin
60 lines
1.2 KiB
Kotlin
/*
|
|
* Copyright 2023 Signal Messenger, LLC
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
val signalJavaVersion: JavaVersion by rootProject.extra
|
|
val signalKotlinJvmTarget: String by rootProject.extra
|
|
|
|
plugins {
|
|
id("java-library")
|
|
id("org.jetbrains.kotlin.jvm")
|
|
id("ktlint")
|
|
id("com.squareup.wire")
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = signalJavaVersion
|
|
targetCompatibility = signalJavaVersion
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain {
|
|
languageVersion = JavaLanguageVersion.of(signalKotlinJvmTarget)
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
listOf(
|
|
"runKtlintCheckOverMainSourceSet",
|
|
"runKtlintFormatOverMainSourceSet"
|
|
).forEach { taskName ->
|
|
tasks.named(taskName) {
|
|
mustRunAfter(tasks.named("generateMainProtos"))
|
|
}
|
|
}
|
|
}
|
|
|
|
wire {
|
|
kotlin {
|
|
javaInterop = true
|
|
}
|
|
|
|
sourcePath {
|
|
srcDir("src/main/protowire")
|
|
}
|
|
}
|
|
|
|
tasks.runKtlintCheckOverMainSourceSet {
|
|
dependsOn(":core-util-jvm:generateMainProtos")
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.kotlin.reflect)
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
implementation(libs.kotlinx.coroutines.core.jvm)
|
|
|
|
testImplementation(testLibs.junit.junit)
|
|
testImplementation(testLibs.assertk)
|
|
testImplementation(testLibs.kotlinx.coroutines.test)
|
|
}
|