Skip to content

Commit

Permalink
[chore] #246 upgrade gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Haeeul committed Dec 21, 2022
1 parent 487794d commit 1f0383e
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

7 changes: 2 additions & 5 deletions .idea/gradle.xml

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

2 changes: 1 addition & 1 deletion .idea/misc.xml

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

7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'kotlin-kapt'
id 'kotlin-parcelize'
id 'com.google.gms.google-services'
id 'androidx.navigation.safeargs.kotlin'
}

android {
Expand All @@ -27,11 +28,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}

buildFeatures {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<activity android:name="com.scentsnote.android.util.BaseWebViewActivity" />
<activity
android:name="com.scentsnote.android.ui.splash.SplashActivity"
android:exported="true"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider

class FilterViewModelFactory : ViewModelProvider.NewInstanceFactory(){
override fun <T : ViewModel?> create(modelClass: Class<T>) =
override fun <T : ViewModel> create(modelClass: Class<T>): T =
with(modelClass) {
when {
isAssignableFrom(FilterViewModel::class.java) -> FilterViewModel.getInstance()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SingleViewModelFactory : ViewModelProvider.NewInstanceFactory() {
}
}

override fun <T : ViewModel?> create(modelClass: Class<T>) =
override fun <T : ViewModel> create(modelClass: Class<T>): T =
with(modelClass) {
when {
isAssignableFrom(SearchViewModel::class.java) -> SearchViewModel.getInstance()
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import kotlin.Suppress

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {

Expand All @@ -11,6 +9,8 @@ buildscript {
jcenter()
}
dependencies {

classpath("androidx.navigation:navigation-safe-args-gradle-plugin:${ConfigData.nav_version}")
classpath "com.android.tools.build:gradle:${ConfigData.gradleVersion}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${ConfigData.gradlePluginVersion}"
classpath "com.google.gms:google-services:${Versions.gms}"
Expand Down
13 changes: 8 additions & 5 deletions buildSrc/src/main/java/ConfigData.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
object ConfigData {
const val compileSdkVersion = 30
const val buildToolsVersion = "30.0.0"
const val compileSdkVersion = 31
const val buildToolsVersion = "30.0.3"
const val minSdkVersion = 23
const val targetSdkVersion = 30
const val targetSdkVersion = 31
const val versionCode = 1
const val versionName = "1.0"

// gradle
const val gradleVersion = "4.1.1"
const val gradlePluginVersion = "1.5.31"
const val gradleVersion = "7.3.1"
const val gradlePluginVersion = "1.7.20"

// kotlin
const val kotlin_version = "1.4.20"

// navigation
const val nav_version = "2.5.3"
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ object Dependencies {

/* android.arch */
const val navigationFragmentKtx =
"android.arch.navigation:navigation-fragment-ktx:${Versions.navigationKtx}"
"androidx.navigation:navigation-fragment-ktx:${Versions.navigationKtx}"
const val navigationUiKtx =
"android.arch.navigation:navigation-ui-ktx:${Versions.navigationKtx}"
"androidx.navigation:navigation-ui-ktx:${Versions.navigationKtx}"

/* retrofit2 : https://github.com/square/retrofit */
const val retrofit2 = "com.squareup.retrofit2:retrofit:${Versions.retrofit2}"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object Versions {
const val glide = "4.11.0"

// navigation
const val navigationKtx = "2.2.2"
const val navigationKtx = "2.5.3"

// flexbox
const val flexbox = "2.0.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip

0 comments on commit 1f0383e

Please sign in to comment.