Skip to content

Commit

Permalink
refactor(web): Merge Quarkus extension into single module
Browse files Browse the repository at this point in the history
This commit merges the existing Quarkus extensions into a single module
to prevent build complexity.
  • Loading branch information
fabianishere committed Oct 29, 2023
1 parent f48e7e1 commit 6858fc9
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ plugins {
dependencies {
implementation(platform(libs.quarkus.bom))

implementation(projects.opendcWeb.opendcWebUiQuarkus)
implementation(projects.opendcWeb.opendcWebQuarkus)
implementation(projects.opendcTrace.opendcTraceApi)

implementation(libs.quarkus.core.deployment)
implementation(libs.quarkus.vertx.http.deployment)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.runner.deployment;
package org.opendc.web.quarkus.deployment.runner;

import io.quarkus.builder.item.SimpleBuildItem;
import io.quarkus.runtime.RuntimeValue;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.runner.deployment;
package org.opendc.web.quarkus.deployment.runner;

import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigRoot;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.runner.deployment;
package org.opendc.web.quarkus.deployment.runner;

import static io.quarkus.deployment.annotations.ExecutionTime.RUNTIME_INIT;

Expand All @@ -36,10 +36,10 @@
import java.util.Set;
import java.util.function.BooleanSupplier;
import org.opendc.trace.spi.TraceFormat;
import org.opendc.web.quarkus.runtime.runner.OpenDCRunnerRecorder;
import org.opendc.web.quarkus.runtime.runner.OpenDCRunnerRuntimeConfig;
import org.opendc.web.runner.JobManager;
import org.opendc.web.runner.OpenDCRunner;
import org.opendc.web.runner.runtime.OpenDCRunnerRecorder;
import org.opendc.web.runner.runtime.OpenDCRunnerRuntimeConfig;

/**
* Build processor for the OpenDC web runner Quarkus extension.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.ui.deployment;
package org.opendc.web.quarkus.deployment.ui;

import io.quarkus.builder.item.SimpleBuildItem;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
* SOFTWARE.
*/

package org.opendc.web.ui.deployment;
package org.opendc.web.quarkus.deployment.ui;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.vertx.http.deployment.HttpRootPathBuildItem;
import io.quarkus.vertx.http.deployment.RouteBuildItem;
import org.opendc.web.ui.runtime.OpenDCUiConfig;
import org.opendc.web.ui.runtime.OpenDCUiRecorder;
import org.opendc.web.quarkus.runtime.ui.OpenDCUiConfig;
import org.opendc.web.quarkus.runtime.ui.OpenDCUiRecorder;

/**
* Quarkus build processor for the OpenDC web UI.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.ui.deployment;
package org.opendc.web.quarkus.deployment.ui;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -41,7 +41,7 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.regex.Pattern;
import org.opendc.web.ui.runtime.QuinoaNextRoutingRecorder;
import org.opendc.web.quarkus.runtime.ui.QuinoaNextRoutingRecorder;

/**
* Quarkus build processor for enabling dynamic routes and redirects in Quinoa for Next.js applications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ plugins {
}

quarkusExtension {
deploymentModule.set("opendc-web-ui-quarkus-deployment")
deploymentModule.set("opendc-web-quarkus-deployment")
}

dependencies {
implementation(platform(libs.quarkus.bom))

api(projects.opendcWeb.opendcWebRunner)

implementation(libs.quarkus.core.runtime)
implementation(libs.quarkus.vertx.http.runtime)
implementation(libs.quarkus.arc.runtime)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.runner.runtime;
package org.opendc.web.quarkus.runtime.runner;

import io.quarkus.runtime.RuntimeValue;
import io.quarkus.runtime.ShutdownContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.runner.runtime;
package org.opendc.web.quarkus.runtime.runner;

import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.ui.runtime;
package org.opendc.web.quarkus.runtime.ui;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.ui.runtime;
package org.opendc.web.quarkus.runtime.ui;

import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.ui.runtime;
package org.opendc.web.quarkus.runtime.ui;

import static io.vertx.ext.web.handler.StaticHandler.DEFAULT_MAX_AGE_SECONDS;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 AtLarge Research
* Copyright (c) 2023 AtLarge Research
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +20,7 @@
* SOFTWARE.
*/

package org.opendc.web.ui.runtime;
package org.opendc.web.quarkus.runtime.ui;

import io.quarkus.runtime.annotations.Recorder;
import io.vertx.core.Handler;
Expand Down
37 changes: 0 additions & 37 deletions opendc-web/opendc-web-runner-quarkus-deployment/build.gradle.kts

This file was deleted.

47 changes: 0 additions & 47 deletions opendc-web/opendc-web-runner-quarkus/build.gradle.kts

This file was deleted.

This file was deleted.

6 changes: 2 additions & 4 deletions opendc-web/opendc-web-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ dependencies {
implementation(enforcedPlatform(libs.quarkus.bom))

implementation(projects.opendcWeb.opendcWebProto)
compileOnly(projects.opendcWeb.opendcWebUiQuarkusDeployment) // Temporary fix for Quarkus/Gradle issues
compileOnly(projects.opendcWeb.opendcWebRunnerQuarkusDeployment)
implementation(projects.opendcWeb.opendcWebUiQuarkus)
implementation(projects.opendcWeb.opendcWebRunnerQuarkus)
compileOnly(projects.opendcWeb.opendcWebQuarkusDeployment)
implementation(projects.opendcWeb.opendcWebQuarkus)

implementation(libs.quarkus.kotlin)
implementation(libs.quarkus.resteasy.core)
Expand Down
8 changes: 3 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ include(":opendc-experiments:opendc-experiments-faas")
include(":opendc-experiments:opendc-experiments-capelin")
include(":opendc-experiments:opendc-experiments-tf20")
include(":opendc-web:opendc-web-proto")
include(":opendc-web:opendc-web-server")
include(":opendc-web:opendc-web-client")
include(":opendc-web:opendc-web-ui-quarkus")
include(":opendc-web:opendc-web-ui-quarkus-deployment")
include(":opendc-web:opendc-web-server")
include(":opendc-web:opendc-web-runner")
include(":opendc-web:opendc-web-runner-quarkus")
include(":opendc-web:opendc-web-runner-quarkus-deployment")
include(":opendc-web:opendc-web-quarkus")
include(":opendc-web:opendc-web-quarkus-deployment")
include(":opendc-simulator:opendc-simulator-core")
include(":opendc-simulator:opendc-simulator-flow")
include(":opendc-simulator:opendc-simulator-power")
Expand Down

0 comments on commit 6858fc9

Please sign in to comment.