diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..763fe79e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true +insert_final_newline = true +tab_width = 4 +disabled_rules = no-wildcard-imports,import-ordering,comment-spacing diff --git a/.github/workflows/pr_checker.yml b/.github/workflows/pr_checker.yml index aa88961c..1f1acd98 100644 --- a/.github/workflows/pr_checker.yml +++ b/.github/workflows/pr_checker.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Gradle cache + - name: Cache Gradle packages uses: actions/cache@v3 with: path: | @@ -28,13 +28,16 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - - name: set up JDK 17 + - name: Setup JDK 17 uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 17 - - name: Change gradlew permissions + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + + - name: Grant execute permission for gradlew run: chmod +x ./gradlew - name: Add Local Properties @@ -43,9 +46,21 @@ jobs: run: | echo auth.base.url=$AUTH_BASE_URL >> ./local.properties +# - name: Access Firebase Service +# run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json + - name: Build debug APK run: ./gradlew assembleDebug --stacktrace +# - name: Upload APK +# uses: actions/upload-artifact@v1 +# with: +# name: app +# path: app/build/outputs/apk/debug + + - name: Run ktlint + run: ./gradlew ktlintCheck + - name: On Success, Notify in Slack if: ${{ success() }} uses: rtCamp/action-slack-notify@v2 @@ -68,4 +83,4 @@ jobs: SLACK_TITLE: 'Winey checks have failed ๐Ÿšซ' MSG_MINIMAL: true SLACK_USERNAME: Winey Android - SLACK_MESSAGE: '๋ฒ„๊ทธ ์žก์ž ใ…‹ใ……ใ…‹' + SLACK_MESSAGE: '๋ฒ„๊ทธ ์žก์ž ๐Ÿ›' diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e5daafef..1ad6a88b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,13 +1,13 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties plugins { - id(Plugins.androidApplication) - id(Plugins.kotlinAndroid) - id(Plugins.kotlinParcelize) - id(Plugins.kotlinKapt) - id(Plugins.hiltPlugin) - id(Plugins.ossLicensesPlugin) - id(Plugins.kotlinSerialization) + id(ModulePlugins.androidApplication) + id(ModulePlugins.kotlinAndroid) + id(ModulePlugins.kotlinParcelize) + id(ModulePlugins.kotlinKapt) + id(ModulePlugins.kotlinSerialization) + id(ModulePlugins.hilt) + id(ModulePlugins.oss) } android { @@ -24,7 +24,7 @@ android { buildConfigField( "String", "AUTH_BASE_URL", - gradleLocalProperties(rootDir).getProperty("auth.base.url"), + gradleLocalProperties(rootDir).getProperty("auth.base.url") ) testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" @@ -94,7 +94,7 @@ dependencies { implementation(MaterialDesignDependencies.materialDesign) KaptDependencies.run { - kapt(hiltCompiler) + kapt(hiltAndroidCompiler) kapt(hiltWorkManagerCompiler) } @@ -117,4 +117,4 @@ dependencies { debugImplementation(flipperLeakCanary) debugImplementation(soloader) } -} \ No newline at end of file +} diff --git a/app/src/androidTest/java/com/android/go/sopt/winey/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/android/go/sopt/winey/ExampleInstrumentedTest.kt index 5e374d1d..8e1e59e8 100644 --- a/app/src/androidTest/java/com/android/go/sopt/winey/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/android/go/sopt/winey/ExampleInstrumentedTest.kt @@ -2,10 +2,8 @@ package com.android.go.sopt.winey 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.* /** @@ -21,4 +19,4 @@ class ExampleInstrumentedTest { val appContext = InstrumentationRegistry.getInstrumentation().targetContext assertEquals("com.android.go.sopt.winey", appContext.packageName) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/WineyApplication.kt b/app/src/main/java/com/android/go/sopt/winey/WineyApplication.kt index b0f3bbb2..3d63fb04 100644 --- a/app/src/main/java/com/android/go/sopt/winey/WineyApplication.kt +++ b/app/src/main/java/com/android/go/sopt/winey/WineyApplication.kt @@ -10,4 +10,4 @@ class WineyApplication : Application() { super.onCreate() if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree()) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/data/interceptor/AuthInterceptor.kt b/app/src/main/java/com/android/go/sopt/winey/data/interceptor/AuthInterceptor.kt index 96dfaa7b..a0614057 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/interceptor/AuthInterceptor.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/interceptor/AuthInterceptor.kt @@ -6,7 +6,6 @@ import okhttp3.Interceptor import okhttp3.Response import javax.inject.Inject - class AuthInterceptor @Inject constructor( @ApplicationContext context: Context ) : Interceptor { @@ -24,4 +23,4 @@ class AuthInterceptor @Inject constructor( private const val HEADER_TOKEN = "userId" const val USER_ID = "24" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestCreateGoalDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestCreateGoalDto.kt index 4002410f..4eab318c 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestCreateGoalDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestCreateGoalDto.kt @@ -6,7 +6,7 @@ import kotlinx.serialization.Serializable @Serializable data class RequestCreateGoalDto( @SerialName("targetMoney") - val targetMoney : Int, + val targetMoney: Int, @SerialName("targetDay") - val targetDay : Int, + val targetDay: Int ) diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestPostLikeDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestPostLikeDto.kt index c46d30d3..654e74c6 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestPostLikeDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/request/RequestPostLikeDto.kt @@ -6,5 +6,5 @@ import kotlinx.serialization.Serializable @Serializable data class RequestPostLikeDto( @SerialName("feedLike") - val feedLike : Boolean + val feedLike: Boolean ) diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseCreateGoalDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseCreateGoalDto.kt index cf05ee03..bd521fae 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseCreateGoalDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseCreateGoalDto.kt @@ -7,14 +7,14 @@ import kotlinx.serialization.Serializable @Serializable data class ResponseCreateGoalDto( @SerialName("userId") - val userId : Int, + val userId: Int, @SerialName("targetMoney") - val targetMoney : Long, + val targetMoney: Long, @SerialName("targetDate") val targetDate: String, @SerialName("createdAt") - val createdAt: String, -){ + val createdAt: String +) { fun toGoal(): Goal { val data = this diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseDeleteWineyFeedDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseDeleteWineyFeedDto.kt index 1c1454d3..d9b6d7d5 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseDeleteWineyFeedDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseDeleteWineyFeedDto.kt @@ -4,4 +4,4 @@ data class ResponseDeleteWineyFeedDto( val code: Int, val data: Any, val message: String -) \ No newline at end of file +) diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetRecommendListDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetRecommendListDto.kt index ec48f2d5..83823417 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetRecommendListDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetRecommendListDto.kt @@ -18,7 +18,7 @@ data class ResponseGetRecommendListDto( @SerialName("currentPageIndex") val currentPageIndex: Int, @SerialName("isEnd") - val isEnd: Boolean, + val isEnd: Boolean ) @Serializable @@ -46,7 +46,7 @@ data class ResponseGetRecommendListDto( title = it.recommendTitle ?: "", subtitle = it.recommendSubTitle ?: "", discount = it.recommendDiscount ?: "", - image = it.recommendImage ?: "", + image = it.recommendImage ?: "" ) } } diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetUserDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetUserDto.kt index 973d80e1..7fd12599 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetUserDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetUserDto.kt @@ -55,4 +55,4 @@ data class ResponseGetUserDto( isAttained = data.userResponseGoalDto?.isAttained ?: false ) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetWineyFeedListDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetWineyFeedListDto.kt index 338d2dfc..9f3647fa 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetWineyFeedListDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponseGetWineyFeedListDto.kt @@ -69,4 +69,4 @@ data class ResponseGetWineyFeedListDto( totalPageSize = data.pageResponseDto.totalPageSize ) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostLikeDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostLikeDto.kt index 698e9c5a..f7465772 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostLikeDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostLikeDto.kt @@ -27,4 +27,4 @@ data class ResponsePostLikeDto( val likeData = Like.Data(data.feedId, data.isLiked, data.likes) return Like(code, likeData, message) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostWineyFeedDto.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostWineyFeedDto.kt index 0ef1c2a5..f94be386 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostWineyFeedDto.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/ResponsePostWineyFeedDto.kt @@ -10,4 +10,4 @@ data class ResponsePostWineyFeedDto( val feedId: Int, @SerialName("createdAt") val createdAt: LocalDateTime -) \ No newline at end of file +) diff --git a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/base/BaseResponse.kt b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/base/BaseResponse.kt index 1d7ad312..062c67db 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/base/BaseResponse.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/model/remote/response/base/BaseResponse.kt @@ -10,5 +10,5 @@ data class BaseResponse( @SerialName("message") val message: String, @SerialName("data") - val data: T? = null, -) \ No newline at end of file + val data: T? = null +) diff --git a/app/src/main/java/com/android/go/sopt/winey/data/repository/AuthRepositoryImpl.kt b/app/src/main/java/com/android/go/sopt/winey/data/repository/AuthRepositoryImpl.kt index 9b875215..7bb59e9e 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/repository/AuthRepositoryImpl.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/repository/AuthRepositoryImpl.kt @@ -33,7 +33,6 @@ class AuthRepositoryImpl @Inject constructor( response.toWineyFeed() } - override suspend fun postWineyFeed( file: MultipartBody.Part?, requestMap: HashMap @@ -49,7 +48,7 @@ class AuthRepositoryImpl @Inject constructor( override suspend fun postFeedLike(feedId: Int, requestPostLikeDto: RequestPostLikeDto): Result = runCatching { - authDataSource.postFeedLike(feedId,requestPostLikeDto).toLike() + authDataSource.postFeedLike(feedId, requestPostLikeDto).toLike() } override suspend fun postCreateGoal(requestCreateGoalDto: RequestCreateGoalDto): Result = @@ -61,5 +60,4 @@ class AuthRepositoryImpl @Inject constructor( runCatching { authDataSource.getRecommendList(page).data!!.convertToRecommend() } - -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/data/service/AuthService.kt b/app/src/main/java/com/android/go/sopt/winey/data/service/AuthService.kt index 239c95c3..3f80455b 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/service/AuthService.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/service/AuthService.kt @@ -32,7 +32,7 @@ interface AuthService { @GET("feed/myFeed") suspend fun getMyFeedList( - @Query("page") page:Int + @Query("page") page: Int ): ResponseGetWineyFeedListDto @POST("feedLike/{feedId}") @@ -55,10 +55,11 @@ interface AuthService { @GET("recommend") suspend fun getRecommendList( - @Query("page") page:Int + @Query("page") page: Int ): BaseResponse + @DELETE("feed/{feedId}") suspend fun deleteFeed( @Path("feedId") feedId: Int ): BaseResponse -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/data/source/AuthDataSource.kt b/app/src/main/java/com/android/go/sopt/winey/data/source/AuthDataSource.kt index c75541a4..c338870c 100644 --- a/app/src/main/java/com/android/go/sopt/winey/data/source/AuthDataSource.kt +++ b/app/src/main/java/com/android/go/sopt/winey/data/source/AuthDataSource.kt @@ -37,8 +37,8 @@ class AuthDataSource @Inject constructor( suspend fun postCreateGoal(requestCreateGoalDto: RequestCreateGoalDto): BaseResponse = authService.postCreateGoal(requestCreateGoalDto) - suspend fun getRecommendList(page: Int) : BaseResponse = + suspend fun getRecommendList(page: Int): BaseResponse = authService.getRecommendList(page) suspend fun deleteFeed(feedId: Int): BaseResponse = authService.deleteFeed(feedId) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/di/RepositoryModule.kt b/app/src/main/java/com/android/go/sopt/winey/di/RepositoryModule.kt index 36b523c8..83cfaadc 100644 --- a/app/src/main/java/com/android/go/sopt/winey/di/RepositoryModule.kt +++ b/app/src/main/java/com/android/go/sopt/winey/di/RepositoryModule.kt @@ -16,4 +16,4 @@ abstract class RepositoryModule { abstract fun bindsAuthRepository( authRepository: AuthRepositoryImpl ): AuthRepository -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/di/RetrofitModule.kt b/app/src/main/java/com/android/go/sopt/winey/di/RetrofitModule.kt index 1e963cd3..584f4587 100644 --- a/app/src/main/java/com/android/go/sopt/winey/di/RetrofitModule.kt +++ b/app/src/main/java/com/android/go/sopt/winey/di/RetrofitModule.kt @@ -45,13 +45,13 @@ object RetrofitModule { @Provides @Singleton @Auth - fun provideAuthInterceptor (interceptor: AuthInterceptor): Interceptor = interceptor + fun provideAuthInterceptor(interceptor: AuthInterceptor): Interceptor = interceptor @Provides @Singleton fun provideOkHttpClient( @Logger loggingInterceptor: Interceptor, - @Auth authInterceptor: Interceptor, + @Auth authInterceptor: Interceptor ): OkHttpClient = OkHttpClient.Builder() .addInterceptor(loggingInterceptor) .addInterceptor(authInterceptor) @@ -61,10 +61,10 @@ object RetrofitModule { @Singleton fun provideRetrofit( client: OkHttpClient, - factory: Converter.Factory, + factory: Converter.Factory ): Retrofit = Retrofit.Builder() .baseUrl(AUTH_BASE_URL) .client(client) .addConverterFactory(factory) .build() -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/di/ServiceModule.kt b/app/src/main/java/com/android/go/sopt/winey/di/ServiceModule.kt index 63d12751..e13a6d8e 100644 --- a/app/src/main/java/com/android/go/sopt/winey/di/ServiceModule.kt +++ b/app/src/main/java/com/android/go/sopt/winey/di/ServiceModule.kt @@ -15,4 +15,4 @@ object ServiceModule { @Singleton fun provideAuthService(retrofit: Retrofit): AuthService = retrofit.create(AuthService::class.java) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/di/qualifier/InterceptorQualifier.kt b/app/src/main/java/com/android/go/sopt/winey/di/qualifier/InterceptorQualifier.kt index 9d51847a..5c6abb85 100644 --- a/app/src/main/java/com/android/go/sopt/winey/di/qualifier/InterceptorQualifier.kt +++ b/app/src/main/java/com/android/go/sopt/winey/di/qualifier/InterceptorQualifier.kt @@ -4,8 +4,8 @@ import javax.inject.Qualifier @Qualifier @Retention(AnnotationRetention.BINARY) -annotation class Logger +annotation class Logger @Qualifier @Retention(AnnotationRetention.BINARY) -annotation class Auth \ No newline at end of file +annotation class Auth diff --git a/app/src/main/java/com/android/go/sopt/winey/domain/entity/Goal.kt b/app/src/main/java/com/android/go/sopt/winey/domain/entity/Goal.kt index 9f0ed9ce..f6b38438 100644 --- a/app/src/main/java/com/android/go/sopt/winey/domain/entity/Goal.kt +++ b/app/src/main/java/com/android/go/sopt/winey/domain/entity/Goal.kt @@ -2,5 +2,5 @@ package com.android.go.sopt.winey.domain.entity data class Goal( val userId: Int, - val targetMoney: Long, + val targetMoney: Long ) diff --git a/app/src/main/java/com/android/go/sopt/winey/domain/entity/Like.kt b/app/src/main/java/com/android/go/sopt/winey/domain/entity/Like.kt index 80b880b6..838d5455 100644 --- a/app/src/main/java/com/android/go/sopt/winey/domain/entity/Like.kt +++ b/app/src/main/java/com/android/go/sopt/winey/domain/entity/Like.kt @@ -10,4 +10,4 @@ data class Like( val isLiked: Boolean, val likes: Int ) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/domain/entity/Recommend.kt b/app/src/main/java/com/android/go/sopt/winey/domain/entity/Recommend.kt index f853e49d..b693c471 100644 --- a/app/src/main/java/com/android/go/sopt/winey/domain/entity/Recommend.kt +++ b/app/src/main/java/com/android/go/sopt/winey/domain/entity/Recommend.kt @@ -6,5 +6,5 @@ data class Recommend( val title: String, val subtitle: String, val discount: String, - val image: String, + val image: String ) diff --git a/app/src/main/java/com/android/go/sopt/winey/domain/entity/WineyFeed.kt b/app/src/main/java/com/android/go/sopt/winey/domain/entity/WineyFeed.kt index a089ad1a..50f95855 100644 --- a/app/src/main/java/com/android/go/sopt/winey/domain/entity/WineyFeed.kt +++ b/app/src/main/java/com/android/go/sopt/winey/domain/entity/WineyFeed.kt @@ -1,7 +1,6 @@ package com.android.go.sopt.winey.domain.entity - -data class WineyFeed ( +data class WineyFeed( val feedId: Int, val feedImage: String, val feedMoney: Long, @@ -12,4 +11,4 @@ data class WineyFeed ( val userId: Int, val writerLevel: Int, val totalPageSize: Int -) \ No newline at end of file +) diff --git a/app/src/main/java/com/android/go/sopt/winey/domain/repository/AuthRepository.kt b/app/src/main/java/com/android/go/sopt/winey/domain/repository/AuthRepository.kt index 9d52dda4..13c4e00a 100644 --- a/app/src/main/java/com/android/go/sopt/winey/domain/repository/AuthRepository.kt +++ b/app/src/main/java/com/android/go/sopt/winey/domain/repository/AuthRepository.kt @@ -29,4 +29,4 @@ interface AuthRepository { suspend fun getRecommendList(page: Int): Result> suspend fun deleteFeed(feedId: Int): Result -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainActivity.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainActivity.kt index fd8c2dfa..48cb046e 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainActivity.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainActivity.kt @@ -40,4 +40,4 @@ class MainActivity : BindingActivity(R.layout.activity_main replace(R.id.fcv_main, T::class.simpleName) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainViewModel.kt index 8f93d43a..2792204a 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/MainViewModel.kt @@ -15,8 +15,8 @@ import javax.inject.Inject @HiltViewModel class MainViewModel @Inject constructor( - private val authRepository: AuthRepository, -) : ViewModel(){ + private val authRepository: AuthRepository +) : ViewModel() { private val _getUserState = MutableLiveData>(UiState.Loading) val getUserState: LiveData> get() = _getUserState @@ -42,4 +42,4 @@ class MainViewModel @Inject constructor( } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedAdapter.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedAdapter.kt index 6a2c1bd4..4b546dce 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedAdapter.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedAdapter.kt @@ -68,8 +68,11 @@ class WineyFeedAdapter( val index = currentList.indexOfFirst { it.feedId == feedId } if (index != -1) { currentList[index].isLiked = isLiked - if (isLiked) currentList[index].likes++ - else currentList[index].likes-- + if (isLiked) { + currentList[index].likes++ + } else { + currentList[index].likes-- + } notifyItemChanged(index) } } @@ -80,4 +83,4 @@ class WineyFeedAdapter( onContentsTheSame = { old, new -> old == new } ) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedDialogFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedDialogFragment.kt index 211cd7da..e96851ee 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedDialogFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedDialogFragment.kt @@ -25,7 +25,6 @@ class WineyFeedDialogFragment : } } - private fun navigateToMyPage() { parentFragmentManager.commit { replace(R.id.fcv_main, MyPageFragment()) @@ -36,4 +35,4 @@ class WineyFeedDialogFragment : private const val TAG_WINEYFEED_DIALOG = "NO_GOAL_DIALOG" private const val MSG_WINEYFEED_ERROR = "ERROR" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedFragment.kt index ccfe4c62..d49d012c 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedFragment.kt @@ -63,7 +63,9 @@ class WineyFeedFragment : BindingFragment(R.layout.fra val menuReport = popupMenu.menu.findItem(R.id.menu_report) if (wineyFeed.userId == AuthInterceptor.USER_ID.toInt()) { menuReport.isVisible = false - } else menuDelete.isVisible = false + } else { + menuDelete.isVisible = false + } popupMenu.setOnMenuItemClickListener { menuItem -> when (menuItem.itemId) { R.id.menu_delete -> { @@ -157,7 +159,9 @@ class WineyFeedFragment : BindingFragment(R.layout.fra if (data.isOver) { wineyFeedDialogFragment = WineyFeedDialogFragment() wineyFeedDialogFragment.show(parentFragmentManager, TAG_WINEYFEED_DIALOG) - } else navigateToUpload() + } else { + navigateToUpload() + } } private fun setListWithInfiniteScroll() { @@ -191,4 +195,4 @@ class WineyFeedFragment : BindingFragment(R.layout.fra private const val MSG_WINEYFEED_ERROR = "ERROR" private const val MAX_FEED_VER_PAGE = 10 } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedHeaderAdapter.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedHeaderAdapter.kt index 02653c80..0202cc28 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedHeaderAdapter.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/WineyFeedHeaderAdapter.kt @@ -8,8 +8,8 @@ import com.android.go.sopt.winey.databinding.ItemWineyfeedHeaderBinding class WineyFeedHeaderAdapter : RecyclerView.Adapter() { class HeaderViewHolder( - private val binding: ItemWineyfeedHeaderBinding, - ) : RecyclerView.ViewHolder(binding.root) {} + private val binding: ItemWineyfeedHeaderBinding + ) : RecyclerView.ViewHolder(binding.root) override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HeaderViewHolder { val binding = @@ -21,9 +21,9 @@ class WineyFeedHeaderAdapter : RecyclerView.Adapter UiState.Failure(t.message()) - else -> _deleteMyFeedState.value = - UiState.Failure(t.message()) + else -> + _deleteMyFeedState.value = + UiState.Failure(t.message()) } } Timber.e("$MSG_WINEYFEED_FAIL} : ${t.code()} : ${t.message()}") @@ -116,7 +115,9 @@ class WineyFeedViewModel @Inject constructor( if (state.isEmpty()) { totalPage = 0 isPagingFinished = true - } else totalPage = currentMutableList[0].totalPageSize + } else { + totalPage = currentMutableList[0].totalPageSize + } val updatedList = currentMutableList.toList() _getWineyFeedListState.value = UiState.Success(updatedList) } @@ -145,4 +146,4 @@ class WineyFeedViewModel @Inject constructor( private const val CODE_WINEYFEED_INVALID_REQUEST = 400 private const val MSG_WINEYFEED_FAIL = "FAIL" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadActivity.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadActivity.kt index 9956c98a..f1806882 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadActivity.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadActivity.kt @@ -19,4 +19,4 @@ class UploadActivity : BindingActivity(R.layout.activity_ } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadViewModel.kt index f25e0ae2..d274ec4f 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/UploadViewModel.kt @@ -2,6 +2,4 @@ package com.android.go.sopt.winey.presentation.main.feed.upload import androidx.lifecycle.ViewModel -class UploadViewModel : ViewModel() { - -} \ No newline at end of file +class UploadViewModel : ViewModel() diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountFragment.kt index de20c246..10bf5694 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountFragment.kt @@ -70,7 +70,6 @@ class AmountFragment : BindingFragment(R.layout.fragment_ } else -> { - } } } @@ -137,4 +136,4 @@ class AmountFragment : BindingFragment(R.layout.fragment_ private const val ARGS_CONTENT_KEY = "content" private const val EXTRA_AMOUNT_KEY = "amount" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountViewModel.kt index 66d43885..86650dad 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/amount/AmountViewModel.kt @@ -35,8 +35,8 @@ class AmountViewModel @Inject constructor( get() = _postWineyFeedState private fun validateAmount(amount: String): Boolean { - if(amount.isBlank()) return false - if(!amount.contains(",")) return true // ์ตœ๋Œ€ 999 + if (amount.isBlank()) return false + if (!amount.contains(",")) return true // ์ตœ๋Œ€ 999 val amountNumber = amount.removeComma().toLong() return amountNumber in MIN_AMOUNT..MAX_AMOUNT @@ -89,4 +89,4 @@ class AmountViewModel @Inject constructor( private const val FEED_TITLE_KEY = "feedTitle" private const val FEED_MONEY_KEY = "feedMoney" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentFragment.kt index b047c6e3..6bdf830e 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentFragment.kt @@ -64,4 +64,4 @@ class ContentFragment : BindingFragment(R.layout.fragmen private const val PHOTO_KEY = "photo" private const val CONTENT_KEY = "content" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentViewModel.kt index 02d6daec..07764a95 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/content/ContentViewModel.kt @@ -9,7 +9,7 @@ class ContentViewModel : ViewModel() { val _content = MutableLiveData() val content: String get() = _content.value ?: "" - val isValidContent : LiveData = _content.map { validateLength(it) } + val isValidContent: LiveData = _content.map { validateLength(it) } private fun validateLength(content: String): Boolean = content.length in MIN_CONTENT_LENGTH..MAX_CONTENT_LENGTH @@ -18,4 +18,4 @@ class ContentViewModel : ViewModel() { const val MIN_CONTENT_LENGTH = 6 const val MAX_CONTENT_LENGTH = 36 } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/loading/LoadingActivity.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/loading/LoadingActivity.kt index 3a9405a4..e84e59f1 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/loading/LoadingActivity.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/loading/LoadingActivity.kt @@ -54,4 +54,4 @@ class LoadingActivity : BindingActivity(R.layout.activit private const val DELAY_TIME = 3000L private const val EXTRA_AMOUNT_KEY = "amount" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoFragment.kt index fb792056..0bb0eca5 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoFragment.kt @@ -72,4 +72,4 @@ class PhotoFragment : BindingFragment(R.layout.fragment_ph companion object { private const val PHOTO_KEY = "photo" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoViewModel.kt index eb7fa192..f2b1d145 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/feed/upload/photo/PhotoViewModel.kt @@ -19,4 +19,4 @@ class PhotoViewModel : ViewModel() { fun updateImageUri(imageUri: Uri) { _imageUri.value = imageUri } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageDialogFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageDialogFragment.kt index dd7d7652..0075c959 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageDialogFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageDialogFragment.kt @@ -26,4 +26,4 @@ class MyPageDialogFragment : this.dismiss() } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageFragment.kt index e249e32e..69433057 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MyPageFragment.kt @@ -63,7 +63,6 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ when (state) { is UiState.Loading -> { - } is UiState.Success -> { @@ -72,11 +71,9 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ } is UiState.Failure -> { - } is UiState.Empty -> { - } } } @@ -117,7 +114,6 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ binding.targetMoney = data binding.dday = data } - } } when (data.userLevel) { @@ -141,7 +137,6 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ binding.ivMypageProfile.setImageResource(R.drawable.ic_mypage_lv4_profile) } } - } private inline fun navigateTo() { @@ -159,4 +154,4 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ private const val LEVEL_NOBLESS = "๊ท€์กฑ" private const val LEVEL_KING = "ํ™ฉ์ œ" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MypageHelpActivity.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MypageHelpActivity.kt index 4b8ae2a2..04f93171 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MypageHelpActivity.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/MypageHelpActivity.kt @@ -23,4 +23,4 @@ class MypageHelpActivity : finish() } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountBottomSheetFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountBottomSheetFragment.kt index 6f180570..e5bf3665 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountBottomSheetFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountBottomSheetFragment.kt @@ -22,7 +22,9 @@ import java.text.DecimalFormat @AndroidEntryPoint class TargetAmountBottomSheetFragment : - BindingBottomSheetDialogFragment(R.layout.fragment_target_amount_bottom_sheet) { + BindingBottomSheetDialogFragment( + R.layout.fragment_target_amount_bottom_sheet + ) { private val viewModel by viewModels() private val mainViewModel by activityViewModels() override fun onStart() { @@ -54,7 +56,6 @@ class TargetAmountBottomSheetFragment : viewModel.createGoalState.observe(viewLifecycleOwner) { when (it) { is UiState.Loading -> { - } is UiState.Success -> { @@ -63,11 +64,9 @@ class TargetAmountBottomSheetFragment : } is UiState.Failure -> { - } is UiState.Empty -> { - } } } @@ -75,7 +74,6 @@ class TargetAmountBottomSheetFragment : fun initCancelButtonClickListener() { binding.btnTargetAmountCancel.setOnClickListener { - this.dismiss() } } @@ -266,4 +264,4 @@ class TargetAmountBottomSheetFragment : parent.setBackgroundColor(Color.TRANSPARENT) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountViewModel.kt index 08959e98..c89ef5e5 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/TargetAmountViewModel.kt @@ -16,7 +16,7 @@ import javax.inject.Inject @HiltViewModel class TargetAmountViewModel @Inject constructor( - private val authRepository: AuthRepository, + private val authRepository: AuthRepository ) : ViewModel() { val _amount = MutableLiveData() val amount: LiveData = _amount @@ -84,4 +84,4 @@ class TargetAmountViewModel @Inject constructor( companion object { const val MAX_AMOUNT_LENGTH = 12 } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedAdapter.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedAdapter.kt index 2c445c90..b658c81a 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedAdapter.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedAdapter.kt @@ -12,7 +12,6 @@ import com.android.go.sopt.winey.domain.entity.WineyFeed import com.android.go.sopt.winey.util.view.ItemDiffCallback import com.android.go.sopt.winey.util.view.setOnSingleClickListener - class MyFeedAdapter( private val likeButtonClick: (feedId: Int, isLiked: Boolean) -> Unit, private val fragmentManager: FragmentManager, @@ -50,7 +49,6 @@ class MyFeedAdapter( } } - private fun setUserProfile(userLevel: Int): Int { return when (userLevel) { 1 -> R.drawable.img_wineyfeed_profile_1 @@ -90,8 +88,11 @@ class MyFeedAdapter( val index = currentList.indexOfFirst { it.feedId == feedId } if (index != -1) { currentList[index].isLiked = isLiked - if (isLiked) currentList[index].likes++ - else currentList[index].likes-- + if (isLiked) { + currentList[index].likes++ + } else { + currentList[index].likes-- + } notifyItemChanged(index) } } @@ -102,5 +103,4 @@ class MyFeedAdapter( ) private const val TAG_WINEYFEED_DIALOG = "NO_GOAL_DIALOG" } - -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteHighDialogFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteHighDialogFragment.kt index ac5dd639..46c60b09 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteHighDialogFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteHighDialogFragment.kt @@ -64,4 +64,4 @@ class MyFeedDeleteHighDialogFragment(private val feedId: Int) : companion object { private const val MSG_MYFEED_ERROR = "ERROR" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteLowDialogFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteLowDialogFragment.kt index 9e0fcc07..b062b215 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteLowDialogFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDeleteLowDialogFragment.kt @@ -64,4 +64,4 @@ class MyFeedDeleteLowDialogFragment(private val feedId: Int) : companion object { private const val MSG_MYFEED_ERROR = "ERROR" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDialogViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDialogViewModel.kt index 7140ec1a..6faca0bb 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDialogViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedDialogViewModel.kt @@ -1,6 +1,5 @@ package com.android.go.sopt.winey.presentation.main.mypage.myfeed -import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel @@ -37,11 +36,12 @@ class MyFeedDialogViewModel @Inject constructor( CODE_MYFEED_INVALID_REQUEST -> UiState.Failure(t.message()) - else -> _deleteMyFeedState.value = - UiState.Failure(t.message()) + else -> + _deleteMyFeedState.value = + UiState.Failure(t.message()) } } - Timber.e("${MSG_MYFEED_FAIL} : ${t.code()} : ${t.message()}") + Timber.e("$MSG_MYFEED_FAIL : ${t.code()} : ${t.message()}") } } } @@ -52,4 +52,4 @@ class MyFeedDialogViewModel @Inject constructor( private const val CODE_MYFEED_INVALID_REQUEST = 400 private const val MSG_MYFEED_FAIL = "FAIL" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedFragment.kt index 0ce0c8a1..760b05b0 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedFragment.kt @@ -39,8 +39,8 @@ class MyFeedFragment : BindingFragment(R.layout.fragment_ myFeedAdapter = MyFeedAdapter(deleteButtonClick = { feedId, writerLevel -> initDialog(feedId, writerLevel) }, fragmentManager = parentFragmentManager, likeButtonClick = { feedId, isLiked -> - viewModel.likeFeed(feedId, isLiked) - }) + viewModel.likeFeed(feedId, isLiked) + }) binding.rvMyfeedPost.adapter = myFeedAdapter } @@ -54,7 +54,6 @@ class MyFeedFragment : BindingFragment(R.layout.fragment_ private fun initEmptyItemLayout(totalPage: Int) { if (totalPage == 0) { - } else { binding.rvMyfeedPost.isVisible = true } @@ -73,7 +72,9 @@ class MyFeedFragment : BindingFragment(R.layout.fragment_ if (state.data.isEmpty()) { binding.rvMyfeedPost.isVisible = false binding.layoutMyfeedEmpty.isVisible = true - } else binding.rvMyfeedPost.isVisible = true + } else { + binding.rvMyfeedPost.isVisible = true + } val myFeedList = state.data myFeedAdapter.submitList(myFeedList) } @@ -135,10 +136,8 @@ class MyFeedFragment : BindingFragment(R.layout.fragment_ parentFragmentManager.popBackStack() } - companion object { private const val MSG_MYFEED_ERROR = "ERROR" private const val MAX_FEED_VER_PAGE = 10 } - -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedViewModel.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedViewModel.kt index 210e0247..f1d34af1 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedViewModel.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/mypage/myfeed/MyFeedViewModel.kt @@ -83,21 +83,26 @@ class MyFeedViewModel @Inject constructor( if (state.isEmpty()) { totalPage = 0 isPagingFinished = true - } else totalPage = currentMutableList[0].totalPageSize + } else { + totalPage = currentMutableList[0].totalPageSize + } val updatedList = currentMutableList.toList() _getMyFeedListState.value = UiState.Success(updatedList) } .onFailure { t -> if (t is HttpException) { when (t.code()) { - CODE_MYFEED_INVALID_USER -> _getMyFeedListState.value = - UiState.Failure(t.message()) + CODE_MYFEED_INVALID_USER -> + _getMyFeedListState.value = + UiState.Failure(t.message()) - CODE_MYFEED_INVALID_REQUEST -> _getMyFeedListState.value = - UiState.Failure(t.message()) + CODE_MYFEED_INVALID_REQUEST -> + _getMyFeedListState.value = + UiState.Failure(t.message()) - else -> _getMyFeedListState.value = - UiState.Failure(t.message()) + else -> + _getMyFeedListState.value = + UiState.Failure(t.message()) } Timber.e("$MSG_MYFEED_FAIL : ${t.code()} : ${t.message()}") } @@ -122,20 +127,20 @@ class MyFeedViewModel @Inject constructor( CODE_MYFEED_INVALID_REQUEST -> UiState.Failure(t.message()) - else -> _deleteMyFeedState.value = - UiState.Failure(t.message()) + else -> + _deleteMyFeedState.value = + UiState.Failure(t.message()) } } - Timber.e("${MSG_MYFEED_FAIL} : ${t.code()} : ${t.message()}") + Timber.e("$MSG_MYFEED_FAIL : ${t.code()} : ${t.message()}") } } } } - companion object { private const val CODE_MYFEED_INVALID_USER = 404 private const val CODE_MYFEED_INVALID_REQUEST = 400 private const val MSG_MYFEED_FAIL = "FAIL" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendAdapter.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendAdapter.kt index dd877e1b..2c473a70 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendAdapter.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendAdapter.kt @@ -11,11 +11,10 @@ import com.android.go.sopt.winey.domain.entity.Recommend import com.android.go.sopt.winey.util.view.ItemDiffCallback import com.android.go.sopt.winey.util.view.setOnSingleClickListener -class RecommendAdapter( -) : ListAdapter(diffUtil) { +class RecommendAdapter() : ListAdapter(diffUtil) { class RecommendViewHolder( - private val binding: ItemRecommendPostBinding, + private val binding: ItemRecommendPostBinding ) : RecyclerView.ViewHolder(binding.root) { fun onBind(data: Recommend) { binding.apply { @@ -58,4 +57,4 @@ class RecommendAdapter( onContentsTheSame = { old, new -> old == new } ) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendFragment.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendFragment.kt index 1fdd0b85..2f550177 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendFragment.kt @@ -35,22 +35,18 @@ class RecommendFragment : BindingFragment(R.layout.fra viewModel.getRecommendListState.observe(viewLifecycleOwner) { state -> when (state) { is UiState.Loading -> { - } is UiState.Success -> { recommendAdapter.submitList(state.data) - } is UiState.Failure -> { - } is UiState.Empty -> { - } } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendHeaderAdapter.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendHeaderAdapter.kt index f9b3e13d..8f9f6f55 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendHeaderAdapter.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/main/recommend/RecommendHeaderAdapter.kt @@ -8,8 +8,8 @@ import com.android.go.sopt.winey.databinding.ItemRecommendHeaderBinding class RecommendHeaderAdapter : RecyclerView.Adapter() { class HeaderViewHolder( - private val binding: ItemRecommendHeaderBinding, - ) : RecyclerView.ViewHolder(binding.root) {} + private val binding: ItemRecommendHeaderBinding + ) : RecyclerView.ViewHolder(binding.root) override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HeaderViewHolder { val binding = @@ -26,4 +26,4 @@ class RecommendHeaderAdapter : RecyclerView.Adapter>>(UiState.Loading) val getRecommendListState: LiveData>> = _getRecommendListState @@ -40,4 +40,4 @@ class RecommendViewModel @Inject constructor( } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/presentation/splash/SplashActivity.kt b/app/src/main/java/com/android/go/sopt/winey/presentation/splash/SplashActivity.kt index 21684137..735e0c16 100644 --- a/app/src/main/java/com/android/go/sopt/winey/presentation/splash/SplashActivity.kt +++ b/app/src/main/java/com/android/go/sopt/winey/presentation/splash/SplashActivity.kt @@ -31,4 +31,4 @@ class SplashActivity : AppCompatActivity() { companion object { private const val DELAY_TIME = 1500L } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/BitmapRequestBody.kt b/app/src/main/java/com/android/go/sopt/winey/util/BitmapRequestBody.kt index 88c3b392..123d371a 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/BitmapRequestBody.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/BitmapRequestBody.kt @@ -33,13 +33,16 @@ class BitmapRequestBody( val filePathColumn = arrayOf(MediaStore.Images.Media.DISPLAY_NAME) try { - if(uri == null){ + if (uri == null) { throw IllegalArgumentException() } context.contentResolver.query( - uri, filePathColumn, - null, null, null + uri, + filePathColumn, + null, + null, + null )?.use { cursor -> if (cursor.moveToFirst()) { val columnIndex: Int = cursor.getColumnIndexOrThrow(filePathColumn[0]) @@ -57,4 +60,4 @@ class BitmapRequestBody( private const val IMAGE_CONTENT_TYPE = "image/jpeg" private const val FEED_IMAGE_KEY = "feedImage" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/ImageCompressor.kt b/app/src/main/java/com/android/go/sopt/winey/util/ImageCompressor.kt index 7334b868..47dd977b 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/ImageCompressor.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/ImageCompressor.kt @@ -84,4 +84,4 @@ class ImageCompressor( private const val MAX_IMAGE_SIZE = 700 // KB private const val ONE_MB_TO_KB = 1024 } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/UriToRequestBody.kt b/app/src/main/java/com/android/go/sopt/winey/util/UriToRequestBody.kt index c6c0fff2..6391b73c 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/UriToRequestBody.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/UriToRequestBody.kt @@ -56,4 +56,4 @@ class UriToRequestBody( override fun contentLength(): Long = size fun toFormData() = MultipartBody.Part.createFormData("feedImage", fileName, this) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingActivity.kt b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingActivity.kt index f4d26541..bfafc771 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingActivity.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingActivity.kt @@ -16,4 +16,4 @@ abstract class BindingActivity( binding = DataBindingUtil.setContentView(this, layoutResId) binding.lifecycleOwner = this } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingAdapter.kt b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingAdapter.kt index bf1339e7..b81373f0 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingAdapter.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingAdapter.kt @@ -53,5 +53,3 @@ fun ImageView.setRoundedImage(imageUri: Uri?, drawable: Drawable) { transformations(RoundedCornersTransformation(10f)) } } - - diff --git a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingBottomSheetDialogFragment.kt b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingBottomSheetDialogFragment.kt index 7142c053..fa63e18a 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingBottomSheetDialogFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingBottomSheetDialogFragment.kt @@ -34,4 +34,4 @@ abstract class BindingBottomSheetDialogFragment( super.onDestroyView() _binding = null } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingDialogFragment.kt b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingDialogFragment.kt index b2928f34..5ee2b0ea 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingDialogFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingDialogFragment.kt @@ -1,7 +1,5 @@ package com.android.go.sopt.winey.util.binding -import android.graphics.Color -import android.graphics.drawable.ColorDrawable import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -24,7 +22,7 @@ abstract class BindingDialogFragment( dialog?.window?.apply { setLayout( WindowManager.LayoutParams.WRAP_CONTENT, - WindowManager.LayoutParams.WRAP_CONTENT, + WindowManager.LayoutParams.WRAP_CONTENT ) setBackgroundDrawableResource(android.R.color.transparent) } @@ -33,7 +31,7 @@ abstract class BindingDialogFragment( override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle?, + savedInstanceState: Bundle? ): View { _binding = DataBindingUtil.inflate(inflater, layoutRes, container, false) return binding.root @@ -48,4 +46,4 @@ abstract class BindingDialogFragment( super.onDestroyView() _binding = null } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingFragment.kt b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingFragment.kt index b563e0bc..69150a61 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingFragment.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/binding/BindingFragment.kt @@ -30,4 +30,4 @@ abstract class BindingFragment( super.onDestroyView() _binding = null } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/context/ContextExt.kt b/app/src/main/java/com/android/go/sopt/winey/util/context/ContextExt.kt index a32ce162..a14afe86 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/context/ContextExt.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/context/ContextExt.kt @@ -33,4 +33,4 @@ fun Context.stringOf(@StringRes resId: Int) = getString(resId) fun Context.colorOf(@ColorRes resId: Int) = ContextCompat.getColor(this, resId) -fun Context.drawableOf(@DrawableRes resId: Int) = ContextCompat.getDrawable(this, resId) \ No newline at end of file +fun Context.drawableOf(@DrawableRes resId: Int) = ContextCompat.getDrawable(this, resId) diff --git a/app/src/main/java/com/android/go/sopt/winey/util/fragment/FragmentExt.kt b/app/src/main/java/com/android/go/sopt/winey/util/fragment/FragmentExt.kt index bdd156a7..38cf9344 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/fragment/FragmentExt.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/fragment/FragmentExt.kt @@ -33,4 +33,4 @@ val Fragment.viewLifeCycle get() = viewLifecycleOwner.lifecycle val Fragment.viewLifeCycleScope - get() = viewLifecycleOwner.lifecycleScope \ No newline at end of file + get() = viewLifecycleOwner.lifecycleScope diff --git a/app/src/main/java/com/android/go/sopt/winey/util/intent/ArgsExt.kt b/app/src/main/java/com/android/go/sopt/winey/util/intent/ArgsExt.kt index 57205326..370e40cd 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/intent/ArgsExt.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/intent/ArgsExt.kt @@ -22,4 +22,4 @@ fun stringArgs() = ReadOnlyProperty { thisRef, property -> fun

