Skip to content

Commit

Permalink
Listen for Java and Dokka plugin setup
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 28, 2024
1 parent 4bddcc4 commit 8f0be80
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
32 changes: 19 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,32 @@ subprojects {
}
}

subprojects.forEach { project ->
with(project) {
apply(plugin = "java-gradle-plugin")
project.afterEvaluate {
// java-gradle-plugin requires this block, but we already added the definitions in META-INF for unit testing...
configure<GradlePluginDevelopmentExtension> {
plugins {
create("${project.name.capitalize()}Plugin") {
id = "com.bakdata.${project.name}"
implementationClass = "com.bakdata.gradle.${project.name.capitalize()}Plugin"
description = project.description
displayName = "Bakdata $name plugin"
}
}
}
}
}
}

// config for gradle plugin portal
// doesn't support snapshot, so we add config only if release version
if (!version.toString().endsWith("-SNAPSHOT")) {
subprojects.forEach { project ->
with(project) {
// com.gradle.plugin-publish depends on java-gradle-plugin, but it screws a bit this project
apply(plugin = "java-gradle-plugin")
apply(plugin = "com.gradle.plugin-publish")
project.afterEvaluate {
// java-gradle-plugin requires this block, but we already added the definitions in META-INF for unit testing...
configure<GradlePluginDevelopmentExtension> {
plugins {
create("${project.name.capitalize()}Plugin") {
id = "com.bakdata.${project.name}"
implementationClass = "com.bakdata.gradle.${project.name.capitalize()}Plugin"
description = project.description
displayName = "Bakdata $name plugin"
}
}
}
// actual block of plugin portal config, need to be done on each subproject as the plugin does not support multi-module projects yet...
configure<com.gradle.publish.PluginBundleExtension> {
website = "https://github.com/bakdata/gradle-plugins"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=1.2.3-SNAPSHOT
version=1.2.4-SNAPSHOT
org.gradle.caching=true
org.gradle.parallel=true

0 comments on commit 8f0be80

Please sign in to comment.