Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
11 changes: 4 additions & 7 deletions plugins/autodoc/autodoc-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ val assertj: String by project
val groupId: String by project

gradlePlugin {
website.set("https://projects.eclipse.org/proposals/eclipse-dataspace-connector")
vcsUrl.set("https://github.com/eclipse-dataspaceconnector/GradlePlugins.git")

// Define the plugin
plugins {
create("autodoc") {
Expand All @@ -27,13 +30,7 @@ gradlePlugin {
"Plugin to generate a documentation manifest for the EDC Metamodel, i.e. extensions, SPIs, etc."
id = "${groupId}.autodoc"
implementationClass = "org.eclipse.edc.plugins.autodoc.AutodocPlugin"
tags.set(listOf("build", "documentation", "generated", "autodoc"))
}
}
}

pluginBundle {
website = "https://projects.eclipse.org/proposals/eclipse-dataspace-connector"
vcsUrl = "https://github.com/eclipse-dataspaceconnector/GradlePlugins.git"
version = version
tags = listOf("build", "documentation", "generated", "autodoc")
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@ class AutodocDependencyInjector implements DependencyResolutionListener {

@Override
public void beforeResolve(ResolvableDependencies dependencies) {
var artifact = dependencyName + versionSupplier.get();
var version = versionSupplier.get();

var artifact = dependencyName;
if (version != null) {
artifact += ":" + version;
} else {
artifact += ":+";
project.getLogger().warn("No explicit configuration value for the annotationProcessor version was found. Please supply a configuration for the Autodoc Plugin's annotationProcessor.");
}

if (addDependency(project, artifact)) {
var task = project.getTasks().findByName("compileJava");
if ((task instanceof JavaCompile)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import org.eclipse.edc.plugins.autodoc.merge.MergeManifestsTask;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.ModuleVersionIdentifier;

import java.io.File;
import java.util.function.Supplier;
Expand All @@ -40,7 +38,7 @@ public void apply(Project project) {
project.getExtensions().create("autodocextension", AutodocExtension.class);

// adds the annotation processor dependency
project.getGradle().addListener(new AutodocDependencyInjector(project, format("%s:%s:", GROUP_NAME, PROCESSOR_ARTIFACT_NAME),
project.getGradle().addListener(new AutodocDependencyInjector(project, format("%s:%s", GROUP_NAME, PROCESSOR_ARTIFACT_NAME),
createVersionProvider(project),
getOutputDirectoryProvider(project)));

Expand All @@ -64,26 +62,14 @@ private Supplier<File> getOutputDirectoryProvider(Project project) {
private Supplier<String> createVersionProvider(Project project) {
return () -> {
// runtime version of the actual annotation processor, or override in config
var versionToUse = getProcessorModuleVersion(project);

var extension = project.getExtensions().findByType(AutodocExtension.class);
if (extension != null && extension.getProcessorVersion().isPresent()) {
versionToUse = extension.getProcessorVersion().get();
var versionToUse = extension.getProcessorVersion().get();
project.getLogger().debug("{}: use configured version from AutodocExtension (override) [{}]", project.getName(), versionToUse);
} else {
project.getLogger().debug("{}: use default version [{}]", project.getName(), versionToUse);
return versionToUse;
}
return versionToUse;
return null;
};
}

private String getProcessorModuleVersion(Project project) {
Configuration classpath = project.getRootProject().getBuildscript().getConfigurations().getByName("classpath");
return classpath.getResolvedConfiguration().getResolvedArtifacts().stream()
.map(artifact -> artifact.getModuleVersion().getId())
.filter(id -> GROUP_NAME.equals(id.getGroup()) && PLUGIN_ARTIFACT_NAME.equals(id.getName()))
.findAny()
.map(ModuleVersionIdentifier::getVersion)
.orElse(null);
}
}
11 changes: 4 additions & 7 deletions plugins/edc-build/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dependencies {
}

gradlePlugin {
website.set("https://projects.eclipse.org/proposals/eclipse-dataspace-connector")
vcsUrl.set("https://github.com/eclipse-dataspaceconnector/GradlePlugins.git")
// Define the plugins
plugins {
create("edc-build-base") {
Expand All @@ -35,20 +37,15 @@ gradlePlugin {
"Meta-plugin that provides the capabilities of the EDC build"
id = "${groupId}.edc-build-base"
implementationClass = "org.eclipse.edc.plugins.edcbuild.EdcBuildBasePlugin"
tags.set(listOf("build", "verification", "test"))
}
create("edc-build") {
displayName = "edc-build"
description =
"Plugin that applies the base capabilities and provides default configuration for the EDC build"
id = "${groupId}.edc-build"
implementationClass = "org.eclipse.edc.plugins.edcbuild.EdcBuildPlugin"
tags.set(listOf("build", "verification", "test"))
}
}
}

pluginBundle {
website = "https://projects.eclipse.org/proposals/eclipse-dataspace-connector"
vcsUrl = "https://github.com/eclipse-dataspaceconnector/GradlePlugins.git"
version = version
tags = listOf("build", "verification", "test")
}
11 changes: 4 additions & 7 deletions plugins/module-names/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ val assertj: String by project
val groupId: String by project

gradlePlugin {
website.set("https://projects.eclipse.org/proposals/eclipse-dataspace-connector")
vcsUrl.set("https://github.com/eclipse-dataspaceconnector/GradlePlugins.git")
// Define the plugin
plugins {
create("module-names") {
Expand All @@ -16,13 +18,8 @@ gradlePlugin {
"Plugin to verify that a project has no duplicate submodules (by name)"
id = "${groupId}.module-names"
implementationClass = "org.eclipse.edc.plugins.modulenames.ModuleNamesPlugin"
tags.set(listOf("build", "verification"))
version = version
}
}
}

pluginBundle {
website = "https://projects.eclipse.org/proposals/eclipse-dataspace-connector"
vcsUrl = "https://github.com/eclipse-dataspaceconnector/GradlePlugins.git"
version = version
tags = listOf("build", "verification")
}
10 changes: 3 additions & 7 deletions plugins/openapi-merger/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ dependencies {
}

gradlePlugin {
website.set("https://projects.eclipse.org/proposals/eclipse-dataspace-connector")
vcsUrl.set("https://github.com/eclipse-dataspaceconnector/GradlePlugins.git")
// Define the plugin
plugins {
create("openapi-merger") {
Expand All @@ -23,13 +25,7 @@ gradlePlugin {
"Plugin to several OpenAPI spec files into one"
id = "${groupId}.openapi-merger"
implementationClass = "org.eclipse.edc.plugins.openapimerger.OpenApiMergerPlugin"
tags.set(listOf("build", "openapi", "merge", "documentation"))
}
}
}

pluginBundle {
website = "https://projects.eclipse.org/proposals/eclipse-dataspace-connector"
vcsUrl = "https://github.com/eclipse-dataspaceconnector/GradlePlugins.git"
version = version
tags = listOf("build", "openapi", "merge", "documentation")
}
11 changes: 4 additions & 7 deletions plugins/test-summary/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ val assertj: String by project
val groupId: String by project

gradlePlugin {
website.set("https://projects.eclipse.org/proposals/eclipse-dataspace-connector")
vcsUrl.set("https://github.com/eclipse-dataspaceconnector/GradlePlugins.git")

// Define the plugin
plugins {
create("test-summary") {
Expand All @@ -16,13 +19,7 @@ gradlePlugin {
"Plugin to verify that a project has no duplicate submodules (by name)"
id = "${groupId}.test-summary"
implementationClass = "org.eclipse.edc.plugins.testsummary.TestSummaryPlugin"
tags.set(listOf("build", "verification", "test"))
}
}
}

pluginBundle {
website = "https://projects.eclipse.org/proposals/eclipse-dataspace-connector"
vcsUrl = "https://github.com/eclipse-dataspaceconnector/GradlePlugins.git"
version = version
tags = listOf("build", "verification", "test")
}