File tree Expand file tree Collapse file tree 6 files changed +57
-4
lines changed
src/main/kotlin/io/technoirlab/conventions/root
settings-conventions/src/main/kotlin/io/technoirlab/conventions/settings Expand file tree Collapse file tree 6 files changed +57
-4
lines changed Original file line number Diff line number Diff line change
1
+ public final class io/technoirlab/conventions/root/RootConventionPlugin : org/gradle/api/Plugin {
2
+ public fun <init> ()V
3
+ public synthetic fun apply (Ljava/lang/Object;)V
4
+ public fun apply (Lorg/gradle/api/Project;)V
5
+ }
6
+
Original file line number Diff line number Diff line change
1
+ plugins {
2
+ id(" io.technoirlab.conventions.gradle-plugin" )
3
+ }
4
+
5
+ gradlePluginConfig {
6
+ buildFeatures {
7
+ abiValidation = true
8
+ }
9
+ }
10
+
11
+ dependencies {
12
+ implementation(libs.dokka.gradle.plugin)
13
+ }
14
+
15
+ gradlePlugin {
16
+ plugins {
17
+ register(" rootConventions" ) {
18
+ id = " io.technoirlab.conventions.root"
19
+ implementationClass = " io.technoirlab.conventions.root.RootConventionPlugin"
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ package io.technoirlab.conventions.root
2
+
3
+ import io.technoirlab.conventions.root.configuration.configureDokka
4
+ import org.gradle.api.Plugin
5
+ import org.gradle.api.Project
6
+
7
+ class RootConventionPlugin : Plugin <Project > {
8
+ override fun apply (project : Project ) = with (project) {
9
+ pluginManager.apply (" org.gradle.lifecycle-base" )
10
+
11
+ configureDokka()
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ package io.technoirlab.conventions.root.configuration
2
+
3
+ import org.gradle.api.Project
4
+ import org.gradle.kotlin.dsl.configure
5
+ import org.jetbrains.dokka.gradle.DokkaExtension
6
+
7
+ internal fun Project.configureDokka () {
8
+ pluginManager.apply (" org.jetbrains.dokka" )
9
+
10
+ extensions.configure(DokkaExtension ::class ) {
11
+ dokkaPublications.named(" html" ) {
12
+ outputDirectory.set(layout.projectDirectory.dir(" docs" ))
13
+ }
14
+ }
15
+ }
Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ class SettingsConventionPlugin : Plugin<Settings> {
27
27
rootProject.name = config.projectId.get()
28
28
}
29
29
30
- gradle.rootProject {
31
- pluginManager.apply (" org.gradle.lifecycle-base" )
32
- }
33
-
34
30
gradle.lifecycle.beforeProject {
35
31
configureMetadata(config.metadata)
36
32
}
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ include(":common-conventions")
52
52
include(" :gradle-plugin-conventions" )
53
53
include(" :jvm-conventions" )
54
54
include(" :kotlin-multiplatform-conventions" )
55
+ include(" :root-conventions" )
55
56
include(" :settings-conventions" )
56
57
include(" :libraries:gradle-extensions" )
57
58
include(" :libraries:gradle-test-kit" )
You can’t perform that action at this time.
0 commit comments