From 8480254885742bbba7084993d9d301cc200340f3 Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Tue, 9 Jul 2024 13:28:12 +0200 Subject: [PATCH] database: Rename DB module to Database --- Core/build.gradle.kts | 2 +- {DB => Database}/build.gradle.kts | 4 ++-- .../database}/Platform.android.kt | 2 +- .../database}/Test.android.kt | 2 +- .../database}/Platform.kt | 2 +- .../database}/RealmProvider.kt | 12 ++++++------ .../database}/models/ContainerDB.kt | 2 +- .../database}/models/FileDB.kt | 2 +- .../database}/models/TransferDB.kt | 2 +- .../database}/models/setting/AppSettings.kt | 2 +- .../database}/models/upload/UploadTasks.kt | 2 +- .../multiplatform_swisstransfer/database}/Test.kt | 2 +- .../database}/Platform.ios.kt | 2 +- .../database}/Test.ios.kt | 2 +- .../database}/Platform.macos.kt | 2 +- Package.swift | 8 ++++---- settings.gradle.kts | 2 +- 17 files changed, 26 insertions(+), 26 deletions(-) rename {DB => Database}/build.gradle.kts (95%) rename {DB/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/Platform.android.kt (93%) rename {DB/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/Test.android.kt (94%) rename {DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/Platform.kt (93%) rename {DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/RealmProvider.kt (79%) rename {DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/models/ContainerDB.kt (96%) rename {DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/models/FileDB.kt (95%) rename {DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/models/TransferDB.kt (95%) rename {DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/models/setting/AppSettings.kt (91%) rename {DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/models/upload/UploadTasks.kt (92%) rename {DB/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/Test.kt (93%) rename {DB/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/Platform.ios.kt (94%) rename {DB/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/Test.ios.kt (93%) rename {DB/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db => Database/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database}/Platform.macos.kt (93%) diff --git a/Core/build.gradle.kts b/Core/build.gradle.kts index 39f26656..ee4e6c59 100644 --- a/Core/build.gradle.kts +++ b/Core/build.gradle.kts @@ -43,7 +43,7 @@ kotlin { sourceSets { commonMain.dependencies { implementation(project(":Common")) - implementation(project(":DB")) + implementation(project(":Database")) implementation(project(":Network")) } commonTest.dependencies { diff --git a/DB/build.gradle.kts b/Database/build.gradle.kts similarity index 95% rename from DB/build.gradle.kts rename to Database/build.gradle.kts index 0f395143..831f05cd 100644 --- a/DB/build.gradle.kts +++ b/Database/build.gradle.kts @@ -27,7 +27,7 @@ kotlin { publishLibraryVariants("release") } - val xcframeworkName = "DB" + val xcframeworkName = "Database" val xcf = XCFramework() listOf( iosX64(), @@ -68,7 +68,7 @@ skie { } android { - namespace = "com.infomaniak.multiplatform_swisstransfer.db" + namespace = "com.infomaniak.multiplatform_swisstransfer.database" compileSdk = Versions.compileSdk defaultConfig { minSdk = Versions.minSdk diff --git a/DB/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.android.kt b/Database/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.android.kt similarity index 93% rename from DB/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.android.kt rename to Database/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.android.kt index fd0a4987..dc88533a 100644 --- a/DB/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.android.kt +++ b/Database/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.android.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database class AndroidPlatform : Platform { override val name: String = "Android ${android.os.Build.VERSION.SDK_INT}" diff --git a/DB/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.android.kt b/Database/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.android.kt similarity index 94% rename from DB/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.android.kt rename to Database/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.android.kt index f9595e20..53c4d3b8 100644 --- a/DB/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.android.kt +++ b/Database/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.android.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database import org.junit.Assert.assertTrue import org.junit.Test diff --git a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.kt similarity index 93% rename from DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.kt rename to Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.kt index 7a536c74..b8663921 100644 --- a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.kt +++ b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database interface Platform { val name: String diff --git a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/RealmProvider.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/RealmProvider.kt similarity index 79% rename from DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/RealmProvider.kt rename to Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/RealmProvider.kt index be05f20d..0dbff0ab 100644 --- a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/RealmProvider.kt +++ b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/RealmProvider.kt @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database -import com.infomaniak.multiplatform_swisstransfer.db.models.ContainerDB -import com.infomaniak.multiplatform_swisstransfer.db.models.FileDB -import com.infomaniak.multiplatform_swisstransfer.db.models.TransferDB -import com.infomaniak.multiplatform_swisstransfer.db.models.setting.AppSettings -import com.infomaniak.multiplatform_swisstransfer.db.models.upload.UploadTasks +import com.infomaniak.multiplatform_swisstransfer.database.models.ContainerDB +import com.infomaniak.multiplatform_swisstransfer.database.models.FileDB +import com.infomaniak.multiplatform_swisstransfer.database.models.TransferDB +import com.infomaniak.multiplatform_swisstransfer.database.models.setting.AppSettings +import com.infomaniak.multiplatform_swisstransfer.database.models.upload.UploadTasks import io.realm.kotlin.Realm import io.realm.kotlin.RealmConfiguration diff --git a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/ContainerDB.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/ContainerDB.kt similarity index 96% rename from DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/ContainerDB.kt rename to Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/ContainerDB.kt index 34105b46..444266b1 100644 --- a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/ContainerDB.kt +++ b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/ContainerDB.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db.models +package com.infomaniak.multiplatform_swisstransfer.database.models import com.infomaniak.multiplatform_swisstransfer.common.interfaces.Container import io.realm.kotlin.ext.realmListOf diff --git a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/FileDB.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/FileDB.kt similarity index 95% rename from DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/FileDB.kt rename to Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/FileDB.kt index 74b54888..5abd945b 100644 --- a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/FileDB.kt +++ b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/FileDB.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db.models +package com.infomaniak.multiplatform_swisstransfer.database.models import com.infomaniak.multiplatform_swisstransfer.common.interfaces.File import io.realm.kotlin.types.RealmObject diff --git a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/TransferDB.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/TransferDB.kt similarity index 95% rename from DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/TransferDB.kt rename to Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/TransferDB.kt index 3993384e..ab5da68e 100644 --- a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/TransferDB.kt +++ b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/TransferDB.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db.models +package com.infomaniak.multiplatform_swisstransfer.database.models import com.infomaniak.multiplatform_swisstransfer.common.interfaces.Transfer import io.realm.kotlin.types.RealmObject diff --git a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/setting/AppSettings.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/setting/AppSettings.kt similarity index 91% rename from DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/setting/AppSettings.kt rename to Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/setting/AppSettings.kt index 8d0762d3..5d43f19b 100644 --- a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/setting/AppSettings.kt +++ b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/setting/AppSettings.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db.models.setting +package com.infomaniak.multiplatform_swisstransfer.database.models.setting import io.realm.kotlin.types.RealmObject diff --git a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/upload/UploadTasks.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/upload/UploadTasks.kt similarity index 92% rename from DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/upload/UploadTasks.kt rename to Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/upload/UploadTasks.kt index 90d1390d..3966df27 100644 --- a/DB/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/models/upload/UploadTasks.kt +++ b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/upload/UploadTasks.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db.models.upload +package com.infomaniak.multiplatform_swisstransfer.database.models.upload import io.realm.kotlin.types.RealmObject diff --git a/DB/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.kt b/Database/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.kt similarity index 93% rename from DB/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.kt rename to Database/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.kt index d1c2c3c2..8e27d29e 100644 --- a/DB/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.kt +++ b/Database/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database import kotlin.test.Test import kotlin.test.assertEquals diff --git a/DB/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.ios.kt b/Database/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.ios.kt similarity index 94% rename from DB/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.ios.kt rename to Database/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.ios.kt index 2698655e..120117ab 100644 --- a/DB/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.ios.kt +++ b/Database/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.ios.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database import platform.UIKit.UIDevice diff --git a/DB/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.ios.kt b/Database/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.ios.kt similarity index 93% rename from DB/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.ios.kt rename to Database/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.ios.kt index c34ab818..667107b8 100644 --- a/DB/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Test.ios.kt +++ b/Database/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.ios.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database import kotlin.test.Test import kotlin.test.assertEquals diff --git a/DB/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.macos.kt b/Database/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.macos.kt similarity index 93% rename from DB/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.macos.kt rename to Database/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.macos.kt index 0af3f049..df0b5eec 100644 --- a/DB/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/db/Platform.macos.kt +++ b/Database/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.macos.kt @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package com.infomaniak.multiplatform_swisstransfer.db +package com.infomaniak.multiplatform_swisstransfer.database class MacOSPlatform : Platform { override val name: String = "MacOS" diff --git a/Package.swift b/Package.swift index 15f9dc4f..1cc469a5 100644 --- a/Package.swift +++ b/Package.swift @@ -8,8 +8,8 @@ let package = Package( .macOS(.v11) ], products: [ - .library(name: "Core", targets: ["Shared"]), - .library(name: "DB", targets: ["DB"]), + .library(name: "Core", targets: ["Core"]), + .library(name: "Database", targets: ["Database"]), .library(name: "Network", targets: ["Network"]) ], targets: [ @@ -18,8 +18,8 @@ let package = Package( path: "Core.xcframework.zip" ), .binaryTarget( - name: "DB", - path: "DB.xcframework.zip" + name: "Database", + path: "Database.xcframework.zip" ), .binaryTarget( name: "Network", diff --git a/settings.gradle.kts b/settings.gradle.kts index 1bff43f8..d0b86336 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,5 +17,5 @@ dependencyResolutionManagement { rootProject.name = "multiplatform-SwissTransfer" include(":Common") include(":Network") -include(":DB") +include(":Database") include(":Core")