Skip to content

Commit

Permalink
Gradle 및 라이브러리 버전 최신화, lint 규칙 추가 (#205)
Browse files Browse the repository at this point in the history
Co-authored-by: JuTaK97 <louis@vcnc.co.kr>
  • Loading branch information
JuTaK97 and JuTaK97 authored Sep 6, 2023
1 parent 2ac288e commit 4948344
Show file tree
Hide file tree
Showing 181 changed files with 1,503 additions and 2,883 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
root=true
[*.{kt,kts}]
indent_size=4
continuation_indent_size=4
insert_final_newline=true
max_line_length=off
disabled_rules=import-ordering,no-wildcard-imports,experimental:annotation
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 11
java-version: 17
distribution: 'adopt'
- name: Clean build
run: ./gradlew clean
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 11
java-version: 17
distribution: 'adopt'
- name: Clean build
run: ./gradlew clean
Expand Down
6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 29 additions & 41 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import java.io.FileInputStream
plugins {
id("com.android.application")
id("kotlin-android")
id("com.google.gms.google-services")
id("org.jlleitschuh.gradle.ktlint-idea")
id("org.jlleitschuh.gradle.ktlint")
id("dagger.hilt.android.plugin")
id("kotlin-kapt")
id("kotlin-parcelize")
id("androidx.navigation.safeargs.kotlin")
id("com.google.firebase.appdistribution")
id("com.google.firebase.crashlytics")
}
Expand All @@ -26,15 +24,16 @@ ktlint {
include("**/java/**")
}
// See https://github.com/pinterest/ktlint/issues/527
disabledRules.addAll("import-ordering", "no-wildcard-imports")
disabledRules.addAll("import-ordering", "no-wildcard-imports", "package-name", "argument-list-wrapping")
}

val versionProps = Properties().apply {
load(FileInputStream(File(rootProject.rootDir, "version.properties")))
}

