-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
57 lines (45 loc) · 1.34 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("org.jetbrains.kotlin.jvm")
`maven-publish`
signing
}
repositories {
mavenCentral()
}
description = "Twirp service generator PBandK plugin for use in Kotlin Multiplatform Mobile projects."
dependencies {
compileOnly(libs.pbandk.runtime)
compileOnly(libs.pbandk.protoc.gen)
// Running the test requires `pbandk.gen.ServiceGenerator`, but the library
// itself only needs it for compile-time. See README.md#Usage for details.
testImplementation(libs.pbandk.protoc.gen)
testImplementation(libs.kotlin.test)
testImplementation(libs.kotlin.test.junit)
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>().configureEach {
compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8)
}
tasks.jar {
manifest {
attributes(
mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
),
)
}
}
val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}
publishing {
publications.withType<MavenPublication> {
artifact(javadocJar.get())
configureTwirpKmpPOM(project.description!!)
}
}