From 53f4a9ce311d612d43fa770cf7e8f8e98fbb43a0 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Tue, 12 Sep 2023 06:17:39 +0000 Subject: 2: organise module with clean archi, use Koin for injection. --- fakelocation/build.gradle | 8 +- fakelocation/fakelocationdemo/build.gradle | 2 +- .../fakelocationdemo/MainActivity.kt | 10 +- fakelocation/src/main/AndroidManifest.xml | 3 +- .../e/advancedprivacy/fakelocation/KoinModule.kt | 9 ++ .../domain/usecases/FakeLocationModule.kt | 133 +++++++++++++++++++++ .../fakelocation/services/FakeLocationService.kt | 111 +++++++++++++++++ .../fakelocation/FakeLocationModule.kt | 132 -------------------- .../fakelocation/FakeLocationService.kt | 110 ----------------- .../fakelocation/IFakeLocationModule.kt | 41 ------- 10 files changed, 267 insertions(+), 292 deletions(-) create mode 100644 fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/KoinModule.kt create mode 100644 fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/domain/usecases/FakeLocationModule.kt create mode 100644 fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/services/FakeLocationService.kt delete mode 100644 fakelocation/src/main/java/foundation/e/privacymodules/fakelocation/FakeLocationModule.kt delete mode 100644 fakelocation/src/main/java/foundation/e/privacymodules/fakelocation/FakeLocationService.kt delete mode 100644 fakelocation/src/main/java/foundation/e/privacymodules/fakelocation/IFakeLocationModule.kt (limited to 'fakelocation') diff --git a/fakelocation/build.gradle b/fakelocation/build.gradle index 91f8031..64fc633 100644 --- a/fakelocation/build.gradle +++ b/fakelocation/build.gradle @@ -46,7 +46,11 @@ android { } dependencies { - implementation (libs.bundles.kotlin.android.coroutines) - implementation project(':privacymodule-api') + implementation( + libs.bundles.koin, + libs.bundles.kotlin.android.coroutines + ) + implementation project(':core') + } diff --git a/fakelocation/fakelocationdemo/build.gradle b/fakelocation/fakelocationdemo/build.gradle index 0145eca..6cb9af3 100644 --- a/fakelocation/fakelocationdemo/build.gradle +++ b/fakelocation/fakelocationdemo/build.gradle @@ -54,7 +54,7 @@ android { } dependencies { - implementation project(':privacymodule-api') + implementation project(':core') implementation project(':fakelocation') implementation project(':permissionsstandalone') diff --git a/fakelocation/fakelocationdemo/src/main/java/foundation/e/privacymodules/fakelocationdemo/MainActivity.kt b/fakelocation/fakelocationdemo/src/main/java/foundation/e/privacymodules/fakelocationdemo/MainActivity.kt index b7c9ced..f2e10a4 100644 --- a/fakelocation/fakelocationdemo/src/main/java/foundation/e/privacymodules/fakelocationdemo/MainActivity.kt +++ b/fakelocation/fakelocationdemo/src/main/java/foundation/e/privacymodules/fakelocationdemo/MainActivity.kt @@ -33,12 +33,12 @@ import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import androidx.databinding.DataBindingUtil -import foundation.e.privacymodules.fakelocation.FakeLocationModule +import foundation.e.advancedprivacy.domain.entities.AppOpModes +import foundation.e.advancedprivacy.domain.entities.ApplicationDescription +import foundation.e.advancedprivacy.domain.entities.ProfileType +import foundation.e.advancedprivacy.fakelocation.domain.usecases.FakeLocationModule +import foundation.e.advancedprivacy.permissions.externalinterfaces.PermissionsPrivacyModule import foundation.e.privacymodules.fakelocationdemo.databinding.ActivityMainBinding -import foundation.e.privacymodules.permissions.PermissionsPrivacyModule -import foundation.e.privacymodules.permissions.data.AppOpModes -import foundation.e.privacymodules.permissions.data.ApplicationDescription -import foundation.e.privacymodules.permissions.data.ProfileType class MainActivity : AppCompatActivity() { companion object { diff --git a/fakelocation/src/main/AndroidManifest.xml b/fakelocation/src/main/AndroidManifest.xml index 5077c24..fde371c 100644 --- a/fakelocation/src/main/AndroidManifest.xml +++ b/fakelocation/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@