Skip to content

Commit

Permalink
Create new structure (#200)
Browse files Browse the repository at this point in the history
* Create new structure for features

* Create new structure for domain and data modules
  • Loading branch information
alexandregpereira authored Aug 6, 2023
1 parent 2633067 commit 90d44b5
Show file tree
Hide file tree
Showing 757 changed files with 286 additions and 198 deletions.
38 changes: 19 additions & 19 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,25 @@ android {

dependencies {
implementation(project(":core:analytics"))
implementation(project(":data:data-app"))
implementation(project(":domain:app"))
implementation(project(":event:folder-detail-event"))
implementation(project(":event:folder-list-event"))
implementation(project(":event:folder-preview-event"))
implementation(project(":event:monster-content-manager-event"))
implementation(project(":event:monster-detail-event"))
implementation(project(":android:folder-detail"))
implementation(project(":android:folder-insert"))
implementation(project(":android:folder-list"))
implementation(project(":android:folder-preview"))
implementation(project(":android:monster-compendium"))
implementation(project(":android:monster-content-manager"))
implementation(project(":android:monster-detail"))
implementation(project(":android:monster-lore-detail"))
implementation(project(":android:sync"))
implementation(project(":feature:search"))
implementation(project(":feature:settings"))
implementation(project(":feature:spell-detail"))
implementation(project(":domain:app:data"))
implementation(project(":domain:app:core"))
implementation(project(":feature:folder-detail:event"))
implementation(project(":feature:folder-list:event"))
implementation(project(":feature:folder-preview:event"))
implementation(project(":feature:monster-content-manager:event"))
implementation(project(":feature:monster-detail:event"))
implementation(project(":feature:folder-detail:android"))
implementation(project(":feature:folder-insert:android"))
implementation(project(":feature:folder-list:android"))
implementation(project(":feature:folder-preview:android"))
implementation(project(":feature:monster-compendium:android"))
implementation(project(":feature:monster-content-manager:android"))
implementation(project(":feature:monster-detail:android"))
implementation(project(":feature:monster-lore-detail:android"))
implementation(project(":feature:sync:android"))
implementation(project(":feature:search:android"))
implementation(project(":feature:settings:android"))
implementation(project(":feature:spell-detail:android"))
implementation(project(":ui:core"))

implementation(platform(libs.firebase.bom))
Expand Down
7 changes: 6 additions & 1 deletion buildSrc/src/main/kotlin/TargetConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ fun Project.configureTargets(
)
}.onEach {
it.binaries.framework {
baseName = project.name
iosFramework()
}
}
Expand All @@ -79,6 +78,12 @@ fun Project.configureTargets(
}
}
}


all {
it.languageSettings.optIn("kotlin.experimental.ExperimentalObjCName")
it.languageSettings.optIn("kotlin.experimental.ExperimentalObjCRefinement")
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":domain:alternative-source"))
implementation(project(":domain:settings"))
implementation(project(":domain:alternative-source:core"))
implementation(project(":domain:settings:core"))
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.datetime)
implementation(libs.kotlin.serialization)
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions domain/app/build.gradle.kts → domain/app/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":domain:alternative-source"))
implementation(project(":domain:monster"))
implementation(project(":domain:monster-compendium"))
implementation(project(":domain:monster-folder"))
implementation(project(":domain:monster-lore"))
implementation(project(":domain:settings"))
implementation(project(":domain:spell"))
implementation(project(":domain:sync"))
implementation(project(":domain:alternative-source:core"))
implementation(project(":domain:monster:core"))
implementation(project(":domain:monster-compendium:core"))
implementation(project(":domain:monster-folder:core"))
implementation(project(":domain:monster-lore:core"))
implementation(project(":domain:settings:core"))
implementation(project(":domain:spell:core"))
implementation(project(":domain:sync:core"))
implementation(libs.koin.core)
}
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":data:data-alternative-source"))
implementation(project(":data:data-monster"))
implementation(project(":data:data-monster-folder"))
implementation(project(":data:data-monster-lore"))
implementation(project(":data:data-settings"))
implementation(project(":data:data-spell"))
implementation(project(":domain:alternative-source:data"))
implementation(project(":domain:monster:data"))
implementation(project(":domain:monster-folder:data"))
implementation(project(":domain:monster-lore:data"))
implementation(project(":domain:settings:data"))
implementation(project(":domain:spell:data"))
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.serialization)
implementation(libs.koin.core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
api(project(":domain:monster"))
api(project(":domain:monster:core"))
implementation(libs.koin.core)
implementation(libs.kotlin.coroutines.core)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@

package br.alexandregpereira.hunter.monster.compendium.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "TableContentItem", exact = true)
data class TableContentItem(
val text: String,
val type: TableContentItemType,
val id: String = text
)