parcelableArgs() = ReadOnlyProperty { thisRef, property -> thisRef.requireArguments().getParcelable(property.name) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/android/go/sopt/winey/util/intent/ExtraExt.kt b/app/src/main/java/com/android/go/sopt/winey/util/intent/ExtraExt.kt index 92f1c163..f2ba20fe 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/intent/ExtraExt.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/intent/ExtraExt.kt @@ -28,11 +28,14 @@ fun boolExtra(defaultValue: Boolean = false) = fun stringExtra(defaultValue: String? = null) = ReadOnlyProperty { thisRef, property -> - if (defaultValue == null) thisRef.intent.extras?.getString(property.name) - else thisRef.intent.extras?.getString(property.name, defaultValue) + if (defaultValue == null) { + thisRef.intent.extras?.getString(property.name) + } else { + thisRef.intent.extras?.getString(property.name, defaultValue) + } } fun

parcelableExtra(defaultValue: P? = null) = ReadOnlyProperty { thisRef, property -> thisRef.intent.extras?.getParcelable

(property.name) ?: defaultValue - } \ No newline at end of file + } diff --git a/app/src/main/java/com/android/go/sopt/winey/util/view/UiState.kt b/app/src/main/java/com/android/go/sopt/winey/util/view/UiState.kt index 84aa2398..6695904b 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/view/UiState.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/view/UiState.kt @@ -6,11 +6,11 @@ sealed interface UiState { object Loading : UiState data class Success( - val data: T, + val data: T ) : UiState data class Failure( - val msg: String, + val msg: String ) : UiState fun getUiStateModel(): UiStateModel { @@ -28,4 +28,4 @@ data class UiStateModel( val isLoading: Boolean = true, val isSuccess: Boolean = false, val isFailure: Boolean = false -) \ No newline at end of file +) diff --git a/app/src/main/java/com/android/go/sopt/winey/util/view/ViewExt.kt b/app/src/main/java/com/android/go/sopt/winey/util/view/ViewExt.kt index bd06650c..33897133 100644 --- a/app/src/main/java/com/android/go/sopt/winey/util/view/ViewExt.kt +++ b/app/src/main/java/com/android/go/sopt/winey/util/view/ViewExt.kt @@ -22,10 +22,12 @@ class ItemDiffCallback( val onContentsTheSame: (T, T) -> Boolean ) : DiffUtil.ItemCallback() { override fun areItemsTheSame( - oldItem: T, newItem: T + oldItem: T, + newItem: T ): Boolean = onItemsTheSame(oldItem, newItem) override fun areContentsTheSame( - oldItem: T, newItem: T + oldItem: T, + newItem: T ): Boolean = onContentsTheSame(oldItem, newItem) -} \ No newline at end of file +} diff --git a/app/src/test/java/com/android/go/sopt/winey/ExampleUnitTest.kt b/app/src/test/java/com/android/go/sopt/winey/ExampleUnitTest.kt index 480ff739..d05b97cc 100644 --- a/app/src/test/java/com/android/go/sopt/winey/ExampleUnitTest.kt +++ b/app/src/test/java/com/android/go/sopt/winey/ExampleUnitTest.kt @@ -1,7 +1,6 @@ package com.android.go.sopt.winey import org.junit.Test - import org.junit.Assert.* /** @@ -14,4 +13,4 @@ class ExampleUnitTest { fun addition_isCorrect() { assertEquals(4, 2 + 2) } -} \ No newline at end of file +} diff --git a/build.gradle.kts b/build.gradle.kts index bd37223c..1849e156 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,15 +5,25 @@ buildscript { mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:${Versions.gradleVersion}") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlinVersion}") - classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlinVersion}") + classpath(ClassPathPlugins.gradle) + classpath(ClassPathPlugins.kotlinGradlePlugin) +// classpath(ClassPathPlugins.kotlinSerialization) classpath(ClassPathPlugins.hilt) classpath(ClassPathPlugins.oss) - classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlinSerializationJsonVersion}") + } +} + +plugins { + id(ProjectPlugins.ktlint) version Versions.ktlintVersion + id(ProjectPlugins.kotlinSerialization) version Versions.kotlinVersion +} + +allprojects { + apply { + plugin(ProjectPlugins.ktlint) } } tasks.register("clean", Delete::class) { delete(rootProject.buildDir) -} \ No newline at end of file +} diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 67870600..956eb8aa 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -44,7 +44,7 @@ object MaterialDesignDependencies { } object KaptDependencies { - const val hiltCompiler = "com.google.dagger:hilt-compiler:${Versions.hiltVersion}" + const val hiltAndroidCompiler = "com.google.dagger:hilt-android-compiler:${Versions.hiltVersion}" const val hiltWorkManagerCompiler = "androidx.hilt:hilt-compiler:1.0.0" } @@ -76,15 +76,10 @@ object ThirdPartyDependencies { const val circleImageView = "de.hdodenhof:circleimageview:${Versions.circleImageViewVersion}" } -object ClassPathPlugins { - const val hilt = "com.google.dagger:hilt-android-gradle-plugin:${Versions.hiltVersion}" - const val oss = "com.google.android.gms:oss-licenses-plugin:${Versions.ossPluginVersion}" -} - object FirebaseDependencies { const val bom = "com.google.firebase:firebase-bom:30.1.0" const val messaging = "com.google.firebase:firebase-messaging-ktx" const val crashlytics = "com.google.firebase:firebase-crashlytics-ktx" const val analytics = "com.google.firebase:firebase-analytics-ktx" const val remoteConfig = "com.google.firebase:firebase-config-ktx" -} \ No newline at end of file +} diff --git a/buildSrc/src/main/java/Plugins.kt b/buildSrc/src/main/java/Plugins.kt index a485cb62..d3a9cfe3 100644 --- a/buildSrc/src/main/java/Plugins.kt +++ b/buildSrc/src/main/java/Plugins.kt @@ -1,11 +1,22 @@ -object Plugins { +object ClassPathPlugins { + const val gradle = "com.android.tools.build:gradle:${Versions.gradleVersion}" + const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlinVersion}" +// const val kotlinSerialization = "org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlinVersion}" + const val hilt = "com.google.dagger:hilt-android-gradle-plugin:${Versions.hiltVersion}" + const val oss = "com.google.android.gms:oss-licenses-plugin:${Versions.ossPluginVersion}" +} + +object ProjectPlugins { + const val ktlint = "org.jlleitschuh.gradle.ktlint" + const val kotlinSerialization = "org.jetbrains.kotlin.plugin.serialization" +} + +object ModulePlugins { const val androidApplication = "com.android.application" const val kotlinAndroid = "org.jetbrains.kotlin.android" const val kotlinKapt = "kotlin-kapt" const val kotlinParcelize = "kotlin-parcelize" const val kotlinSerialization = "kotlinx-serialization" - - // classpath plugin - const val hiltPlugin = "dagger.hilt.android.plugin" - const val ossLicensesPlugin = "com.google.android.gms.oss-licenses-plugin" -} \ No newline at end of file + const val hilt = "dagger.hilt.android.plugin" + const val oss = "com.google.android.gms.oss-licenses-plugin" +} diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index 1502f2cb..d01ecef2 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -5,6 +5,7 @@ object Versions { const val kotlinVersion = "1.8.20" const val kotlinSerializationJsonVersion = "1.5.1" const val kotlinDateTimeVersion = "0.4.0" + const val ktlintVersion = "11.5.0" const val coreKtxVersion = "1.10.1" const val appCompatVersion = "1.6.1"