From 3ad0d125034fe8a1c391a82841fcfd09d9471546 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Fri, 24 Sep 2021 14:32:22 +0200 Subject: [PATCH] Reestructured project --- build.gradle.kts | 2 +- .../{aeab13/github/com => }/GPreferences.kt | 2 -- .../{aeab13/github/com/git => }/GitManager.kt | 14 ++++---------- .../github/com => }/RepositorySelected.kt | 16 ++++++---------- .../{aeab13/github/com => }/UncommitedChanges.kt | 8 +++----- .../com => }/extensions/DiffEntryExtensions.kt | 2 +- .../{aeab13/github/com => }/git/LogManager.kt | 2 +- .../{aeab13/github/com => }/git/StatusManager.kt | 4 ++-- src/main/kotlin/{aeab13/github/com => }/main.kt | 9 +-------- .../{aeab13/github/com => }/theme/Color.kt | 2 +- .../{aeab13/github/com => }/theme/Theme.kt | 3 +-- 11 files changed, 21 insertions(+), 43 deletions(-) rename src/main/kotlin/{aeab13/github/com => }/GPreferences.kt (94%) rename src/main/kotlin/{aeab13/github/com/git => }/GitManager.kt (92%) rename src/main/kotlin/{aeab13/github/com => }/RepositorySelected.kt (96%) rename src/main/kotlin/{aeab13/github/com => }/UncommitedChanges.kt (96%) rename src/main/kotlin/{aeab13/github/com => }/extensions/DiffEntryExtensions.kt (96%) rename src/main/kotlin/{aeab13/github/com => }/git/LogManager.kt (96%) rename src/main/kotlin/{aeab13/github/com => }/git/StatusManager.kt (95%) rename src/main/kotlin/{aeab13/github/com => }/main.kt (89%) rename src/main/kotlin/{aeab13/github/com => }/theme/Color.kt (93%) rename src/main/kotlin/{aeab13/github/com => }/theme/Theme.kt (93%) diff --git a/build.gradle.kts b/build.gradle.kts index 0f6ff17..2aafb61 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,7 +35,7 @@ compose.desktop { nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "Gitnuro" - packageVersion = "1.0.0-preview01" + packageVersion = "1.0.0" } } } \ No newline at end of file diff --git a/src/main/kotlin/aeab13/github/com/GPreferences.kt b/src/main/kotlin/GPreferences.kt similarity index 94% rename from src/main/kotlin/aeab13/github/com/GPreferences.kt rename to src/main/kotlin/GPreferences.kt index 8dfdb05..c452c34 100644 --- a/src/main/kotlin/aeab13/github/com/GPreferences.kt +++ b/src/main/kotlin/GPreferences.kt @@ -1,5 +1,3 @@ -package aeab13.github.com - import java.util.prefs.Preferences private const val PREFERENCES_NAME = "GitnuroConfig" diff --git a/src/main/kotlin/aeab13/github/com/git/GitManager.kt b/src/main/kotlin/GitManager.kt similarity index 92% rename from src/main/kotlin/aeab13/github/com/git/GitManager.kt rename to src/main/kotlin/GitManager.kt index a5f75ef..f0e1681 100644 --- a/src/main/kotlin/aeab13/github/com/git/GitManager.kt +++ b/src/main/kotlin/GitManager.kt @@ -1,9 +1,7 @@ -package aeab13.github.com - -import aeab13.github.com.git.LogManager -import aeab13.github.com.git.LogStatus -import aeab13.github.com.git.StageStatus -import aeab13.github.com.git.StatusManager +import git.LogManager +import git.LogStatus +import git.StageStatus +import git.StatusManager import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob @@ -14,13 +12,9 @@ import org.eclipse.jgit.api.Git import org.eclipse.jgit.diff.DiffEntry import org.eclipse.jgit.diff.DiffFormatter import org.eclipse.jgit.dircache.DirCacheIterator -import org.eclipse.jgit.lib.Constants.HEAD -import org.eclipse.jgit.lib.ObjectId import org.eclipse.jgit.lib.Repository import org.eclipse.jgit.storage.file.FileRepositoryBuilder -import org.eclipse.jgit.treewalk.CanonicalTreeParser import org.eclipse.jgit.treewalk.FileTreeIterator -import org.eclipse.jgit.treewalk.filter.TreeFilter import java.io.ByteArrayOutputStream import java.io.File diff --git a/src/main/kotlin/aeab13/github/com/RepositorySelected.kt b/src/main/kotlin/RepositorySelected.kt similarity index 96% rename from src/main/kotlin/aeab13/github/com/RepositorySelected.kt rename to src/main/kotlin/RepositorySelected.kt index da16028..d227e5f 100644 --- a/src/main/kotlin/aeab13/github/com/RepositorySelected.kt +++ b/src/main/kotlin/RepositorySelected.kt @@ -1,11 +1,3 @@ -package aeab13.github.com - -import aeab13.github.com.extensions.filePath -import aeab13.github.com.extensions.icon -import aeab13.github.com.git.LogStatus -import aeab13.github.com.theme.backgroundColor -import aeab13.github.com.theme.primaryTextColor -import aeab13.github.com.theme.secondaryTextColor import androidx.compose.animation.Crossfade import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -23,16 +15,20 @@ import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp +import extensions.filePath +import extensions.icon +import git.LogStatus import org.eclipse.jgit.api.Git import org.eclipse.jgit.diff.DiffEntry -import org.eclipse.jgit.diff.DiffFormatter import org.eclipse.jgit.lib.Repository import org.eclipse.jgit.revwalk.RevCommit import org.eclipse.jgit.revwalk.RevTree import org.eclipse.jgit.revwalk.RevWalk import org.eclipse.jgit.treewalk.AbstractTreeIterator import org.eclipse.jgit.treewalk.CanonicalTreeParser -import java.io.ByteArrayOutputStream +import theme.backgroundColor +import theme.primaryTextColor +import theme.secondaryTextColor import java.io.IOException @Composable diff --git a/src/main/kotlin/aeab13/github/com/UncommitedChanges.kt b/src/main/kotlin/UncommitedChanges.kt similarity index 96% rename from src/main/kotlin/aeab13/github/com/UncommitedChanges.kt rename to src/main/kotlin/UncommitedChanges.kt index 6f02419..44445dd 100644 --- a/src/main/kotlin/aeab13/github/com/UncommitedChanges.kt +++ b/src/main/kotlin/UncommitedChanges.kt @@ -1,8 +1,3 @@ -package aeab13.github.com - -import aeab13.github.com.extensions.filePath -import aeab13.github.com.extensions.icon -import aeab13.github.com.git.StageStatus import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* @@ -20,6 +15,9 @@ import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp +import extensions.filePath +import extensions.icon +import git.StageStatus import org.eclipse.jgit.diff.DiffEntry @Composable diff --git a/src/main/kotlin/aeab13/github/com/extensions/DiffEntryExtensions.kt b/src/main/kotlin/extensions/DiffEntryExtensions.kt similarity index 96% rename from src/main/kotlin/aeab13/github/com/extensions/DiffEntryExtensions.kt rename to src/main/kotlin/extensions/DiffEntryExtensions.kt index d31ed7b..eb6b834 100644 --- a/src/main/kotlin/aeab13/github/com/extensions/DiffEntryExtensions.kt +++ b/src/main/kotlin/extensions/DiffEntryExtensions.kt @@ -1,4 +1,4 @@ -package aeab13.github.com.extensions +package extensions import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Add diff --git a/src/main/kotlin/aeab13/github/com/git/LogManager.kt b/src/main/kotlin/git/LogManager.kt similarity index 96% rename from src/main/kotlin/aeab13/github/com/git/LogManager.kt rename to src/main/kotlin/git/LogManager.kt index 0dd6f8a..a7ed6ce 100644 --- a/src/main/kotlin/aeab13/github/com/git/LogManager.kt +++ b/src/main/kotlin/git/LogManager.kt @@ -1,4 +1,4 @@ -package aeab13.github.com.git +package git import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ensureActive diff --git a/src/main/kotlin/aeab13/github/com/git/StatusManager.kt b/src/main/kotlin/git/StatusManager.kt similarity index 95% rename from src/main/kotlin/aeab13/github/com/git/StatusManager.kt rename to src/main/kotlin/git/StatusManager.kt index 343fd96..a741ca0 100644 --- a/src/main/kotlin/aeab13/github/com/git/StatusManager.kt +++ b/src/main/kotlin/git/StatusManager.kt @@ -1,6 +1,6 @@ -package aeab13.github.com.git +package git -import aeab13.github.com.extensions.filePath +import extensions.filePath import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ensureActive import kotlinx.coroutines.flow.MutableStateFlow diff --git a/src/main/kotlin/aeab13/github/com/main.kt b/src/main/kotlin/main.kt similarity index 89% rename from src/main/kotlin/aeab13/github/com/main.kt rename to src/main/kotlin/main.kt index 7173efd..f3e79fa 100644 --- a/src/main/kotlin/aeab13/github/com/main.kt +++ b/src/main/kotlin/main.kt @@ -1,15 +1,8 @@ -import aeab13.github.com.GitManager -import aeab13.github.com.RepositorySelected -import aeab13.github.com.RepositorySelectionStatus -import aeab13.github.com.theme.GitnuroTheme +import theme.GitnuroTheme import androidx.compose.animation.Crossfade import androidx.compose.foundation.layout.* -import androidx.compose.material.Button -import androidx.compose.material.Icon import androidx.compose.material.OutlinedButton import androidx.compose.material.Text -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.ExperimentalComposeUiApi diff --git a/src/main/kotlin/aeab13/github/com/theme/Color.kt b/src/main/kotlin/theme/Color.kt similarity index 93% rename from src/main/kotlin/aeab13/github/com/theme/Color.kt rename to src/main/kotlin/theme/Color.kt index 4d38d2d..6413910 100644 --- a/src/main/kotlin/aeab13/github/com/theme/Color.kt +++ b/src/main/kotlin/theme/Color.kt @@ -1,4 +1,4 @@ -package aeab13.github.com.theme +package theme import androidx.compose.ui.graphics.Color diff --git a/src/main/kotlin/aeab13/github/com/theme/Theme.kt b/src/main/kotlin/theme/Theme.kt similarity index 93% rename from src/main/kotlin/aeab13/github/com/theme/Theme.kt rename to src/main/kotlin/theme/Theme.kt index a1b96e1..4fc08de 100644 --- a/src/main/kotlin/aeab13/github/com/theme/Theme.kt +++ b/src/main/kotlin/theme/Theme.kt @@ -1,6 +1,5 @@ -package aeab13.github.com.theme +package theme -import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material.* import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color