дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
feat(gradle): link and unlink independent Gradle builds (#1413)
Opening a folder of independent Gradle builds selected only the first build. Link Gradle Projects… (pick a build's settings or build file) and Unlink on a build's root let an ordinary project window manage several independent builds without changing their scripts. The build model holds a list of Gradle builds; each keeps its own wrapper, working directory, environment, task routing and sync cache, keyed by the owning build directory. The links persist in the project's Gradle settings (linkedProjects); unlinking leaves files and saved run configurations alone. Existing includeBuild support is unchanged, and an explicitly linked build takes precedence over a composite that also includes it. Workspace windows keep Link/Unlink disabled. Co-authored-by: gudcks0305 <[email protected]>
Цей коміт міститься в:
1 джерело
682fee633d
коміт
0dfdbbc323
43 files changed
+1846
-254
No files matched your search
@@ -17,11 +17,32 @@ pub async fn build_model(window: Window, state: State<'_, AppState>) -> IdeResul
|
||||
ide_host::ops::build::build_model(&state.host, window.label()).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
#[specta::specta]
|
||||
pub async fn gradle_link_projects(
|
||||
window: Window,
|
||||
state: State<'_, AppState>,
|
||||
paths: Vec<String>,
|
||||
) -> IdeResult<BuildModel> {
|
||||
ide_host::ops::build::gradle_link_projects(&state.host, window.label(), paths).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
#[specta::specta]
|
||||
pub async fn gradle_unlink_projects(
|
||||
window: Window,
|
||||
state: State<'_, AppState>,
|
||||
paths: Vec<String>,
|
||||
) -> IdeResult<BuildModel> {
|
||||
ide_host::ops::build::gradle_unlink_projects(&state.host, window.label(), paths).await
|
||||
}
|
||||
|
||||
/// Runs Maven (`help:effective-pom dependency:tree`) or Gradle (`tasks --all`) in the
|
||||
/// background, reporting progress on `on_progress`; cancellable with `cancel_request(request)`.
|
||||
/// Returns the refreshed model; a failed build is reported in its `syncError`.
|
||||
#[tauri::command]
|
||||
#[specta::specta]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub async fn build_sync(
|
||||
window: Window,
|
||||
state: State<'_, AppState>,
|
||||
@@ -29,6 +50,7 @@ pub async fn build_sync(
|
||||
request: RequestId,
|
||||
offline: bool,
|
||||
profiles: Vec<String>,
|
||||
build_dir: Option<String>,
|
||||
on_progress: Channel<SyncProgress>,
|
||||
) -> IdeResult<BuildModel> {
|
||||
ide_host::ops::build::build_sync(
|
||||
@@ -38,6 +60,7 @@ pub async fn build_sync(
|
||||
request,
|
||||
offline,
|
||||
profiles,
|
||||
build_dir,
|
||||
crate::commands::sender(on_progress),
|
||||
)
|
||||
.await
|
||||
@@ -53,9 +76,18 @@ pub async fn gradle_dependencies(
|
||||
configuration: String,
|
||||
offline: bool,
|
||||
request: RequestId,
|
||||
build_dir: Option<String>,
|
||||
) -> IdeResult<Vec<ide_build::GradleDependency>> {
|
||||
ide_host::ops::build::gradle_dependencies(&state.host, window.label(), gradle_path, configuration, offline, request)
|
||||
.await
|
||||
ide_host::ops::build::gradle_dependencies(
|
||||
&state.host,
|
||||
window.label(),
|
||||
gradle_path,
|
||||
configuration,
|
||||
offline,
|
||||
request,
|
||||
build_dir,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
/// The `.toml` of a version catalog the build imports as `group:artifact:version`, once a
|
||||
|
||||
@@ -354,6 +354,8 @@ pub fn builder() -> tauri_specta::Builder<tauri::Wry> {
|
||||
run::run_tomcat_update,
|
||||
run::run_test_reports,
|
||||
build::build_model,
|
||||
build::gradle_link_projects,
|
||||
build::gradle_unlink_projects,
|
||||
build::build_sync,
|
||||
build::gradle_dependencies,
|
||||
build::gradle_published_catalog,
|
||||
|
||||
Reference in new issue
Заблокувати користувача