From c5d7224b40a677628595600cfe9c4d80b4b9b622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:46:20 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=E4=B8=8D=E7=94=A8=E6=84=8F=E3=81=AA?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=88=E3=82=92=E6=95=B4?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/processor/impl/DocumentProcessorImpl.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 684a71af..4b7250f5 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -3,12 +3,10 @@ package one.nem.lacerta.processor.impl; import android.graphics.Bitmap; import java.nio.file.Path; -import java.util.ArrayList; import java.util.UUID; import dagger.assisted.Assisted; import dagger.assisted.AssistedInject; -import one.nem.lacerta.model.document.internal.XmlMetaPageModel; import one.nem.lacerta.processor.DocumentProcessor; import one.nem.lacerta.model.document.DocumentDetail; From c6d85471c6e95987eec2bc47ccef3e114d24a87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:48:54 +0900 Subject: [PATCH 2/9] =?UTF-8?q?=E6=95=B4=E7=90=86,=20=E3=82=B3=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/impl/DocumentProcessorImpl.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 4b7250f5..90cc7cf7 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -5,23 +5,28 @@ import android.graphics.Bitmap; import java.nio.file.Path; import java.util.UUID; +// Hilt import dagger.assisted.Assisted; import dagger.assisted.AssistedInject; -import one.nem.lacerta.processor.DocumentProcessor; +// Lacerta/model import one.nem.lacerta.model.document.DocumentDetail; - import one.nem.lacerta.model.document.internal.XmlMetaModel; - import one.nem.lacerta.model.document.page.Page; +// Lacerta/processor +import one.nem.lacerta.processor.DocumentProcessor; + +// Lacerta/source import one.nem.lacerta.source.file.FileManager; import one.nem.lacerta.source.file.factory.FileManagerFactory; +// Lacerta/utils import one.nem.lacerta.utils.LacertaLogger; - import one.nem.lacerta.utils.XmlMetaParser; import one.nem.lacerta.utils.repository.DeviceInfoUtils; + +// Lacerta/vcs import one.nem.lacerta.vcs.LacertaVcs; import one.nem.lacerta.vcs.factory.LacertaVcsFactory; From 6f0af7c4eb68069eabdf087104806fb0502f8b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:49:37 +0900 Subject: [PATCH 3/9] =?UTF-8?q?=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/data/impl/DocumentImpl.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java index 69c98bc1..5c4271b6 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java @@ -2,7 +2,7 @@ package one.nem.lacerta.data.impl; import java.util.ArrayList; import java.util.Date; -import java.util.List; + import java.util.UUID; import javax.inject.Inject; @@ -13,21 +13,12 @@ import one.nem.lacerta.model.PublicPath; import one.nem.lacerta.model.document.DocumentMeta; import one.nem.lacerta.model.document.DocumentDetail; -import one.nem.lacerta.model.document.path.DocumentPath; -import one.nem.lacerta.model.document.tag.DocumentTag; import one.nem.lacerta.source.database.LacertaDatabase; import one.nem.lacerta.source.database.entity.DocumentEntity; -import one.nem.lacerta.source.database.entity.LibraryEntity; -import one.nem.lacerta.source.database.entity.TagEntity; -import one.nem.lacerta.source.database.entity.VcsLogEntity; -import one.nem.lacerta.vcs.ActionType; -import one.nem.lacerta.source.file.factory.FileManagerFactory; -import one.nem.lacerta.source.jgit.JGitRepository; import one.nem.lacerta.utils.LacertaLogger; -import one.nem.lacerta.utils.XmlMetaParser; -import one.nem.lacerta.utils.repository.DeviceInfoUtils; + import one.nem.lacerta.vcs.LacertaVcs; From 526ab97706645515dd591e2c256feafa4a5ac4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:50:06 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=E6=95=B4=E7=90=86,=20=E3=82=B3=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/one/nem/lacerta/data/impl/DocumentImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java index 5c4271b6..0cccce30 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/DocumentImpl.java @@ -2,23 +2,27 @@ package one.nem.lacerta.data.impl; import java.util.ArrayList; import java.util.Date; - import java.util.UUID; +// Hilt import javax.inject.Inject; +// Lacerta/data import one.nem.lacerta.data.Document; +// Lacerta/model import one.nem.lacerta.model.PublicPath; import one.nem.lacerta.model.document.DocumentMeta; import one.nem.lacerta.model.document.DocumentDetail; +// Lacerta/source import one.nem.lacerta.source.database.LacertaDatabase; - import one.nem.lacerta.source.database.entity.DocumentEntity; +// Lacerta/utils import one.nem.lacerta.utils.LacertaLogger; +// Lacerta/vcs import one.nem.lacerta.vcs.LacertaVcs; From b4d94954b98b454b6173607899fe855e3254511f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:51:54 +0900 Subject: [PATCH 5/9] =?UTF-8?q?=E6=B6=88=E3=81=97=E5=BF=98=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E8=A8=98=E8=BF=B0=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feature/debug/src/main/AndroidManifest.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/feature/debug/src/main/AndroidManifest.xml b/feature/debug/src/main/AndroidManifest.xml index 4ae26da0..a5918e68 100644 --- a/feature/debug/src/main/AndroidManifest.xml +++ b/feature/debug/src/main/AndroidManifest.xml @@ -1,10 +1,4 @@ - - - - \ No newline at end of file From 4de33b95507ef6de1dbdfeb9649a70e47d14b72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:53:04 +0900 Subject: [PATCH 6/9] =?UTF-8?q?JGit=E9=96=A2=E9=80=A3=E3=81=AE=E3=83=A2?= =?UTF-8?q?=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/source/jgit/ActionRepo.java | 31 ------ .../lacerta/source/jgit/JGitRepository.java | 17 --- .../source/jgit/impl/ActionRepoImpl.java | 101 ------------------ .../source/jgit/impl/JGitRepositoryImpl.java | 55 ---------- .../nem/lacerta/source/jgit/impl/placeholder | 0 .../jgit/module/JGitRepositoryModule.java | 15 --- .../lacerta/source/jgit/module/placeholder | 0 7 files changed, 219 deletions(-) delete mode 100644 source/src/main/java/one/nem/lacerta/source/jgit/ActionRepo.java delete mode 100644 source/src/main/java/one/nem/lacerta/source/jgit/JGitRepository.java delete mode 100644 source/src/main/java/one/nem/lacerta/source/jgit/impl/ActionRepoImpl.java delete mode 100644 source/src/main/java/one/nem/lacerta/source/jgit/impl/JGitRepositoryImpl.java delete mode 100644 source/src/main/java/one/nem/lacerta/source/jgit/impl/placeholder delete mode 100644 source/src/main/java/one/nem/lacerta/source/jgit/module/JGitRepositoryModule.java delete mode 100644 source/src/main/java/one/nem/lacerta/source/jgit/module/placeholder diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/ActionRepo.java b/source/src/main/java/one/nem/lacerta/source/jgit/ActionRepo.java deleted file mode 100644 index 6bb6f830..00000000 --- a/source/src/main/java/one/nem/lacerta/source/jgit/ActionRepo.java +++ /dev/null @@ -1,31 +0,0 @@ -package one.nem.lacerta.source.jgit; - -import org.eclipse.jgit.lib.Repository; - -public interface ActionRepo { - - // リポジトリをインスタンス変数に格納 - void setRepository(Repository repository); - - // リポジトリ取得 - Repository getRepository(); - - // リポジトリ名取得 - String getRepositoryName(); - - // ステージングされていないファイルの一覧を取得 - String[] getUnstagedFiles(); - - // ステージングされているファイルの一覧を取得 - String[] getStagedFiles(); - - // ファイルをステージング - void stageFile(String path); - - // ファイルをアンステージング - void unstageFile(String path); - - // ステージングされているファイルをコミット - void commit(String message); - -} diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/JGitRepository.java b/source/src/main/java/one/nem/lacerta/source/jgit/JGitRepository.java deleted file mode 100644 index 09d04f17..00000000 --- a/source/src/main/java/one/nem/lacerta/source/jgit/JGitRepository.java +++ /dev/null @@ -1,17 +0,0 @@ -package one.nem.lacerta.source.jgit; - -import org.eclipse.jgit.lib.Repository; - -public interface JGitRepository { - - // リポジトリ取得 - Repository getRepository(String id); - // リポジトリ作成 - Repository createRepository(String id); - // リポジトリ削除 - void deleteRepository(String id); - // リポジトリ存在確認 - boolean repositoryExists(String id); - - -} diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/impl/ActionRepoImpl.java b/source/src/main/java/one/nem/lacerta/source/jgit/impl/ActionRepoImpl.java deleted file mode 100644 index ac94b96f..00000000 --- a/source/src/main/java/one/nem/lacerta/source/jgit/impl/ActionRepoImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package one.nem.lacerta.source.jgit.impl; - -import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.lib.Repository; - -import javax.inject.Inject; - -import one.nem.lacerta.source.jgit.ActionRepo; -import one.nem.lacerta.utils.LacertaLogger; - -public class ActionRepoImpl implements ActionRepo{ - - @Inject // Inject logger - LacertaLogger logger; - - private final String TAG = "ActionRepoImpl"; - - Repository repository; - - Git git; - - // Internal method - private Git getGit() { - if (this.git == null) { - logger.debug(TAG, "getGit: git is null. Creating new Git instance"); - this.git = new Git(repository); - } - return this.git; - } - - @Override - public void setRepository(Repository repository) { - this.repository = repository; - } - - @Override - public Repository getRepository() { - if (repository == null) { - logger.warn(TAG, "getRepository: repository is null. Throwing RuntimeException"); - throw new RuntimeException("リポジトリが設定されていません"); - } - return repository; - } - - @Override - public String getRepositoryName() { - return repository.getDirectory().getParentFile().getName(); - } - - @Override - public String[] getUnstagedFiles() { - Git git = getGit(); - try { - return git.status().call().getUntracked().toArray(new String[0]); - } catch (Exception e) { // TODO-rca: エラーハンドリング - logger.error(TAG, "getUnstagedFiles: " + e.getMessage()); - return new String[0]; - } - } - - @Override - public String[] getStagedFiles() { - Git git = getGit(); - try { - return git.status().call().getAdded().toArray(new String[0]); - } catch (Exception e) { // TODO-rca: エラーハンドリング - logger.error(TAG, "getStagedFiles: " + e.getMessage()); - return new String[0]; - } - } - - @Override - public void stageFile(String path) { - Git git = getGit(); - try { - git.add().addFilepattern(path).call(); - } catch (Exception e) { // TODO-rca: エラーハンドリング - logger.error(TAG, "stageFile: " + e.getMessage()); - } - } - - @Override - public void unstageFile(String path) { - Git git = getGit(); - try { - git.reset().addPath(path).call(); - } catch (Exception e) { // TODO-rca: エラーハンドリング - logger.error(TAG, "unstageFile: " + e.getMessage()); - } - } - - @Override - public void commit(String message) { - Git git = getGit(); - try { - git.commit().setMessage(message).call(); - } catch (Exception e) { // TODO-rca: エラーハンドリング - logger.error(TAG, "commit: " + e.getMessage()); - } - } -} diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/impl/JGitRepositoryImpl.java b/source/src/main/java/one/nem/lacerta/source/jgit/impl/JGitRepositoryImpl.java deleted file mode 100644 index fabcb0bb..00000000 --- a/source/src/main/java/one/nem/lacerta/source/jgit/impl/JGitRepositoryImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package one.nem.lacerta.source.jgit.impl; - -import one.nem.lacerta.source.jgit.JGitRepository; - -import javax.inject.Inject; - -import one.nem.lacerta.utils.repository.DeviceInfoUtils; - -import org.eclipse.jgit.lib.Repository; - -import org.eclipse.jgit.lib.RepositoryBuilder; - -public class JGitRepositoryImpl implements JGitRepository { - - private final DeviceInfoUtils deviceInfoUtils; - - @Inject - public JGitRepositoryImpl(DeviceInfoUtils deviceInfoUtils) { - this.deviceInfoUtils = deviceInfoUtils; - } - - @Override - public Repository getRepository(String id) { - RepositoryBuilder repositoryBuilder = new RepositoryBuilder(); - repositoryBuilder.setGitDir(deviceInfoUtils.getExternalStorageDirectory().resolve(id).resolve(".git").toFile()); - repositoryBuilder.setMustExist(true); - try { - return repositoryBuilder.build(); - } catch (Exception e) { - return null; - } - } - - @Override - public Repository createRepository(String id) { - RepositoryBuilder repositoryBuilder = new RepositoryBuilder(); - repositoryBuilder.setGitDir(deviceInfoUtils.getExternalStorageDirectory().resolve(id).resolve(".git").toFile()); - repositoryBuilder.setMustExist(false); - try { - return repositoryBuilder.build(); - } catch (Exception e) { - return null; - } - } - - @Override - public void deleteRepository(String id) { - // TODO-rca: 未実装 - } - - @Override - public boolean repositoryExists(String id) { - return false; // TODO-rca: 未実装 - } -} diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/impl/placeholder b/source/src/main/java/one/nem/lacerta/source/jgit/impl/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/module/JGitRepositoryModule.java b/source/src/main/java/one/nem/lacerta/source/jgit/module/JGitRepositoryModule.java deleted file mode 100644 index 4c9b8fde..00000000 --- a/source/src/main/java/one/nem/lacerta/source/jgit/module/JGitRepositoryModule.java +++ /dev/null @@ -1,15 +0,0 @@ -package one.nem.lacerta.source.jgit.module; - -import dagger.Binds; -import dagger.Module; -import dagger.hilt.InstallIn; -import dagger.hilt.components.SingletonComponent; -import one.nem.lacerta.source.jgit.JGitRepository; - -@Module -@InstallIn(SingletonComponent.class) -abstract public class JGitRepositoryModule { - - @Binds - public abstract JGitRepository bindManageRepo(one.nem.lacerta.source.jgit.impl.JGitRepositoryImpl manageRepoImpl); -} diff --git a/source/src/main/java/one/nem/lacerta/source/jgit/module/placeholder b/source/src/main/java/one/nem/lacerta/source/jgit/module/placeholder deleted file mode 100644 index e69de29b..00000000 From 16eb6d083ec6bd06a6d5b1fc429f15881680f134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:54:07 +0900 Subject: [PATCH 7/9] =?UTF-8?q?:shared:icon=E3=82=92=E5=BB=83=E6=AD=A21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/settings.gradle b/settings.gradle index f5dea772..0cc88262 100644 --- a/settings.gradle +++ b/settings.gradle @@ -30,5 +30,4 @@ include ':source' include ':model' include ':processor' include ':shared:ui' -include ':shared:icon' include ':vcs' From be7bd6b6fc9f4945e1be5926859b18354af35b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:55:04 +0900 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82?= =?UTF-8?q?=E3=81=8B=E3=82=89=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4db4c74d..e6cbc668 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -83,8 +83,6 @@ dependencies { implementation project(':shared:ui') - implementation project(':shared:icon') - // Hilt (DI) implementation libs.com.google.dagger.hilt.android annotationProcessor libs.com.google.dagger.hilt.compiler From 1e2f48e0ae41dafeb4fcb4c6a319784d3f8f192f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:58:04 +0900 Subject: [PATCH 9/9] =?UTF-8?q?shared:icon=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/gradle.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/.idea/gradle.xml b/.idea/gradle.xml index efda47c7..7bb276eb 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -25,7 +25,6 @@