Skip to content

Commit 2e7e211

Browse files
authored
Merge pull request #32 from uswLectureEvaluation/refactor/modularize-domain
Refactor/modularize domain
2 parents ee3a7f5 + 76ca57c commit 2e7e211

File tree

400 files changed

+2744
-4566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+2744
-4566
lines changed

app-compose/build.gradle.kts

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,59 @@
1+
@Suppress("DSL_SCOPE_VIOLATION")
12
plugins {
2-
id("suwiki.android.application")
3-
id("suwiki.android.application.compose")
4-
id("suwiki.android.hilt")
3+
alias(libs.plugins.suwiki.android.application)
4+
alias(libs.plugins.suwiki.android.application.compose)
5+
alias(libs.plugins.suwiki.android.hilt)
56
}
67

78
android {
89
namespace = "com.kunize.uswtimetable"
910

1011
defaultConfig {
1112
applicationId = "com.kunize.uswtimetable"
12-
versionCode = 1
13-
versionName = "1.0"
13+
versionCode = 31
14+
versionName = "2.2.4"
1415
}
1516
}
1617

1718
dependencies {
18-
implementation(projects.core.database)
19+
implementation(projects.presentation)
20+
1921
implementation(projects.core.model)
22+
implementation(projects.core.common)
2023
implementation(projects.core.network)
2124
implementation(projects.core.security)
25+
implementation(projects.core.database)
26+
27+
implementation(projects.remote.openmajor)
28+
implementation(projects.remote.timetable)
29+
implementation(projects.remote.lectureevaluation.viewerreporter)
30+
implementation(projects.remote.lectureevaluation.my)
31+
implementation(projects.remote.lectureevaluation.editor)
32+
implementation(projects.remote.signup)
33+
implementation(projects.remote.notice)
34+
implementation(projects.remote.user)
35+
36+
implementation(projects.local.openmajor)
37+
implementation(projects.local.timetable)
38+
implementation(projects.local.user)
2239

23-
implementation(projects.data)
2440
implementation(projects.data.openmajor)
2541
implementation(projects.data.timetable)
26-
implementation(projects.data.lectureevaluation.editor)
2742
implementation(projects.data.lectureevaluation.viewerreporter)
43+
implementation(projects.data.lectureevaluation.editor)
2844
implementation(projects.data.lectureevaluation.my)
2945
implementation(projects.data.user)
3046
implementation(projects.data.notice)
3147
implementation(projects.data.signup)
3248

33-
implementation(projects.domain)
34-
implementation(projects.di)
3549
implementation(projects.domain.openmajor)
36-
37-
implementation(projects.local.openmajor)
38-
implementation(projects.local.timetable)
39-
implementation(projects.local.user)
40-
41-
implementation(projects.remote.lectureevaluation.editor)
42-
implementation(projects.remote.lectureevaluation.my)
43-
implementation(projects.remote.lectureevaluation.viewerreporter)
44-
implementation(projects.remote.notice)
45-
implementation(projects.remote.openmajor)
46-
implementation(projects.remote.signup)
47-
implementation(projects.remote.timetable)
48-
implementation(projects.remote.user)
49-
50-
implementation(projects.presentation)
50+
implementation(projects.domain.user)
51+
implementation(projects.domain.signup)
52+
implementation(projects.domain.lectureevaluation.viewerreporter)
53+
implementation(projects.domain.lectureevaluation.my)
54+
implementation(projects.domain.lectureevaluation.editor)
55+
implementation(projects.domain.timetable)
56+
implementation(projects.domain.notice)
5157

5258
implementation(libs.timber)
5359
}
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
plugins {
2-
`kotlin-dsl`
2+
`kotlin-dsl`
33
}
44

55
group = "com.kunize.convention"
66

77
java {
8-
sourceCompatibility = JavaVersion.VERSION_17
9-
targetCompatibility = JavaVersion.VERSION_17
8+
sourceCompatibility = JavaVersion.VERSION_17
9+
targetCompatibility = JavaVersion.VERSION_17
1010
}
1111

1212
dependencies {
13-
compileOnly(libs.android.gradle.plugin)
14-
compileOnly(libs.kotlin.gradle.plugin)
15-
compileOnly(libs.ksp.gradle.plugin)
13+
compileOnly(libs.android.gradle.plugin)
14+
compileOnly(libs.kotlin.gradle.plugin)
15+
compileOnly(libs.ksp.gradle.plugin)
1616
}
1717

