generated from Tweener/kmplate-lib
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
51 lines (46 loc) · 2.12 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
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import org.jetbrains.dokka.gradle.DokkaTask
import java.net.URL
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.android.library).apply(false)
alias(libs.plugins.kotlin.serialization).apply(false)
alias(libs.plugins.kotlin.parcelize).apply(false)
alias(libs.plugins.kotlin.nativeCocoaPods).apply(false)
alias(libs.plugins.dokka)
alias(libs.plugins.nexus.sonatype)
alias(libs.plugins.dependency.versions) // ./gradlew dependencyUpdates
alias(libs.plugins.bom.generator).apply(false)
alias(libs.plugins.realm).apply(false)
}
nexusPublishing {
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(gradleLocalProperties(rootDir, providers).getProperty("sonatype.username") ?: System.getenv("OSSRH_USERNAME"))
password.set(gradleLocalProperties(rootDir, providers).getProperty("sonatype.password") ?: System.getenv("OSSRH_PASSWORD"))
stagingProfileId.set(gradleLocalProperties(rootDir, providers).getProperty("sonatype.stagingProfileId") ?: System.getenv("OSSRH_STAGING_PROFILE_ID"))
}
}
}
subprojects {
// Dokka configuration
tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}
tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
jdkVersion.set(ProjectConfiguration.Compiler.jvmTarget.toInt())
languageVersion.set(libs.versions.kotlin)
sourceLink {
localDirectory.set(rootProject.projectDir)
remoteUrl.set(URL(MavenPublishing.Libraries.Bom.packageUrl + "/tree/main"))
remoteLineSuffix.set("#L")
}
}
}
}