Update build scripts to integrate frontend with backend.
This commit is contained in:
+10
-39
@@ -2,7 +2,6 @@ plugins {
|
||||
java
|
||||
id("org.springframework.boot") version "3.4.4"
|
||||
id("io.spring.dependency-management") version "1.1.7"
|
||||
// id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
}
|
||||
|
||||
group = "com.alttd.altitudeweb"
|
||||
@@ -27,6 +26,7 @@ repositories {
|
||||
dependencies {
|
||||
implementation(project(":open_api"))
|
||||
implementation(project(":database"))
|
||||
implementation(project(":frontend"))
|
||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
||||
annotationProcessor("org.projectlombok:lombok")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
@@ -54,42 +54,13 @@ tasks.bootJar {
|
||||
archiveClassifier.set("")
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
dependsOn("includeFrontend")
|
||||
}
|
||||
|
||||
//tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
|
||||
// mergeServiceFiles()
|
||||
// dependencies {
|
||||
// include(dependency("com.mysql:mysql-connector-j"))
|
||||
// }
|
||||
//}
|
||||
|
||||
//tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
|
||||
// manifest {
|
||||
// attributes["Main-Class"] = "com.alttd.altitudeweb.AltitudeWebApplication"
|
||||
// }
|
||||
// archiveBaseName.set("altitudeweb")
|
||||
// archiveClassifier.set("")
|
||||
// mergeServiceFiles()
|
||||
//
|
||||
// // Include everything
|
||||
// from(sourceSets.main.get().output)
|
||||
//
|
||||
// // Include all project dependencies
|
||||
// configurations = listOf(project.configurations.runtimeClasspath.get())
|
||||
//
|
||||
// // Ensure MySQL is included (even though it should be part of runtimeClasspath already)
|
||||
// dependencies {
|
||||
// include(dependency("com.mysql:mysql-connector-j"))
|
||||
// }
|
||||
//
|
||||
// // Enable zip64 mode for large JARs
|
||||
// isZip64 = true
|
||||
//}
|
||||
//
|
||||
//// Make the shadowJar task the default jar task
|
||||
//tasks.named("jar") {
|
||||
// enabled = false
|
||||
//}
|
||||
//
|
||||
//tasks.named("assemble") {
|
||||
// dependsOn("shadowJar")
|
||||
//}
|
||||
tasks.register<Copy>("includeFrontend") {
|
||||
description = "Copy the built frontend to the Spring Boot static resources directory"
|
||||
from("${project.rootDir}/frontend/dist")
|
||||
into(layout.buildDirectory.dir("resources/main/static"))
|
||||
doNotTrackState("Cannot reliably track state in the static directory")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user