Skip to content

Commit

Permalink
afk rebase'
Browse files Browse the repository at this point in the history
  • Loading branch information
patriot1burke committed Apr 4, 2023
1 parent 84f6e4b commit 36f9fb7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
import io.quarkus.gradle.tasks.QuarkusListPlatforms;
import io.quarkus.gradle.tasks.QuarkusRemoteDev;
import io.quarkus.gradle.tasks.QuarkusRemoveExtension;
import io.quarkus.gradle.tasks.QuarkusShowEffectiveConfig;
import io.quarkus.gradle.tasks.QuarkusRun;
import io.quarkus.gradle.tasks.QuarkusShowEffectiveConfig;
import io.quarkus.gradle.tasks.QuarkusTest;
import io.quarkus.gradle.tasks.QuarkusTestConfig;
import io.quarkus.gradle.tasks.QuarkusUpdate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
import io.quarkus.deployment.cmd.RunCommandHandler;
import io.quarkus.gradle.extension.QuarkusPluginExtension;
import io.quarkus.maven.dependency.GACTV;
import io.quarkus.maven.dependency.ResolvedDependency;

public class QuarkusRun extends QuarkusTask {
public abstract class QuarkusRun extends QuarkusTask {
private final Property<File> workingDirectory;
private final SourceSet mainSourceSet;

Expand Down Expand Up @@ -113,6 +114,28 @@ public Map<String, String> getQuarkusBuildEnvProperties() {
return quarkusEnvProperties;
}

protected Properties getBuildSystemProperties(ResolvedDependency appArtifact) {
final Map<String, ?> properties = getProject().getProperties();
final Properties realProperties = new Properties();
for (Map.Entry<String, ?> entry : properties.entrySet()) {
final String key = entry.getKey();
final Object value = entry.getValue();
if (key != null && value instanceof String && key.startsWith("quarkus.")) {
realProperties.setProperty(key, (String) value);
}
}
Map<String, String> quarkusBuildProperties = extension().getQuarkusBuildProperties().get();
if (!quarkusBuildProperties.isEmpty()) {
quarkusBuildProperties.entrySet().stream().filter(entry -> entry.getKey().startsWith("quarkus."))
.forEach(entry -> {
realProperties.put(entry.getKey(), entry.getValue());
});
}
realProperties.putIfAbsent("quarkus.application.name", appArtifact.getArtifactId());
realProperties.putIfAbsent("quarkus.application.version", appArtifact.getVersion());
return realProperties;
}

@TaskAction
public void runQuarkus() {
final ApplicationModel appModel;
Expand Down

0 comments on commit 36f9fb7

Please sign in to comment.