1818
gradlePlugin {
19-
plugins {
20-
register("androidApplication") {
21-
id = "suwiki.android.application"
22-
implementationClass = "AndroidApplicationConventionPlugin"
23-
}
24-
register("androidApplicationCompose") {
25-
id = "suwiki.android.application.compose"
26-
implementationClass = "AndroidApplicationComposeConventionPlugin"
27-
}
28-
register("androidLibrary") {
29-
id = "suwiki.android.library"
30-
implementationClass = "AndroidLibraryConventionPlugin"
31-
}
32-
register("androidLibraryCompose") {
33-
id = "suwiki.android.library.compose"
34-
implementationClass = "AndroidLibraryComposeConventionPlugin"
35-
}
36-
register("androidHilt") {
37-
id = "suwiki.android.hilt"
38-
implementationClass = "AndroidHiltConventionPlugin"
39-
}
40-
register("javaLibrary") {
41-
id = "suwiki.java.library"
42-
implementationClass = "JavaLibraryConventionPlugin"
43-
}
44-
register("featureCompose") {
45-
id = "suwiki.android.feature.compose"
46-
implementationClass = "FeatureComposeConventionPlugin"
47-
}
48-
register("remote") {
49-
id = "suwiki.android.remote"
50-
implementationClass = "RemoteConventionPlugin"
51-
}
52-
register("data") {
53-
id = "suwiki.android.data"
54-
implementationClass = "DataConventionPlugin"
55-
}
19+
plugins {
20+
register("androidApplication") {
21+
id = "suwiki.android.application"
22+
implementationClass = "AndroidApplicationConventionPlugin"
5623
}
24+
register("androidApplicationCompose") {
25+
id = "suwiki.android.application.compose"
26+
implementationClass = "AndroidApplicationComposeConventionPlugin"
27+
}
28+
register("androidLibrary") {
29+
id = "suwiki.android.library"
30+
implementationClass = "AndroidLibraryConventionPlugin"
31+
}
32+
register("androidLibraryCompose") {
33+
id = "suwiki.android.library.compose"
34+
implementationClass = "AndroidLibraryComposeConventionPlugin"
35+
}
36+
register("androidHilt") {
37+
id = "suwiki.android.hilt"
38+
implementationClass = "AndroidHiltConventionPlugin"
39+
}
40+
register("javaLibrary") {
41+
id = "suwiki.java.library"
42+
implementationClass = "JavaLibraryConventionPlugin"
43+
}
44+
register("featureCompose") {
45+
id = "suwiki.android.feature.compose"
46+
implementationClass = "FeatureComposeConventionPlugin"
47+
}
48+
register("remote") {
49+
id = "suwiki.android.remote"
50+
implementationClass = "RemoteConventionPlugin"
51+
}
52+
register("data") {
53+
id = "suwiki.android.data"
54+
implementationClass = "DataConventionPlugin"
55+
}
56+
}
5757
}

build-logic/convention/src/main/java/AndroidApplicationComposeConventionPlugin.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import org.gradle.api.Project
55
import org.gradle.kotlin.dsl.getByType
66

77
class AndroidApplicationComposeConventionPlugin : Plugin<Project> {
8-
override fun apply(target: Project) {
9-
with(target) {
10-
pluginManager.apply("com.android.application")
11-
val extension = extensions.getByType<BaseAppModuleExtension>()
12-
configureAndroidCompose(extension)
13-
}
8+
override fun apply(target: Project) {
9+
with(target) {
10+
pluginManager.apply("com.android.application")
11+
val extension = extensions.getByType<BaseAppModuleExtension>()
12+
configureAndroidCompose(extension)
1413
}
14+
}
1515
}

build-logic/convention/src/main/java/AndroidApplicationConventionPlugin.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ import org.gradle.kotlin.dsl.configure
77

88
internal class AndroidApplicationConventionPlugin : Plugin<Project> {
99

10-
override fun apply(target: Project) {
11-
with(target) {
12-
with(pluginManager) {
13-
apply("com.android.application")
14-
apply("org.jetbrains.kotlin.android")
15-
}
10+
override fun apply(target: Project) {
11+
with(target) {
12+
with(pluginManager) {
13+
apply("com.android.application")
14+
apply("org.jetbrains.kotlin.android")
15+
}
1616

17-
extensions.configure<ApplicationExtension> {
18-
configureKotlinAndroid(this)
19-
defaultConfig.targetSdk = Const.targetSdk
20-
}
21-
}
17+
extensions.configure<ApplicationExtension> {
18+
configureKotlinAndroid(this)
19+
defaultConfig.targetSdk = Const.targetSdk
20+
}
2221
}
22+
}
2323
}

build-logic/convention/src/main/java/AndroidHiltConventionPlugin.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ import org.gradle.api.Project
44
import org.gradle.kotlin.dsl.dependencies
55

66
class AndroidHiltConventionPlugin : Plugin<Project> {
7-
override fun apply(target: Project) {
8-
with(target) {
9-
with(pluginManager) {
10-
apply("com.google.devtools.ksp")
11-
apply("dagger.hilt.android.plugin")
12-
}
7+
override fun apply(target: Project) {
8+
with(target) {
9+
with(pluginManager) {
10+
apply("com.google.devtools.ksp")
11+
apply("dagger.hilt.android.plugin")
12+
}
1313

14-
dependencies {
15-
"implementation"(libs.findLibrary("hilt.android").get())
16-
"ksp"(libs.findLibrary("hilt.compiler").get())
17-
"testImplementation"(libs.findLibrary("hilt.testing").get())
18-
"kspTest"(libs.findLibrary("hilt.testing.compiler").get())
19-
}
20-
}
14+
dependencies {
15+
"implementation"(libs.findLibrary("hilt.android").get())
16+
"ksp"(libs.findLibrary("hilt.compiler").get())
17+
"testImplementation"(libs.findLibrary("hilt.testing").get())
18+
"kspTest"(libs.findLibrary("hilt.testing.compiler").get())
19+
}
2120
}
21+
}
2222
}

build-logic/convention/src/main/java/AndroidLibraryComposeConventionPlugin.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import org.gradle.api.Project
55
import org.gradle.kotlin.dsl.configure
66

77
class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
8-
override fun apply(target: Project) {
9-
with(target) {
10-
with(pluginManager) {
11-
apply("com.android.library")
12-
}
8+
override fun apply(target: Project) {
9+
with(target) {
10+
with(pluginManager) {
11+
apply("com.android.library")
12+
}
1313

14-
extensions.configure<LibraryExtension> {
15-
configureAndroidCompose(this)
16-
}
17-
}
14+
extensions.configure<LibraryExtension> {
15+
configureAndroidCompose(this)
16+
}
1817
}
18+
}
1919
}

build-logic/convention/src/main/java/DataConventionPlugin.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ import org.gradle.kotlin.dsl.project
66

77
internal class DataConventionPlugin : Plugin<Project> {
88

9-
override fun apply(target: Project) {
10-
with(target) {
11-
with(pluginManager) {
12-
apply("suwiki.android.library")
13-
apply("suwiki.android.hilt")
14-
}
9+
override fun apply(target: Project) {
10+
with(target) {
11+
with(pluginManager) {
12+
apply("suwiki.android.library")
13+
apply("suwiki.android.hilt")
14+
}
1515

16-
dependencies {
17-
"implementation"(project(":core:model"))
16+
dependencies {
17+
"implementation"(project(":core:model"))
1818

19-
"implementation"(libs.findBundle("coroutine").get())
19+
"implementation"(libs.findBundle("coroutine").get())
2020

21-
"androidTestImplementation"(libs.findLibrary("junit").get())
22-
"implementation"(libs.findLibrary("timber").get())
23-
}
24-
}
21+
"androidTestImplementation"(libs.findLibrary("junit").get())
22+
"implementation"(libs.findLibrary("timber").get())
23+
}
2524
}
25+
}
2626
}

build-logic/convention/src/main/java/FeatureComposeConventionPlugin.kt

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,21 @@ import org.gradle.kotlin.dsl.dependencies
55

66
internal class FeatureComposeConventionPlugin : Plugin<Project> {
77

8-
override fun apply(target: Project) {
9-
with(target) {
10-
with(pluginManager) {
11-
apply("suwiki.android.library")
12-
apply("suwiki.android.library.compose")
13-
apply("suwiki.android.hilt")
14-
}
8+
override fun apply(target: Project) {
9+
with(target) {
10+
with(pluginManager) {
11+
apply("suwiki.android.library")
12+
apply("suwiki.android.library.compose")
13+
apply("suwiki.android.hilt")
14+
}
1515

16-
dependencies {
17-
"implementation"(project(":domain"))
18-
"implementation"(project(":core:designsystem"))
16+
dependencies {
17+
"implementation"(libs.findLibrary("kotlinx.coroutines.android").get())
18+
"implementation"(libs.findLibrary("kotlinx.coroutines.core").get())
1919

20-
"implementation"(libs.findLibrary("kotlinx.coroutines.android").get())
21-
"implementation"(libs.findLibrary("kotlinx.coroutines.core").get())
22-
23-
"androidTestImplementation"(libs.findLibrary("junit").get())
24-
"implementation"(libs.findLibrary("timber").get())
25-
}
26-
}
20+
"androidTestImplementation"(libs.findLibrary("junit").get())
21+
"implementation"(libs.findLibrary("timber").get())
22+
}
2723
}
24+
}
2825
}

0 commit comments

Comments
 (0)