use of io.quarkus.gradle.dependency.ApplicationDeploymentClasspathBuilder in project quarkus by quarkusio.
the class GradleApplicationModelBuilder method buildAll.
@Override
public Object buildAll(String modelName, ModelParameter parameter, Project project) {
final LaunchMode mode = LaunchMode.valueOf(parameter.getMode());
final List<org.gradle.api.artifacts.Dependency> enforcedPlatforms = ToolingUtils.getEnforcedPlatforms(project);
final PlatformImports platformImports = resolvePlatformImports(project, enforcedPlatforms);
final ResolvedDependency appArtifact = getProjectArtifact(project, mode);
final ApplicationModelBuilder modelBuilder = new ApplicationModelBuilder().setAppArtifact(appArtifact).addReloadableWorkspaceModule(appArtifact.getKey()).setPlatformImports(platformImports);
final ApplicationDeploymentClasspathBuilder classpathBuilder = new ApplicationDeploymentClasspathBuilder(project, mode, enforcedPlatforms);
final Configuration classpathConfig = classpathBuilder.getRuntimeConfiguration();
final Configuration deploymentConfig = classpathBuilder.getDeploymentConfiguration();
final Map<ArtifactKey, ResolvedDependencyBuilder> appDependencies = new LinkedHashMap<>();
collectDependencies(classpathConfig.getResolvedConfiguration(), mode, project, appDependencies, modelBuilder, appArtifact.getWorkspaceModule().mutable());
collectExtensionDependencies(project, deploymentConfig, appDependencies);
for (ResolvedDependencyBuilder d : appDependencies.values()) {
modelBuilder.addDependency(d.build());
}
return modelBuilder.build();
}
Aggregations