From ec44387ce35d11b18eb7abad7dff39df1ea2834c Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 10 Aug 2024 10:48:31 +0900 Subject: [PATCH 01/48] =?UTF-8?q?chore:=20domain=20auth=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=20=EC=B6=94=EA=B0=80=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/sign/.gitignore | 1 + domain/sign/build.gradle.kts | 17 +++++++++++++++++ domain/sign/proguard-rules.pro | 21 +++++++++++++++++++++ domain/sign/src/main/AndroidManifest.xml | 2 ++ settings.gradle.kts | 1 + 5 files changed, 42 insertions(+) create mode 100644 domain/sign/.gitignore create mode 100644 domain/sign/build.gradle.kts create mode 100644 domain/sign/proguard-rules.pro create mode 100644 domain/sign/src/main/AndroidManifest.xml diff --git a/domain/sign/.gitignore b/domain/sign/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/domain/sign/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/sign/build.gradle.kts b/domain/sign/build.gradle.kts new file mode 100644 index 00000000..dd6b5d3a --- /dev/null +++ b/domain/sign/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + alias(libs.plugins.noffice.android.library) + alias(libs.plugins.noffice.android.hilt) + alias(libs.plugins.noffice.android.application.test) +} + +android { + namespace = "com.easyhz.noffice.domain.sign" +} + +dependencies { + api(projects.core.model) + implementation(projects.core.common) + implementation(projects.data.auth) + implementation(libs.googleid) + implementation(libs.gms.play.services.auth) +} \ No newline at end of file diff --git a/domain/sign/proguard-rules.pro b/domain/sign/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/domain/sign/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/domain/sign/src/main/AndroidManifest.xml b/domain/sign/src/main/AndroidManifest.xml new file mode 100644 index 00000000..568741e5 --- /dev/null +++ b/domain/sign/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index c115dfe8..90d46289 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -43,3 +43,4 @@ include(":domain:my-page") include(":domain:notification") include(":core:model") include(":feature:sign") +include(":domain:sign") From 9ee2a4e5e9e1fbc7891f330a4114a79382d63e22 Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 10 Aug 2024 10:49:25 +0900 Subject: [PATCH 02/48] =?UTF-8?q?chore:=20=EB=94=94=EB=A0=89=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../noffice/core/network/converter/ErrorResponseConverter.kt | 2 +- .../core/network/model/response/{ => base}/BaseResponse.kt | 2 +- .../core/network/model/response/{ => base}/ErrorResponse.kt | 2 +- .../java/com/easyhz/noffice/core/network/util/NofficeResult.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename core/network/src/main/java/com/easyhz/noffice/core/network/model/response/{ => base}/BaseResponse.kt (71%) rename core/network/src/main/java/com/easyhz/noffice/core/network/model/response/{ => base}/ErrorResponse.kt (68%) diff --git a/core/network/src/main/java/com/easyhz/noffice/core/network/converter/ErrorResponseConverter.kt b/core/network/src/main/java/com/easyhz/noffice/core/network/converter/ErrorResponseConverter.kt index a465e5c6..0baf0e67 100644 --- a/core/network/src/main/java/com/easyhz/noffice/core/network/converter/ErrorResponseConverter.kt +++ b/core/network/src/main/java/com/easyhz/noffice/core/network/converter/ErrorResponseConverter.kt @@ -1,6 +1,6 @@ package com.easyhz.noffice.core.network.converter -import com.easyhz.noffice.core.network.model.response.ErrorResponse +import com.easyhz.noffice.core.network.model.response.base.ErrorResponse import com.google.gson.Gson class ErrorResponseConverter constructor( diff --git a/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/BaseResponse.kt b/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/base/BaseResponse.kt similarity index 71% rename from core/network/src/main/java/com/easyhz/noffice/core/network/model/response/BaseResponse.kt rename to core/network/src/main/java/com/easyhz/noffice/core/network/model/response/base/BaseResponse.kt index 70fc9ef0..7b1e4543 100644 --- a/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/BaseResponse.kt +++ b/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/base/BaseResponse.kt @@ -1,4 +1,4 @@ -package com.easyhz.noffice.core.network.model.response +package com.easyhz.noffice.core.network.model.response.base data class BaseResponse ( diff --git a/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/ErrorResponse.kt b/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/base/ErrorResponse.kt similarity index 68% rename from core/network/src/main/java/com/easyhz/noffice/core/network/model/response/ErrorResponse.kt rename to core/network/src/main/java/com/easyhz/noffice/core/network/model/response/base/ErrorResponse.kt index 482a49a0..268d4f7e 100644 --- a/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/ErrorResponse.kt +++ b/core/network/src/main/java/com/easyhz/noffice/core/network/model/response/base/ErrorResponse.kt @@ -1,4 +1,4 @@ -package com.easyhz.noffice.core.network.model.response +package com.easyhz.noffice.core.network.model.response.base data class ErrorResponse( val timestamp: String, diff --git a/core/network/src/main/java/com/easyhz/noffice/core/network/util/NofficeResult.kt b/core/network/src/main/java/com/easyhz/noffice/core/network/util/NofficeResult.kt index 15c3db65..63de42f1 100644 --- a/core/network/src/main/java/com/easyhz/noffice/core/network/util/NofficeResult.kt +++ b/core/network/src/main/java/com/easyhz/noffice/core/network/util/NofficeResult.kt @@ -2,7 +2,7 @@ package com.easyhz.noffice.core.network.util import com.easyhz.noffice.core.common.error.NofficeError import com.easyhz.noffice.core.common.error.getErrorByStatusCode -import com.easyhz.noffice.core.network.model.response.BaseResponse +import com.easyhz.noffice.core.network.model.response.base.BaseResponse typealias NofficeResult = kotlin.Result> From 4cd3ec5f4a324175116eb34ae7a033cf6e56799a Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 10 Aug 2024 10:49:49 +0900 Subject: [PATCH 03/48] =?UTF-8?q?chore:=20=EB=AA=A8=EB=93=88=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 4 ++++ data/auth/build.gradle.kts | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1d8cdd49..c61002ef 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -51,7 +51,11 @@ dependencies { implementation(projects.core.network) implementation(projects.core.model) + implementation(projects.data.organization) + implementation(projects.data.auth) + implementation(projects.domain.home) + implementation(projects.domain.sign) implementation(projects.feature.announcement) implementation(projects.feature.home) diff --git a/data/auth/build.gradle.kts b/data/auth/build.gradle.kts index 94a22e45..ac80e852 100644 --- a/data/auth/build.gradle.kts +++ b/data/auth/build.gradle.kts @@ -1,14 +1,40 @@ +import java.util.Properties + plugins { alias(libs.plugins.noffice.android.library) alias(libs.plugins.noffice.android.hilt) alias(libs.plugins.noffice.android.application.test) } +val localProperties = Properties() +localProperties.load(project.rootProject.file("local.properties").inputStream()) android { namespace = "com.easyhz.noffice.data.auth" + buildTypes { + debug { + buildConfigField( + "String", + "GOOGLE_CLIENT_ID", + localProperties["google.client.id"].toString() + ) + } + release { +// buildConfigField("String", "GOOGLE_CLIENT_ID", localProperties["google.client.id"].toString()) + } + } + buildFeatures { + buildConfig = true + } } dependencies { + implementation(projects.core.common) + implementation(projects.core.network) + implementation(projects.core.model) + + implementation(libs.googleid) + implementation(libs.gms.play.services.auth) + runtimeOnly(libs.androidx.credentials.play.services.auth) } \ No newline at end of file From 7c99d2d2d9a8abee557e1e6315f092c163e8a546 Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 10 Aug 2024 10:50:01 +0900 Subject: [PATCH 04/48] =?UTF-8?q?chore:=20=EB=AA=A8=EB=93=88=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feature/sign/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feature/sign/build.gradle.kts b/feature/sign/build.gradle.kts index 2003e5a5..c772caac 100644 --- a/feature/sign/build.gradle.kts +++ b/feature/sign/build.gradle.kts @@ -12,6 +12,7 @@ android { dependencies { implementation(projects.core.designSystem) implementation(projects.core.common) - + implementation(projects.domain.sign) implementation(libs.googleid) + implementation(libs.gms.play.services.auth) } \ No newline at end of file From 63ae9107d6d0b48bf861718f0bc3ab3b43cc4572 Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 10 Aug 2024 10:50:26 +0900 Subject: [PATCH 05/48] =?UTF-8?q?chore:=20auth=20=EB=AA=A8=EB=93=88=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/sign/ExampleInstrumentedTest.kt | 24 +++++++++++++++++++ .../noffice/domain/sign/ExampleUnitTest.kt | 17 +++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 domain/sign/src/androidTest/java/com/easyhz/noffice/domain/sign/ExampleInstrumentedTest.kt create mode 100644 domain/sign/src/test/java/com/easyhz/noffice/domain/sign/ExampleUnitTest.kt diff --git a/domain/sign/src/androidTest/java/com/easyhz/noffice/domain/sign/ExampleInstrumentedTest.kt b/domain/sign/src/androidTest/java/com/easyhz/noffice/domain/sign/ExampleInstrumentedTest.kt new file mode 100644 index 00000000..cbd087f5 --- /dev/null +++ b/domain/sign/src/androidTest/java/com/easyhz/noffice/domain/sign/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.easyhz.noffice.domain.sign + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.easyhz.noffice.domain.sign", appContext.packageName) + } +} \ No newline at end of file diff --git a/domain/sign/src/test/java/com/easyhz/noffice/domain/sign/ExampleUnitTest.kt b/domain/sign/src/test/java/com/easyhz/noffice/domain/sign/ExampleUnitTest.kt new file mode 100644 index 00000000..a450780e --- /dev/null +++ b/domain/sign/src/test/java/com/easyhz/noffice/domain/sign/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.easyhz.noffice.domain.sign + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file From c67eb4d3b58765a973c75a84f73303e098435432 Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 10 Aug 2024 10:50:34 +0900 Subject: [PATCH 06/48] =?UTF-8?q?chore:=20=EB=9D=BC=EC=9D=B4=EB=B8=8C?= =?UTF-8?q?=EB=9F=AC=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/libs.versions.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5d1c98f4..c0b294f9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,6 @@ [versions] agp = "8.4.0" +credentialsPlayServicesAuth = "1.2.0-rc1" kotlin = "1.9.23" coreKtx = "1.13.1" junit = "4.13.2" @@ -31,9 +32,11 @@ googleid = "1.1.1" jsoup = "1.18.1" webkit = "1.11.0" material3 = "1.2.1" +playServicesAuth = "21.2.0" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } +androidx-credentials-play-services-auth = { module = "androidx.credentials:credentials-play-services-auth", version.ref = "credentialsPlayServicesAuth" } junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } @@ -74,6 +77,7 @@ calendar-compose = { group = "com.kizitonwose.calendar", name = "compose", versi googleid = { group = "com.google.android.libraries.identity.googleid", name = "googleid", version.ref = "googleid" } jsoup = { group ="org.jsoup", name ="jsoup", version.ref = "jsoup"} androidx-webkit = { group = "androidx.webkit", name = "webkit", version.ref = "webkit" } +gms-play-services-auth = { group = "com.google.android.gms", name = "play-services-auth", version.ref = "playServicesAuth"} [plugins] android-application = { id = "com.android.application", version.ref = "agp" } From 0da2b57a5d6d4f5fa4ed3d024afd06035d480a4a Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 10 Aug 2024 10:52:53 +0900 Subject: [PATCH 07/48] =?UTF-8?q?chore:=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/gradle.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 76d20e25..4955fb0e 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -41,6 +41,7 @@