Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ dependencies {
implementation(projects.feature.terminal)
implementation(projects.feature.buildrun)
implementation(projects.feature.git)
implementation(projects.feature.git.api)
implementation(projects.feature.editor)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.activity.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.ahmadkharfan.androidstudiolite.domain.usecase.CloneProjectUseCase
import com.ahmadkharfan.androidstudiolite.domain.usecase.ProjectPathResolver
import com.ahmadkharfan.androidstudiolite.feature.clonerepo.CloneRepoViewModel
import com.ahmadkharfan.androidstudiolite.feature.editor.assets.AssetsViewModel
import com.ahmadkharfan.androidstudiolite.feature.editor.git.GitPanelApi
import com.ahmadkharfan.androidstudiolite.feature.git.api.GitPanelApi
import com.ahmadkharfan.androidstudiolite.feature.editor.git.GitPanelApiImpl
import com.ahmadkharfan.androidstudiolite.feature.editor.git.GitPanelViewModel
import com.ahmadkharfan.androidstudiolite.feature.editor.git.diff.GitDiffViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.ahmadkharfan.androidstudiolite.feature.settings.navigation.settingsGr
import com.ahmadkharfan.androidstudiolite.feature.terminal.navigation.terminalGraph
import com.ahmadkharfan.androidstudiolite.feature.editor.EditorNavigation
import com.ahmadkharfan.androidstudiolite.feature.editor.EditorRoute
import com.ahmadkharfan.androidstudiolite.feature.terminal.EditorEmbeddedTerminal
import com.ahmadkharfan.androidstudiolite.feature.editor.git.conflict.GitConflictRoute
import com.ahmadkharfan.androidstudiolite.feature.editor.git.diff.GitDiffRoute
import com.ahmadkharfan.androidstudiolite.feature.editor.git.history.GitBlameRoute
Expand Down Expand Up @@ -106,6 +107,11 @@ private fun NavGraphBuilder.editorDestination(navController: NavHostController)
),
openConflictPath = conflictPath,
onConflictPathOpened = { backStackEntry.savedStateHandle["git_conflict_path"] = null },
// :app owns which terminal fills the editor's bottom panel, so :feature:editor does
// not depend on :feature:terminal.
terminalContent = { projectRootPath, modifier ->
EditorEmbeddedTerminal(projectRootPath = projectRootPath, modifier = modifier)
},
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,5 @@ private fun violationFor(edge: ModuleEdge): BoundaryViolation? = when {
/** Edges that are allowed for now and expected to be removed. Nothing may be added to this list. */
val MODULE_BOUNDARY_BASELINE: Set<String> = setOf(
":feature:editor -> :feature:buildrun",
":feature:editor -> :feature:git",
":feature:editor -> :feature:terminal",
":feature:projects -> :feature:git",
":feature:settings -> :feature:git",
)
3 changes: 1 addition & 2 deletions feature/editor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ dependencies {
implementation(projects.core.common)
implementation(projects.designsystem)
implementation(projects.feature.buildrun)
implementation(projects.feature.git)
implementation(projects.feature.terminal)
implementation(projects.feature.git.api)
implementation(libs.koin.android)
implementation(libs.koin.androidx.compose)
implementation(libs.androidx.compose.material3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ private data class EditorScreenCallbacks(
val interactionListener: EditorInteractionListener,
val session: EditorSessionCallbacks,
val gitNavigation: GitNavigationCallbacks,
val terminalContent: @Composable (projectRootPath: String, modifier: Modifier) -> Unit,
)

private data class EditorContentLayout(
Expand All @@ -91,6 +92,7 @@ fun EditorRoute(
navigation: EditorNavigation,
openConflictPath: String? = null,
onConflictPathOpened: () -> Unit = {},
terminalContent: @Composable (projectRootPath: String, modifier: Modifier) -> Unit = { _, _ -> },
viewModel: EditorViewModel = koinViewModel { parametersOf(projectId) },
) {
val uiState by viewModel.state.collectAsStateWithLifecycle()
Expand Down Expand Up @@ -129,6 +131,7 @@ fun EditorRoute(
EditorScreen(
uiState = uiState,
callbacks = EditorScreenCallbacks(
terminalContent = terminalContent,
interactionListener = viewModel,
session = EditorSessionCallbacks(
sessionFor = viewModel::sessionFor,
Expand Down Expand Up @@ -382,7 +385,11 @@ private fun EditorContentArea(
)

if (!layout.keyboardOpen || terminalPanelActive) {
EditorBottomToolSection(uiState = uiState, interactionListener = callbacks.interactionListener)
EditorBottomToolSection(
uiState = uiState,
interactionListener = callbacks.interactionListener,
terminalContent = callbacks.terminalContent,
)
}
if (!layout.keyboardOpen) {
EditorFullStatusBar(uiState = uiState, onOpenBranches = callbacks.gitNavigation.openBranches)
Expand Down Expand Up @@ -493,6 +500,7 @@ private fun EditorCodeSurface(
private fun EditorBottomToolSection(
uiState: EditorUiState,
interactionListener: EditorInteractionListener,
terminalContent: @Composable (projectRootPath: String, modifier: Modifier) -> Unit,
) {
AslBottomToolPanel(
tabs = uiState.bottomPanelTabs.map { AslBottomPanelTab(it.id, it.label, it.icon, it.count, it.error) },
Expand All @@ -507,6 +515,7 @@ private fun EditorBottomToolSection(
buildConsole = uiState.buildConsole,
projectRootPath = uiState.projectRootPath,
onJumpToBuildProblem = { interactionListener.onJumpToBuildProblem(it) },
terminalContent = terminalContent,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import com.ahmadkharfan.androidstudiolite.feature.buildrun.BuildStatus
import com.ahmadkharfan.androidstudiolite.feature.buildrun.BuildTaskGroup
import com.ahmadkharfan.androidstudiolite.feature.editor.R
import com.ahmadkharfan.androidstudiolite.feature.editor.toClipboardText
import com.ahmadkharfan.androidstudiolite.feature.terminal.EditorEmbeddedTerminal

@Composable
fun EditorBottomPanelContent(
Expand All @@ -50,10 +49,13 @@ fun EditorBottomPanelContent(
modifier: Modifier = Modifier,
projectRootPath: String = "",
onJumpToBuildProblem: (BuildProblem) -> Unit = {},
// The terminal is supplied by the host rather than imported: the editor describes where a
// terminal goes, and :app decides which implementation fills it.
terminalContent: @Composable (projectRootPath: String, modifier: Modifier) -> Unit = { _, _ -> },
) {
when (activeTabId) {
"build" -> BuildTab(buildConsole, onJumpToBuildProblem, modifier)
"term" -> EditorEmbeddedTerminal(projectRootPath = projectRootPath, modifier = modifier)
"term" -> terminalContent(projectRootPath, modifier)
else -> AslEmptyState(
icon = "terminal",
title = stringResource(R.string.editor_bottom_empty),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import com.ahmadkharfan.androidstudiolite.domain.model.GitFileStatus
import com.ahmadkharfan.androidstudiolite.domain.model.GitDiffTarget
import com.ahmadkharfan.androidstudiolite.feature.editor.aichat.AiChatRoute
import com.ahmadkharfan.androidstudiolite.feature.editor.assets.AssetsRoute
import com.ahmadkharfan.androidstudiolite.feature.editor.git.GitPanelApi
import com.ahmadkharfan.androidstudiolite.feature.git.api.GitPanelApi
import com.ahmadkharfan.androidstudiolite.feature.editor.EditorFileCreateKind
import com.ahmadkharfan.androidstudiolite.feature.editor.EditorFileNodeUiModel
import com.ahmadkharfan.androidstudiolite.feature.editor.EditorFileTreeAction
Expand Down
11 changes: 11 additions & 0 deletions feature/git/api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins { id("asl.android.library.compose") }

android { namespace = "com.ahmadkharfan.androidstudiolite.feature.git.api" }

dependencies {
// A contract module: it may expose domain types in its signatures, so :domain is `api`, not
// `implementation`. Nothing else is allowed in here.
api(projects.domain)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.ui)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
o/bundleLibRuntimeToDirDebug
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ahmadkharfan.androidstudiolite.feature.git.api" >

<uses-sdk android:minSdkVersion="24" />

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 3,
"artifactType": {
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
"kind": "Directory"
},
"applicationId": "com.ahmadkharfan.androidstudiolite.feature.git.api",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"outputFile": "AndroidManifest.xml"
}
],
"elementType": "File"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
aarFormatVersion=1.0
aarMetadataVersion=1.0
minCompileSdk=37
minCompileMinorSdk=0
minCompileSdkExtension=0
minAndroidGradlePluginVersion=1.0.0
coreLibraryDesugaringEnabled=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
com.ahmadkharfan.androidstudiolite.feature.git.api-pngs-0 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/generated/res/pngs/debug
com.ahmadkharfan.androidstudiolite.feature.git.api-updated_navigation_xml-1 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/generated/updated_navigation_xml/debug
com.ahmadkharfan.androidstudiolite.feature.git.api-mergeDebugResources-2 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/incremental/debug/mergeDebugResources/merged.dir
com.ahmadkharfan.androidstudiolite.feature.git.api-mergeDebugResources-3 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/incremental/debug/mergeDebugResources/stripped.dir
com.ahmadkharfan.androidstudiolite.feature.git.api-debug-4 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/merged_res/debug/mergeDebugResources
com.ahmadkharfan.androidstudiolite.feature.git.api-debug-5 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/packaged_res/debug/packageDebugResources
com.ahmadkharfan.androidstudiolite.feature.git.api-debug-6 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/debug/res
com.ahmadkharfan.androidstudiolite.feature.git.api-main-7 /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/main/res
gradleHome-0 /home/null/.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Thu Jul 30 02:27:19 EET 2026
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!&lt;dir>navigation"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!&lt;dir>navigation"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"/><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!&lt;dir>navigation"/><mergedItems/></merger>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/debug/assets"/></dataSet></merger>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/src/debug/jniLibs"/></dataSet></merger>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
R_DEF: Internal format may change without notice
local
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="com.ahmadkharfan.androidstudiolite.feature.git.api" >
4
5 <uses-sdk android:minSdkVersion="24" />
5-->INJECTED
5-->INJECTED
6
7</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ahmadkharfan.androidstudiolite.feature.git.api" >

<uses-sdk android:minSdkVersion="24" />

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 Warning/Error
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.ahmadkharfan.androidstudiolite.feature.git.api
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2
0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- Merging decision tree log ---
manifest
ADDED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml:2:13-83
INJECTED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml:2:13-83
package
INJECTED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml
xmlns:android
ADDED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml:2:23-81
uses-sdk
INJECTED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml reason: use-sdk injection requested
INJECTED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml
INJECTED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml
android:targetSdkVersion
INJECTED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml
android:minSdkVersion
INJECTED from /home/null/AndroidStudioProjects/AndroidStudioLite/feature/git/api/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13702301956481422718.xml
Loading
Loading