android {
compileSdk = 33
namespace = "com.wafflestudio.snutt2"
compileSdk = 34

repositories {
mavenCentral()
Expand All @@ -47,8 +46,8 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

signingConfigs {
Expand All @@ -71,15 +70,11 @@ android {
signingConfig = signingConfigs.getByName("release")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}

viewBinding {
isEnabled = true
}

flavorDimensions.add("mode")

productFlavors {
Expand Down Expand Up @@ -110,34 +105,30 @@ android {
}

kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn"
}

buildFeatures {
compose = true
viewBinding = true
buildConfig = true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.4.0"
kotlinCompilerExtensionVersion = "1.5.1"
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class).all {
kotlinOptions.freeCompilerArgs += listOf("-Xuse-experimental=androidx.compose.ui.ExperimentalCompose", "-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi")
}

dependencies {
testImplementation("junit:junit:4.13.1")
testImplementation("junit:junit:4.13.2")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.3")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")

implementation("androidx.appcompat:appcompat:1.4.1")
implementation("androidx.recyclerview:recyclerview:1.2.1")
implementation("com.google.android.material:material:1.5.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib:${Deps.Version.Kotlin}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${Deps.Version.Kotlin}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-rx3:${Deps.Version.Rx3Coroutine}")

// Moshi
implementation("com.squareup.moshi:moshi:${Deps.Version.Moshi}")
Expand All @@ -147,22 +138,18 @@ dependencies {
implementation("com.squareup.retrofit2:retrofit:${Deps.Version.Retrofit}")
implementation("com.squareup.retrofit2:adapter-rxjava3:${Deps.Version.Retrofit}")
implementation("com.squareup.retrofit2:converter-moshi:${Deps.Version.Retrofit}")
implementation("com.squareup.okhttp3:logging-interceptor:4.7.2")
implementation("com.squareup.okhttp3:logging-interceptor:4.9.2")

// RxJava
implementation("io.reactivex.rxjava3:rxjava:${Deps.Version.RxJava}")
implementation("io.reactivex.rxjava3:rxkotlin:${Deps.Version.RxKotlin}")
implementation("io.reactivex.rxjava3:rxandroid:${Deps.Version.RxAndroid}")
implementation("com.jakewharton.rxbinding4:rxbinding:${Deps.Version.RxBinding}")

// Dagger Hilt
implementation("com.google.dagger:hilt-android:${Deps.Version.Hilt}")
kapt("com.google.dagger:hilt-android-compiler:${Deps.Version.Hilt}")

// AAC Navigation
implementation("androidx.navigation:navigation-fragment-ktx:${Deps.Version.Navigation}")
implementation("androidx.navigation:navigation-ui-ktx:${Deps.Version.Navigation}")
implementation("androidx.navigation:navigation-compose:2.5.0")
implementation("androidx.navigation:navigation-compose:${Deps.Version.Navigation}")

// Firebase
implementation(platform("com.google.firebase:firebase-bom:28.1.0"))
Expand All @@ -171,39 +158,40 @@ dependencies {
implementation("com.google.firebase:firebase-crashlytics-ktx")

// Paging
implementation("androidx.paging:paging-runtime:${Deps.Version.Paging}")
implementation("androidx.paging:paging-rxjava3:${Deps.Version.Paging}")
implementation("androidx.paging:paging-runtime-ktx:${Deps.Version.Paging}")

// Compose
implementation("androidx.compose.runtime:runtime:${Deps.Version.Compose}")
implementation("androidx.compose.ui:ui:${Deps.Version.Compose}")
implementation("androidx.compose.ui:ui-tooling:${Deps.Version.Compose}")
implementation("androidx.compose.material:material:${Deps.Version.Compose}")
implementation("androidx.compose.foundation:foundation:${Deps.Version.ComposeFoundation}")
implementation("androidx.compose.foundation:foundation-layout:${Deps.Version.ComposeFoundation}")
implementation("androidx.compose.material:material:1.4.0-alpha04")
implementation("androidx.compose.runtime:runtime-livedata:${Deps.Version.Compose}")
implementation("androidx.compose.ui:ui-tooling:${Deps.Version.Compose}")
implementation("androidx.paging:paging-compose:${Deps.Version.PagingCompose}")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1")
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
implementation("androidx.compose.runtime:runtime-rxjava3:1.1.1")

// misc
implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.core:core-ktx:1.10.1")
implementation("com.google.accompanist:accompanist-pager:0.20.3")
implementation("com.google.accompanist:accompanist-pager-indicators:0.20.3")
implementation("com.facebook.android:facebook-login:15.0.1")
implementation("de.psdev.licensesdialog:licensesdialog:2.1.0")
implementation("com.uber.rxdogtag2:rxdogtag:2.0.1")
implementation("com.github.skydoves:colorpickerview:2.2.3")
implementation("com.jakewharton.timber:timber:4.7.1")
implementation("androidx.core:core-splashscreen:1.0.0")
implementation("com.google.accompanist:accompanist-navigation-animation:0.29.0-alpha")
implementation("com.jakewharton.timber:timber:5.0.1")
implementation("androidx.core:core-splashscreen:1.0.1")

// coil
implementation("io.coil-kt:coil-compose:2.1.0")

// GSON
implementation("com.google.code.gson:gson:2.10.1")

// Glance
implementation("androidx.glance:glance-appwidget:1.0.0-rc01")
implementation("androidx.glance:glance-material:1.0.0-rc01")
implementation("androidx.glance:glance-material3:1.0.0-rc01")
}

repositories {
Expand Down
128 changes: 0 additions & 128 deletions app/src/main/java/com/wafflestudio/snutt2/DialogController.kt

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/java/com/wafflestudio/snutt2/RemoteConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RemoteConfig @Inject constructor(
}.stateIn(
CoroutineScope(Dispatchers.Main),
SharingStarted.Eagerly,
RemoteConfigDto()
RemoteConfigDto(),
)

val friendBundleSrc: String
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/com/wafflestudio/snutt2/SNUTTApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ package com.wafflestudio.snutt2
import android.app.Application
import android.content.res.Configuration
import androidx.compose.animation.ExperimentalAnimationApi
import com.wafflestudio.snutt2.lib.rx.DirectFirstHandleScheduler
import com.wafflestudio.snutt2.provider.TimetableWidgetProvider
import dagger.hilt.android.HiltAndroidApp
import io.reactivex.rxjava3.android.plugins.RxAndroidPlugins
import rxdogtag2.RxDogTag
import timber.log.Timber

/**
Expand All @@ -18,11 +15,7 @@ class SNUTTApplication : Application() {

override fun onCreate() {
super.onCreate()
RxDogTag.install()
Timber.plant(Timber.DebugTree())
RxAndroidPlugins.setMainThreadSchedulerHandler {
DirectFirstHandleScheduler(true)
}
}

@OptIn(ExperimentalAnimationApi::class)
Expand Down
Loading

0 comments on commit 4948344

Please sign in to comment.