2023-10-04 22:21:20 -04:00
|
|
|
/*
|
|
|
|
* Copyright 2023 Signal Messenger, LLC
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
val signalJavaVersion: JavaVersion by rootProject.extra
|
2024-09-12 20:04:17 +00:00
|
|
|
val signalKotlinJvmTarget: String by rootProject.extra
|
2023-10-04 22:21:20 -04:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("java-library")
|
|
|
|
id("org.jetbrains.kotlin.jvm")
|
|
|
|
id("ktlint")
|
2024-09-20 23:29:08 -04:00
|
|
|
id("com.squareup.wire")
|
2023-10-04 22:21:20 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
sourceCompatibility = signalJavaVersion
|
|
|
|
targetCompatibility = signalJavaVersion
|
|
|
|
}
|
|
|
|
|
2024-09-12 20:04:17 +00:00
|
|
|
kotlin {
|
|
|
|
jvmToolchain {
|
|
|
|
languageVersion = JavaLanguageVersion.of(signalKotlinJvmTarget)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-23 22:36:34 -04:00
|
|
|
afterEvaluate {
|
|
|
|
listOf(
|
|
|
|
"runKtlintCheckOverMainSourceSet",
|
|
|
|
"runKtlintFormatOverMainSourceSet"
|
|
|
|
).forEach { taskName ->
|
|
|
|
tasks.named(taskName) {
|
|
|
|
mustRunAfter(tasks.named("generateMainProtos"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-20 23:29:08 -04:00
|
|
|
wire {
|
|
|
|
kotlin {
|
|
|
|
javaInterop = true
|
|
|
|
}
|
|
|
|
|
|
|
|
sourcePath {
|
|
|
|
srcDir("src/main/protowire")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-24 14:04:47 -03:00
|
|
|
tasks.runKtlintCheckOverMainSourceSet {
|
|
|
|
dependsOn(":core-util-jvm:generateMainProtos")
|
|
|
|
}
|
|
|
|
|
2023-10-04 22:21:20 -04:00
|
|
|
dependencies {
|
2024-06-03 10:43:23 -04:00
|
|
|
implementation(libs.kotlin.reflect)
|
2024-09-16 08:20:19 -04:00
|
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
|
|
implementation(libs.kotlinx.coroutines.core.jvm)
|
2024-06-03 10:43:23 -04:00
|
|
|
|
2023-10-04 22:21:20 -04:00
|
|
|
testImplementation(testLibs.junit.junit)
|
2024-12-12 20:35:57 -06:00
|
|
|
testImplementation(testLibs.assertk)
|
2024-09-16 08:20:19 -04:00
|
|
|
testImplementation(testLibs.kotlinx.coroutines.test)
|
2023-10-04 22:21:20 -04:00
|
|
|
}
|