@ObjCName(name = "TableContentItemType", exact = true)
enum class TableContentItemType {
HEADER1, HEADER2, BODY
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":domain:monster"))
implementation(project(":domain:monster:core"))
implementation(libs.koin.core)
implementation(libs.kotlin.coroutines.core)
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":data:data-monster"))
implementation(project(":domain:monster-folder"))
implementation(project(":domain:monster:data"))
implementation(project(":domain:monster-folder:core"))
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.datetime)
implementation(libs.koin.core)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":domain:alternative-source"))
implementation(project(":domain:monster-lore"))
implementation(project(":domain:settings"))
implementation(project(":domain:alternative-source:core"))
implementation(project(":domain:monster-lore:core"))
implementation(project(":domain:settings:core"))
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.serialization)
implementation(libs.koin.core)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "AbilityDescription", exact = true)
data class AbilityDescription(
val name: String,
val description: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "AbilityScore", exact = true)
data class AbilityScore(
val type: AbilityScoreType,
val value: Int,
val modifier: Int
)

@ObjCName(name = "AbilityScoreType", exact = true)
enum class AbilityScoreType {
STRENGTH,
DEXTERITY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "Action", exact = true)
data class Action(
val damageDices: List<DamageDice>,
val attackBonus: Int?,
val abilityDescription: AbilityDescription
)

@ObjCName(name = "DamageDice", exact = true)
data class DamageDice(
val dice: String,
val damage: Damage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "Condition", exact = true)
data class Condition(
val index: String,
val type: ConditionType,
val name: String
)

@ObjCName(name = "ConditionType", exact = true)
enum class ConditionType {
BLINDED,
CHARMED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "Damage", exact = true)
data class Damage(
val index: String,
val type: DamageType,
val name: String
)

@ObjCName(name = "DamageType", exact = true)
enum class DamageType {
ACID,
BLUDGEONING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "MeasurementUnit", exact = true)
enum class MeasurementUnit(
val possibilities: List<String>,
val values: List<String>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
package br.alexandregpereira.hunter.domain.model

import br.alexandregpereira.hunter.domain.monster.spell.model.Spellcasting
import kotlin.native.ObjCName

@ObjCName(name = "Monster", exact = true)
data class Monster(
val index: String,
val name: String = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "MonsterAlternativeSource", exact = true)
data class MonsterAlternativeSource(
val source: MonsterSource,
val totalMonsters: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "MonsterImage", exact = true)
data class MonsterImage(
val monsterIndex: String,
val backgroundColor: Color,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "MonsterSource", exact = true)
data class MonsterSource(
val name: String,
val acronym: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "MonsterType", exact = true)
enum class MonsterType {
ABERRATION,
BEAST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "Proficiency", exact = true)
data class Proficiency(
val index: String,
val modifier: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "Speed", exact = true)
data class Speed(
val hover: Boolean,
val values: List<SpeedValue>,
)

@ObjCName(name = "SpeedValue", exact = true)
data class SpeedValue(
val type: SpeedType,
val valueFormatted: String
)

@ObjCName(name = "SpeedType", exact = true)
enum class SpeedType {
BURROW,
CLIMB,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.model

import kotlin.native.ObjCName

@ObjCName(name = "Stats", exact = true)
data class Stats(
val armorClass: Int = 0,
val hitPoints: Int = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@

package br.alexandregpereira.hunter.domain.monster.spell.model

import kotlin.native.ObjCName

@ObjCName(name = "SpellPreview", exact = true)
data class SpellPreview(
val index: String,
val name: String,
val level: Int,
val school: SchoolOfMagic,
)

@ObjCName(name = "SchoolOfMagic", exact = true)
enum class SchoolOfMagic {
ABJURATION,
CONJURATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.monster.spell.model

import kotlin.native.ObjCName

@ObjCName(name = "SpellUsage", exact = true)
data class SpellUsage(
val group: String,
val spells: List<SpellPreview>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package br.alexandregpereira.hunter.domain.monster.spell.model

import kotlin.native.ObjCName

@ObjCName(name = "Spellcasting", exact = true)
data class Spellcasting(
val description: String,
val type: SpellcastingType,
Expand Down
Loading

0 comments on commit 90d44b5

Please sign in to comment.