-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
42 lines (39 loc) · 1.31 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.ktlint.gradle)
alias(libs.plugins.publish.plugin)
alias(libs.plugins.gradle.versions)
}
allprojects {
plugins.withType<JavaBasePlugin>().configureEach {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion.set(
JavaLanguageVersion.of(rootProject.libs.versions.javaVersion.get().toInt())
)
}
}
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
}
}
apply(plugin = rootProject.libs.plugins.ktlint.gradle.get().pluginId)
ktlint {
version.set(rootProject.libs.versions.ktlint.asProvider())
android.set(true)
}
}
nexusPublishing {
repositories {
sonatype {
stagingProfileId.set(project.properties["SONATYPE_STAGING_PROFILE_ID"]?.toString().orEmpty())
username.set(project.properties["OSSRH_USERNAME"]?.toString().orEmpty())
password.set(project.properties["OSSRH_PASSWORD"]?.toString().orEmpty())
}
}
}