Skip to content

Commit 8f0be80

Browse files
committed
Listen for Java and Dokka plugin setup
1 parent 4bddcc4 commit 8f0be80

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

build.gradle.kts

+19-13
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,32 @@ subprojects {
6060
}
6161
}
6262

63+
subprojects.forEach { project ->
64+
with(project) {
65+
apply(plugin = "java-gradle-plugin")
66+
project.afterEvaluate {
67+
// java-gradle-plugin requires this block, but we already added the definitions in META-INF for unit testing...
68+
configure<GradlePluginDevelopmentExtension> {
69+
plugins {
70+
create("${project.name.capitalize()}Plugin") {
71+
id = "com.bakdata.${project.name}"
72+
implementationClass = "com.bakdata.gradle.${project.name.capitalize()}Plugin"
73+
description = project.description
74+
displayName = "Bakdata $name plugin"
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}
81+
6382
// config for gradle plugin portal
6483
// doesn't support snapshot, so we add config only if release version
6584
if (!version.toString().endsWith("-SNAPSHOT")) {
6685
subprojects.forEach { project ->
6786
with(project) {
68-
// com.gradle.plugin-publish depends on java-gradle-plugin, but it screws a bit this project
69-
apply(plugin = "java-gradle-plugin")
7087
apply(plugin = "com.gradle.plugin-publish")
7188
project.afterEvaluate {
72-
// java-gradle-plugin requires this block, but we already added the definitions in META-INF for unit testing...
73-
configure<GradlePluginDevelopmentExtension> {
74-
plugins {
75-
create("${project.name.capitalize()}Plugin") {
76-
id = "com.bakdata.${project.name}"
77-
implementationClass = "com.bakdata.gradle.${project.name.capitalize()}Plugin"
78-
description = project.description
79-
displayName = "Bakdata $name plugin"
80-
}
81-
}
82-
}
8389
// actual block of plugin portal config, need to be done on each subproject as the plugin does not support multi-module projects yet...
8490
configure<com.gradle.publish.PluginBundleExtension> {
8591
website = "https://github.com/bakdata/gradle-plugins"

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=1.2.3-SNAPSHOT
1+
version=1.2.4-SNAPSHOT
22
org.gradle.caching=true
33
org.gradle.parallel=true

0 commit comments

Comments
 (0)