-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
105 lines (95 loc) · 4.24 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
98
99
100
101
102
103
104
105
plugins {
`aligned-version-plugin-conventions`
}
dependencies {
//implementation("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0")
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:${DependencyVersions.kotlinxBenchmark}")
implementation(kotlin("allopen", DependencyVersions.kotlin))
implementation("org.jetbrains.dokka:dokka-gradle-plugin:${DependencyVersions.dokka}")
testImplementation(kotlin("test"))
}
gradlePlugin {
plugins {
val `package` = group as String
fun scriptConventionsPlugin(idSuffix: String, displayName: String, description: String = displayName) =
scriptPlugin(`package`, idSuffix, displayName, description)
scriptConventionsPlugin(
"kotlin-multiplatform-js-browser-conventions",
"Kotlin Multiplatform conventions with the JS browser target"
)
scriptConventionsPlugin(
"kotlin-multiplatform-conventional-targets",
"Kotlin Multiplatform conventions with the conventional targets JVM, JS (browser), iOS (`iosX64`, `iosArm64`, and `iosSimulatorArm64`), and Wasm JS"
)
create("maven-publish-conventions") {
id = "$`package`.$name"
implementationClass = "$`package`.MavenPublishConventionsPlugin"
displayName = "Maven publish conventions"
description = displayName
}
scriptConventionsPlugin(
"kotlin-jvm-library-maven-publish-conventions",
"Kotlin/JVM library conventions with Maven publish"
)
scriptConventionsPlugin(
"kotlin-multiplatform-maven-publish-conventions",
"Kotlin Multiplatform conventions with Maven publish"
)
scriptConventionsPlugin(
"sonatype-ossrh-publish",
"Sonatype OSSRH Maven Central publish"
)
scriptConventionsPlugin(
"kotlin-jvm-library-sonatype-ossrh-publish-conventions",
"Kotlin/JVM library conventions with Sonatype OSSRH Maven Central publish"
)
scriptConventionsPlugin(
"kotlin-multiplatform-sonatype-ossrh-publish-conventions",
"Kotlin Multiplatform conventions with Sonatype OSSRH Maven Central publish"
)
create("github-packages-maven-publish") {
id = "$`package`.$name"
implementationClass = "$`package`.GithubPackagesMavenPublishPlugin"
displayName = "GitHub Packages publish"
description = "Publishes to a Maven registry of GitHub Packages."
}
create("gitlab-project-level-maven-endpoint-publish") {
id = "$`package`.$name"
implementationClass = "$`package`.GitlabProjectLevelMavenEndpointPublishPlugin"
displayName = "GitLab project-level Maven endpoint publish"
description = "Publishes to a GitLab project-level Maven endpoint."
}
// TODO
scriptConventionsPlugin(
"nexus-staging",
"Not implemented yet"
)
scriptConventionsPlugin(
"jvm-integration-test",
"JVM integration test",
"Adds a JVM integration test source set."
)
scriptConventionsPlugin(
"jvm-test-common-feature-variant",
"JVM test common feature variant",
"Adds a JVM test common feature variant with a source set that depends on `main`."
)
run {
scriptConventionsPlugin(
"benchmark.kotlinx-benchmark-jvm-conventions",
"kotlinx-benchmark conventions for Kotlin JVM",
"Applies the kotlinx-benchmark and `allopen` plugins, adds the kotlinx-benchmark dependencies, " +
"and registers a separate `benchmarks` source set that depends on `main` by default."
)
scriptConventionsPlugin(
"benchmark.kotlinx-benchmark-multiplatform-conventions",
"kotlinx-benchmark conventions for Kotlin Multiplatform",
"Applies the kotlinx-benchmark and `allopen` plugins and adds the koltinx-benchmark dependencies."
)
}
scriptConventionsPlugin(
"dokka.dokka-convention",
"Dokka convention plugin"
)
}
}