Skip to content

Commit

Permalink
Fix integration with control panel (#1035)
Browse files Browse the repository at this point in the history
This commit ugprades to the latest test resources in order to fix
the control panel support.
  • Loading branch information
melix authored Sep 17, 2024
1 parent 220eeb7 commit 7b4c61f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tomlj = "1.1.1"

micronaut-platform = "4.6.0" # This is the platform version, used in our tests
micronaut-aot = "2.4.0"
micronaut-testresources = "2.5.4"
micronaut-testresources = "2.6.1"
micronaut-openapi = "6.12.2"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.micronaut.gradle.testresources.internal.TestResourcesAOT;
import io.micronaut.gradle.testresources.internal.TestResourcesGraalVM;
import io.micronaut.testresources.buildtools.MavenDependency;
import io.micronaut.testresources.buildtools.ModuleIdentifier;
import io.micronaut.testresources.buildtools.ServerUtils;
import io.micronaut.testresources.buildtools.TestResourcesClasspath;
import io.micronaut.testresources.buildtools.VersionInfo;
Expand All @@ -21,6 +22,7 @@
import org.gradle.api.artifacts.ConfigurationContainer;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.artifacts.ModuleDependency;
import org.gradle.api.artifacts.component.ModuleComponentIdentifier;
import org.gradle.api.artifacts.dsl.DependencyHandler;
import org.gradle.api.attributes.Usage;
import org.gradle.api.file.Directory;
Expand Down Expand Up @@ -246,7 +248,17 @@ private TaskProvider<StartTestResourcesService> createStartServiceTask(Configura
task.getExplicitPort().convention(config.getExplicitPort());
task.getClientTimeout().convention(config.getClientTimeout());
task.getServerIdleTimeoutMinutes().convention(config.getServerIdleTimeoutMinutes());
task.getClasspath().from(server);
task.getClasspath().from(server.getIncoming().artifactView(view -> {
view.componentFilter(id -> {
if (id instanceof ModuleComponentIdentifier mci) {
return TestResourcesClasspath.isDependencyAllowedOnServerClasspath(new ModuleIdentifier(
mci.getGroup(),
mci.getModule()
));
}
return true;
});
}).getFiles());
task.getForeground().convention(false);
task.getStopFile().set(stopFile.toFile());
task.getStandalone().set(isStandalone);
Expand Down

0 comments on commit 7b4c61f

Please sign in to comment.