Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package renaming #20

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
12 changes: 3 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
compileSdk 33

defaultConfig {
applicationId "space.taran.arkmemo"
applicationId "dev.arkbuilders.arkmemo"
minSdk 26
targetSdk 33
versionCode 1
Expand Down Expand Up @@ -84,13 +84,8 @@ dependencies {
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'

//implementation 'com.github.ARK-Builders:ark-filepicker:b2bfa01ea7'

implementation 'com.github.ark-builders:ark-filepicker:b2bfa01ea7'
implementation 'space.taran:arklib:0.1.0-SNAPSHOT-7df9a4e581'

implementation 'ch.acra:acra-http:5.9.5'
implementation 'ch.acra:acra-dialog:5.9.5'
implementation 'dev.arkbuilders:arkfilepicker:0.1.1'
implementation 'dev.arkbuilders:arklib:0.3.3'

implementation 'androidx.preference:preference:1.2.0'
implementation "com.google.dagger:hilt-android:2.42"
Expand All @@ -107,5 +102,4 @@ dependencies {

implementation 'ch.acra:acra-http:5.9.6'
implementation 'ch.acra:acra-dialog:5.9.6'
implementation 'com.simplemobiletools:commons:5.29.20'
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo
package dev.arkbuilders.arkmemo

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("space.taran.arkmemo", appContext.packageName)
assertEquals("dev.arkbuilders.arkmemo", appContext.packageName)
}
}
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="space.taran.arkmemo">
package="dev.arkbuilders.arkmemo">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Expand Down Expand Up @@ -39,4 +39,4 @@
</intent-filter>
</activity>
</application>
</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package space.taran.arkmemo
package dev.arkbuilders.arkmemo

import android.app.Application
import android.content.Context
import dagger.hilt.android.HiltAndroidApp
import dev.arkbuilders.arklib.initArkLib
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
Expand All @@ -11,13 +11,17 @@ import org.acra.config.httpSender
import org.acra.data.StringFormat
import org.acra.ktx.initAcra
import org.acra.sender.HttpSender
import space.taran.arkmemo.space.taran.arkmemo.utils.Config
import dev.arkbuilders.arkmemo.dev.arkbuilders.arkmemo.utils.Config
import dev.arkbuilders.arkfilepicker.folders.FoldersRepo

@HiltAndroidApp
class App: Application() {

override fun attachBaseContext(base: Context?) {
super.attachBaseContext(base)
override fun onCreate() {
super.onCreate()
System.loadLibrary("arklib")
FoldersRepo.init(this)
initArkLib()
initAcra()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo.contracts
package dev.arkbuilders.arkmemo.contracts

import android.app.Activity
import android.content.Context
Expand All @@ -9,7 +9,7 @@ import android.os.Environment
import android.provider.Settings
import androidx.activity.result.contract.ActivityResultContract
import androidx.annotation.RequiresApi
import space.taran.arkmemo.files.FilePicker
import dev.arkbuilders.arkmemo.files.FilePicker

class PermissionContract: ActivityResultContract<String, Boolean>() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package space.taran.arkmemo.data
package dev.arkbuilders.arkmemo.data

import dev.arkbuilders.arklib.ResourceId
import java.nio.file.attribute.FileTime

data class ResourceMeta(
val id: Long,
val id: ResourceId,
val name: String,
val extension: String,
val modified: FileTime,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package space.taran.arkmemo.data.repositories
package dev.arkbuilders.arkmemo.data.repositories

import android.content.Context
import android.util.Log
import dagger.hilt.android.qualifiers.ApplicationContext
import space.taran.arklib.computeId
import space.taran.arkmemo.data.ResourceMeta
import space.taran.arkmemo.files.parsers.JsonParser
import space.taran.arkmemo.models.TextNote
import space.taran.arkmemo.preferences.MemoPreferences
import dev.arkbuilders.arklib.computeId
import dev.arkbuilders.arkmemo.data.ResourceMeta
import dev.arkbuilders.arkmemo.files.parsers.JsonParser
import dev.arkbuilders.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.preferences.MemoPreferences
import java.io.*
import java.nio.file.Files
import java.nio.file.Path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package space.taran.arkmemo.data.viewmodels
package dev.arkbuilders.arkmemo.data.viewmodels

import android.content.Context
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import space.taran.arkmemo.data.repositories.TextNotesRepository
import space.taran.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.data.repositories.TextNotesRepository
import dev.arkbuilders.arkmemo.models.TextNote
import javax.inject.Inject

@HiltViewModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package space.taran.arkmemo.data.viewmodels
package dev.arkbuilders.arkmemo.data.viewmodels

import android.content.Context
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel
import dev.arkbuilders.arkmemo.data.repositories.TextNotesRepository
import dev.arkbuilders.arkmemo.models.TextNote
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import space.taran.arkmemo.data.repositories.TextNotesRepository
import space.taran.arkmemo.models.TextNote
import javax.inject.Inject

@HiltViewModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo.files
package dev.arkbuilders.arkmemo.files

import android.Manifest
import android.content.Context
Expand All @@ -10,11 +10,11 @@ import androidx.activity.result.ActivityResultLauncher
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentManager
import space.taran.arkfilepicker.ArkFilePickerConfig
import space.taran.arkfilepicker.ArkFilePickerFragment
import space.taran.arkfilepicker.ArkFilePickerMode
import space.taran.arkmemo.BuildConfig
import space.taran.arkmemo.R
import dev.arkbuilders.arkfilepicker.ArkFilePickerConfig
import dev.arkbuilders.arkfilepicker.presentation.filepicker.ArkFilePickerFragment
import dev.arkbuilders.arkfilepicker.presentation.filepicker.ArkFilePickerMode
import dev.arkbuilders.arkmemo.BuildConfig
import dev.arkbuilders.arkmemo.R

class FilePicker private constructor(){
companion object{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package space.taran.arkmemo.files.parsers
package dev.arkbuilders.arkmemo.files.parsers

import com.google.gson.Gson
import space.taran.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.models.TextNote

class JsonParser {
companion object{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package space.taran.arkmemo.models
package dev.arkbuilders.arkmemo.models

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.IgnoredOnParcel
import space.taran.arkmemo.data.ResourceMeta
import dev.arkbuilders.arkmemo.data.ResourceMeta
import kotlinx.parcelize.Parcelize

@Parcelize
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo.preferences
package dev.arkbuilders.arkmemo.preferences

import android.content.Context
import android.content.Context.MODE_PRIVATE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo.ui.activities
package dev.arkbuilders.arkmemo.ui.activities

import android.content.ClipboardManager
import android.content.Context
Expand All @@ -13,15 +13,15 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import by.kirich1409.viewbindingdelegate.viewBinding
import dagger.hilt.android.AndroidEntryPoint
import space.taran.arkfilepicker.onArkPathPicked
import space.taran.arkmemo.R
import space.taran.arkmemo.contracts.PermissionContract
import space.taran.arkmemo.databinding.ActivityMainBinding
import space.taran.arkmemo.files.FilePicker
import space.taran.arkmemo.preferences.MemoPreferences
import space.taran.arkmemo.ui.fragments.EditTextNotesFragment
import space.taran.arkmemo.ui.fragments.SettingsFragment
import space.taran.arkmemo.ui.fragments.TextNotesFragment
import dev.arkbuilders.arkmemo.R
import dev.arkbuilders.arkmemo.contracts.PermissionContract
import dev.arkbuilders.arkmemo.databinding.ActivityMainBinding
import dev.arkbuilders.arkmemo.files.FilePicker
import dev.arkbuilders.arkmemo.preferences.MemoPreferences
import dev.arkbuilders.arkmemo.ui.fragments.EditTextNotesFragment
import dev.arkbuilders.arkmemo.ui.fragments.SettingsFragment
import dev.arkbuilders.arkmemo.ui.fragments.TextNotesFragment
import dev.arkbuilders.arkfilepicker.presentation.onArkPathPicked

@AndroidEntryPoint
class MainActivity : AppCompatActivity(R.layout.activity_main) {
Expand Down Expand Up @@ -51,8 +51,6 @@ class MainActivity : AppCompatActivity(R.layout.activity_main) {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
System.loadLibrary("arklib")

setContentView(binding.root)
setSupportActionBar(binding.toolbar)
binding.toolbar.setNavigationOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo.ui.adapters
package dev.arkbuilders.arkmemo.ui.adapters

import android.view.LayoutInflater
import android.view.View
Expand All @@ -7,13 +7,13 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.RecyclerView
import by.kirich1409.viewbindingdelegate.viewBinding
import space.taran.arkmemo.R
import space.taran.arkmemo.databinding.TextNoteBinding
import space.taran.arkmemo.models.TextNote
import space.taran.arkmemo.ui.activities.MainActivity
import space.taran.arkmemo.ui.activities.replaceFragment
import space.taran.arkmemo.ui.dialogs.NoteDeleteDialogFragment
import space.taran.arkmemo.ui.fragments.EditTextNotesFragment
import dev.arkbuilders.arkmemo.R
import dev.arkbuilders.arkmemo.databinding.TextNoteBinding
import dev.arkbuilders.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.ui.activities.MainActivity
import dev.arkbuilders.arkmemo.ui.activities.replaceFragment
import dev.arkbuilders.arkmemo.ui.dialogs.NoteDeleteDialogFragment
import dev.arkbuilders.arkmemo.ui.fragments.EditTextNotesFragment

class TextNotesListAdapter(private val notes: List<TextNote>): RecyclerView.Adapter<TextNotesListAdapter.NoteViewHolder>() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package space.taran.arkmemo.ui.dialogs
package dev.arkbuilders.arkmemo.ui.dialogs

import android.app.Dialog
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment
import space.taran.arkmemo.R
import space.taran.arkmemo.models.TextNote
import space.taran.arkmemo.ui.fragments.deleteTextNote
import dev.arkbuilders.arkmemo.R
import dev.arkbuilders.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.ui.fragments.deleteTextNote

class NoteDeleteDialogFragment: DialogFragment() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo.ui.fragments
package dev.arkbuilders.arkmemo.ui.fragments

import android.os.Bundle
import android.text.Editable
Expand All @@ -11,12 +11,12 @@ import androidx.fragment.app.activityViewModels
import androidx.fragment.app.viewModels
import by.kirich1409.viewbindingdelegate.viewBinding
import dagger.hilt.android.AndroidEntryPoint
import space.taran.arkmemo.R
import space.taran.arkmemo.data.viewmodels.EditTextNotesViewModel
import space.taran.arkmemo.data.viewmodels.TextNotesViewModel
import space.taran.arkmemo.databinding.FragmentEditTextNotesBinding
import space.taran.arkmemo.models.TextNote
import space.taran.arkmemo.ui.activities.MainActivity
import dev.arkbuilders.arkmemo.R
import dev.arkbuilders.arkmemo.data.viewmodels.EditTextNotesViewModel
import dev.arkbuilders.arkmemo.data.viewmodels.TextNotesViewModel
import dev.arkbuilders.arkmemo.databinding.FragmentEditTextNotesBinding
import dev.arkbuilders.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.ui.activities.MainActivity

@AndroidEntryPoint
class EditTextNotesFragment: Fragment(R.layout.fragment_edit_text_notes) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package space.taran.arkmemo.ui.fragments
package dev.arkbuilders.arkmemo.ui.fragments

import android.os.Bundle
import android.view.View
import androidx.preference.PreferenceFragmentCompat
import space.taran.arkfilepicker.onArkPathPicked
import space.taran.arkmemo.R
import space.taran.arkmemo.files.FilePicker
import space.taran.arkmemo.preferences.MemoPreferences
import space.taran.arkmemo.ui.activities.MainActivity
import space.taran.arkmemo.ui.views.PathPreference
import dev.arkbuilders.arkmemo.R
import dev.arkbuilders.arkmemo.files.FilePicker
import dev.arkbuilders.arkmemo.preferences.MemoPreferences
import dev.arkbuilders.arkmemo.ui.activities.MainActivity
import dev.arkbuilders.arkmemo.ui.views.PathPreference
import dev.arkbuilders.arkfilepicker.presentation.onArkPathPicked

class SettingsFragment : PreferenceFragmentCompat() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.taran.arkmemo.ui.fragments
package dev.arkbuilders.arkmemo.ui.fragments

import android.os.Bundle
import android.view.View
Expand All @@ -15,14 +15,14 @@ import by.kirich1409.viewbindingdelegate.viewBinding
import com.google.android.material.floatingactionbutton.FloatingActionButton
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
import space.taran.arkmemo.R
import space.taran.arkmemo.data.viewmodels.TextNotesViewModel
import space.taran.arkmemo.databinding.FragmentTextNotesBinding
import space.taran.arkmemo.models.TextNote
import space.taran.arkmemo.ui.activities.MainActivity
import space.taran.arkmemo.ui.activities.getTextFromClipBoard
import space.taran.arkmemo.ui.activities.replaceFragment
import space.taran.arkmemo.ui.adapters.TextNotesListAdapter
import dev.arkbuilders.arkmemo.R
import dev.arkbuilders.arkmemo.data.viewmodels.TextNotesViewModel
import dev.arkbuilders.arkmemo.databinding.FragmentTextNotesBinding
import dev.arkbuilders.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.ui.activities.MainActivity
import dev.arkbuilders.arkmemo.ui.activities.getTextFromClipBoard
import dev.arkbuilders.arkmemo.ui.activities.replaceFragment
import dev.arkbuilders.arkmemo.ui.adapters.TextNotesListAdapter

@AndroidEntryPoint
class TextNotesFragment: Fragment(R.layout.fragment_text_notes) {
Expand Down
Loading