-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
49 lines (42 loc) · 1.43 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
import org.gradle.kotlin.dsl.nexusPublishing
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins {
// Publishing
idea
`maven-publish`
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = "io.github.dogacel"
version = "0.0.1"
nexusPublishing {
this.repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))
}
}
}
// Common settings for subprojects
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint") // Version should be inherited from parent
tasks.withType(KotlinCompilationTask::class.java).configureEach {
compilerOptions.freeCompilerArgs.add("-opt-in=kotlinx.serialization.ExperimentalSerializationApi")
}
repositories {
// Required to download KtLint
mavenCentral()
}
// Optionally configure plugin
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
ignoreFailures.set(true)
filter {
exclude { entry ->
val condition =
entry.file.toString().contains(".proto.kt") || entry.file.toString().contains("generated")
condition
}
}
}
}