From f18001d35ab6f402a17e82d42d6623d355f846e4 Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Wed, 28 Feb 2024 10:54:41 +0100 Subject: [PATCH] Listen for Java and Dokka plugin setup --- build.gradle.kts | 32 +++++++++++++------------------- gradle.properties | 2 +- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 699d93a..42564b1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -60,32 +60,26 @@ 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 { - 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 { + 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 { website = "https://github.com/bakdata/gradle-plugins" diff --git a/gradle.properties b/gradle.properties index 6b967f2..3afbffa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -version=1.2.4-SNAPSHOT +version=1.2.3-SNAPSHOT org.gradle.caching=true org.gradle.parallel=true