Start project-owned language and authenticated MCP services when opening a project, reusing the embedded LSP backend without a desktop TCP listener. Keep editor overlays separate from saved-file MCP queries. Reserve conflicting editing before ACP prompt delivery and retain protection through native/tool termination, runtime cleanup and document refresh. Preserve drafts on rejected admission, provide cleanup/preparation recovery, distinguish terminal outcomes and redact permission previews. Add lifecycle, language parity, activity, composition and UI regressions and update the canonical Studio contracts. Keep distribution update alignment as the separate WRK-002A follow-up. Validation: complete make -C tooling verify PASSED in 20261127T035822Z-ec5d9266 (1172 unit, 131 compiler fixture, 31 headless tests). Opt-in real-model and native AI-view qualification are outside that gate. Work: WRK-0029; decision: DEC-0001.
78 lines
2.6 KiB
Kotlin
78 lines
2.6 KiB
Kotlin
import java.time.Duration
|
|
|
|
plugins {
|
|
id("gradle.java-application-conventions")
|
|
alias(libs.plugins.javafx)
|
|
}
|
|
|
|
javafx {
|
|
version = libs.versions.javafx.get()
|
|
modules("javafx.controls", "javafx.swing")
|
|
}
|
|
|
|
application {
|
|
mainClass = "p.studio.ui.javafx2.StudioLauncher"
|
|
}
|
|
|
|
// Gradle's unqualified task selector also finds this application's `run` after
|
|
// the product's run. Keep the foundation demo opt-in when invoked at the root.
|
|
tasks.named<JavaExec>("run") {
|
|
onlyIf("the foundation demo was explicitly selected") {
|
|
gradle.startParameter.currentDir.toPath().normalize().startsWith(projectDir.toPath().normalize()) ||
|
|
gradle.startParameter.taskNames.any { it.removePrefix(":") == "prometeu-studio-ui-javafx-2:run" }
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":prometeu-studio-api"))
|
|
implementation(libs.richtextfx)
|
|
implementation(libs.commonmark)
|
|
}
|
|
|
|
distributions {
|
|
main {
|
|
contents {
|
|
from("src/main/resources/p/studio/ui/javafx2/fonts") {
|
|
include("*-LICENSE.txt")
|
|
into("licenses")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register<JavaExec>("gallery") {
|
|
group = "application"
|
|
description = "Opens the independent Studio component gallery, without a project or backend."
|
|
classpath = sourceSets["main"].runtimeClasspath
|
|
mainClass = application.mainClass
|
|
args("--gallery")
|
|
}
|
|
|
|
tasks.named<Test>("test") { exclude("**/FoundationDesktopTest.class") }
|
|
tasks.register<Test>("desktopTest") {
|
|
group = "verification"
|
|
description = "Qualifies actual JavaFX windows and captures the foundation (requires a macOS desktop)."
|
|
testClassesDirs = sourceSets["test"].output.classesDirs
|
|
classpath = sourceSets["test"].runtimeClasspath
|
|
useJUnitPlatform()
|
|
include("**/FoundationDesktopTest.class")
|
|
systemProperty("java.awt.headless", "false")
|
|
systemProperty("studio.ui2.captureDir", layout.buildDirectory.dir("desktop-captures").get().asFile.absolutePath)
|
|
outputs.upToDateWhen { false }
|
|
testLogging.showStandardStreams = true
|
|
}
|
|
|
|
|
|
tasks.register<Test>("aiWorkspaceDesktopTest") {
|
|
group = "verification"
|
|
description = "Checks the actual AI project view and recovery labels with a controlled agent (requires a desktop)."
|
|
testClassesDirs = sourceSets["test"].output.classesDirs
|
|
classpath = sourceSets["test"].runtimeClasspath
|
|
useJUnitPlatform()
|
|
include("**/AiWorkspaceDesktopTest.class")
|
|
systemProperty("java.awt.headless", "false")
|
|
systemProperty("javafx.cachedir", layout.buildDirectory.dir("javafx-test-cache").get().asFile.absolutePath)
|
|
timeout.set(Duration.ofSeconds(60))
|
|
outputs.upToDateWhen { false }
|
|
}
|