forked from signalapp/libsignal-service-java
-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle.kts
78 lines (66 loc) · 2.26 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val signalKotlinJvmTarget: String by rootProject.extra
buildscript {
rootProject.extra["kotlin_version"] = "1.9.20"
repositories {
google()
mavenCentral()
maven {
url = uri("https://plugins.gradle.org/m2/")
content {
includeGroupByRegex("org\\.jlleitschuh\\.gradle.*")
}
}
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.extra["kotlin_version"] as String}")
classpath(libs.ktlint)
classpath("com.squareup.wire:wire-gradle-plugin:4.4.3") {
exclude(group = "com.squareup.wire", module = "wire-swift-generator")
exclude(group = "com.squareup.wire", module = "wire-grpc-client")
exclude(group = "com.squareup.wire", module = "wire-grpc-jvm")
exclude(group = "com.squareup.wire", module = "wire-grpc-server-generator")
exclude(group = "io.outfoxx", module = "swiftpoet")
}
classpath(files("$rootDir/wire-handler/wire-handler-1.0.0.jar"))
}
}
apply(from = "${rootDir}/constants.gradle.kts")
plugins {
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
project.group = "com.github.turasa"
val repositoryUsername = project.findProperty("whisperSonatypeUsername")?.toString() ?: ""
val repositoryPassword = project.findProperty("whisperSonatypePassword")?.toString() ?: ""
nexusPublishing {
repositories {
sonatype {
username = repositoryUsername
password = repositoryPassword
}
}
}
val lib_signal_service_version_number: String by rootProject.extra
val lib_signal_service_group_info: String by rootProject.extra
allprojects {
version = lib_signal_service_version_number
group = lib_signal_service_group_info
// Needed because otherwise the kapt task defaults to jvmTarget 17, which "poisons the well" and requires us to bump up too
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = signalKotlinJvmTarget
}
}
tasks.withType<Jar>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
subprojects {
if (JavaVersion.current().isJava8Compatible) {
allprojects {
tasks.withType<Javadoc>() {
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
}
}
}
}