-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
97 lines (83 loc) · 2.8 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import com.diffplug.gradle.spotless.SpotlessExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.8.20"
kotlin("multiplatform") version kotlinVersion apply false
kotlin("plugin.serialization") version kotlinVersion apply false
id("org.jetbrains.dokka") version "1.8.20"
id("com.diffplug.spotless") version "6.19.0"
}
buildscript {
repositories {
gradlePluginPortal()
}
}
allprojects {
group = "fr.outadoc.mastodonk"
version = "0.2-alpha05"
repositories {
mavenCentral()
google()
}
afterEvaluate {
val projectName = name
extensions.findByType<PublishingExtension>()?.apply {
publications.withType<MavenPublication>().configureEach {
pom {
name.set(projectName)
description.set("Kotlin/Multiplatform library for Mastodon")
url.set("https://github.com/outadoc/mastodonk")
issueManagement {
url.set("https://github.com/outadoc/mastodonk/issues")
system.set("GitHub Issues")
}
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("Baptiste Candellier")
email.set("baptiste@candellier.me")
}
}
scm {
connection.set("scm:git:git://github.com/outadoc/mastodonk.git")
developerConnection.set("scm:git:git://github.com/outadoc/mastodonk.git")
url.set("https://github.com/outadoc/mastodonk")
}
}
}
repositories {
maven {
name = "nexus"
url = uri("https://nexus.outadoc.fr/repository/public")
credentials {
username = System.getenv("NEXUS_USERNAME")
password = System.getenv("NEXUS_PASSWORD")
}
}
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
}
}
}
configure<SpotlessExtension> {
format("misc") {
target(
"**/*.kt",
"**/*.kts",
"**/*.md",
"**/.gitignore"
)
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}