Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency gradle to v8.3 #602

Merged
merged 2 commits into from
Aug 31, 2023
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.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class PluginDefaultsFunctionalTest extends AbstractFunctionalTest {
"""

when:
debug = true
run 'printJavaVersion'

then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.tasks.compile.GroovyCompile
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.api.tasks.diagnostics.DependencyReportTask
import org.gradle.api.tasks.javadoc.Groovydoc
import org.gradle.api.tasks.testing.Test
import org.gradle.jvm.tasks.Jar
import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.gradle.api.tasks.javadoc.Groovydoc

import static io.micronaut.build.BomSupport.coreBomArtifactId
import static io.micronaut.build.utils.VersionHandling.versionProviderOrDefault

/**
* Micronaut internal Gradle plugin. Not intended to be used in user's projects.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ public class AggregatedJavadocParticipantPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
project.getPluginManager().withPlugin("java", unused -> {
JavaPluginExtension javaPluginExtension = project.getExtensions().getByType(JavaPluginExtension.class);
Configuration internalJavadocElements = createFilteredJavadocSourcesElements(project);
Configuration javadocElementClasspath = createJavadocElementClasspath(project);
TaskProvider<PrepareJavadocAggregationTask> prepareTask = project.getTasks().register("prepareJavadocAggregation", PrepareJavadocAggregationTask.class, task -> {
Javadoc javadoc = project.getTasks().named("javadoc", Javadoc.class).get();
JavaPluginExtension javaPluginExtension = project.getExtensions().getByType(JavaPluginExtension.class);
var javadoc = project.getTasks().named("javadoc", Javadoc.class);
SourceSet sourceSet = javaPluginExtension.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
task.getSources().from(sourceSet.getAllJava().getSourceDirectories());
task.getIncludes().set(javadoc.getIncludes());
task.getExcludes().set(javadoc.getExcludes());
task.getIncludes().set(javadoc.map(Javadoc::getIncludes));
task.getExcludes().set(javadoc.map(Javadoc::getExcludes));
task.getOutputDir().set(project.getLayout().getBuildDirectory().dir("aggregation/javadoc"));
});
internalJavadocElements.getOutgoing().artifact(prepareTask);
Expand All @@ -56,16 +56,17 @@ public void apply(Project project) {

private Configuration createJavadocElementClasspath(Project project) {
ConfigurationContainer configurations = project.getConfigurations();
var providers = project.getProviders();
return configurations.create("internalJavadocClasspathElements", conf -> {
conf.setCanBeResolved(false);
conf.setCanBeConsumed(true);
Configuration compileClasspath = configurations.getByName("compileClasspath");
AttributeContainer compileClasspathAttrs = compileClasspath.getAttributes();
conf.extendsFrom(compileClasspath);
conf.attributes(attrs -> compileClasspathAttrs.keySet().forEach(key -> {
Object attribute = compileClasspathAttrs.getAttribute(key);
//noinspection unchecked
attrs.attribute((Attribute<Object>)key, attribute);
Attribute<Object> o = (Attribute<Object>) key;
attrs.attributeProvider(o, providers.provider(() -> compileClasspathAttrs.getAttribute(o)));
attrs.attribute(Usage.USAGE_ATTRIBUTE, project.getObjects().named(Usage.class, JavadocAggregationUtils.AGGREGATED_JAVADOC_PARTICIPANT_DEPS));
}));
});
Expand Down