Skip to content

Commit

Permalink
fix: update ⬆️ all deps, fix all 🐛 (#52)
Browse files Browse the repository at this point in the history
* fix: update ⬆️ all deps, fix all 🐛

* refactor: `kotlin-android-extensions` -> `kotlin-parcelize`

* fix: use ViewBinding

* fix: use ViewBinding
  • Loading branch information
hoc081098 authored Oct 9, 2022
1 parent 577cab9 commit c0e2b8d
Show file tree
Hide file tree
Showing 34 changed files with 627 additions and 569 deletions.
54 changes: 28 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,32 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Decode PLACE_API_KEY
env:
BASEURL: ${{ secrets.PLACE_API_KEY }}
run: echo PLACE_API_KEY="$PLACE_API_KEY" > ./local.properties
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Decode PLACE_API_KEY
env:
BASEURL: ${{ secrets.PLACE_API_KEY }}
run: echo PLACE_API_KEY="$PLACE_API_KEY" > ./local.properties

# - name: Spotless check
# run: ./gradlew spotlessCheck

- name: Build debug APK
run: ./gradlew assembleDebug --warning-mode all --stacktrace

- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: app-debug
path: app/build/outputs/apk/debug/app-debug.apk
# - name: Spotless check
# run: ./gradlew spotlessCheck

- name: Build debug APK
uses: gradle/gradle-build-action@v2
with:
arguments: assembleDebug --warning-mode all --stacktrace

- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-debug
path: app/build/outputs/apk/debug/app-debug.apk
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.

6 changes: 2 additions & 4 deletions .idea/gradle.xml

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

5 changes: 5 additions & 0 deletions .idea/jarRepositories.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.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

48 changes: 27 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'

androidExtensions { experimental = true }

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -20,11 +18,11 @@ if (localProperties['PLACE_API_KEY'] == null) {
}

android {
compileSdkVersion 30
compileSdkVersion 33
defaultConfig {
applicationId "com.hoc.weatherapp"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -55,6 +53,9 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding true
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
Expand All @@ -64,35 +65,37 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

// androidx
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.palette:palette-ktx:1.0.0'
implementation "androidx.startup:startup-runtime:1.1.0"
implementation "androidx.startup:startup-runtime:1.1.1"

implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'

// google material
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.material:material:1.6.1'

// play services
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.android.libraries.places:places:2.5.0'
implementation 'com.google.android.gms:play-services-location:20.0.0'
implementation 'com.google.android.libraries.places:places:2.6.0'

// room persistence
def roomVersion = '2.3.0'
final roomVersion = '2.4.3'
implementation "androidx.room:room-runtime:$roomVersion"
kapt "androidx.room:room-compiler:$roomVersion"
implementation "androidx.room:room-rxjava2:$roomVersion"

// work manager
def workVersion = '2.4.0'
implementation "android.arch.work:work-runtime-ktx:$workVersion"
implementation "android.arch.work:work-rxjava2:$workVersion"
final workVersion = '2.7.1'
implementation "androidx.work:work-runtime-ktx:$workVersion"
implementation "androidx.work:work-rxjava2:$workVersion"

// mosby
def mosbyVersion = '3.1.1'
final mosbyVersion = '3.1.1'
implementation("com.hannesdorfmann.mosby3:mvi:$mosbyVersion")

testImplementation 'junit:junit:4.13.2'
Expand All @@ -104,7 +107,7 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.2'
implementation 'com.squareup.moshi:moshi-kotlin:1.12.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.14.0'

// rxkotlin & rxandroid
implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0'
Expand All @@ -124,8 +127,8 @@ dependencies {
implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:4.1.2'

// glide
implementation 'com.github.bumptech.glide:glide:4.12.0'
kapt 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'com.github.bumptech.glide:glide:4.13.2'
kapt 'com.github.bumptech.glide:compiler:4.13.2'

// chart & material search view
implementation 'com.diogobernardino:williamchart:3.11.0'
Expand All @@ -134,4 +137,7 @@ dependencies {

// rxPermission
implementation 'com.github.tbruyelle:rxpermissions:2.x.v0.9.3'

// ViewBindingDelegate
implementation("com.github.hoc081098:ViewBindingDelegate:1.4.0")
}
12 changes: 6 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<activity
android:name=".ui.SplashActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/AppTheme.SplashTheme">
<intent-filter>
Expand Down Expand Up @@ -110,13 +111,12 @@
<meta-data
android:name="com.hoc.weatherapp.initializer.WorkManagerInitializer"
android:value="androidx.startup" />
</provider>

<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove"
android:exported="false" />
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>

</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.os.Parcelable
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.android.parcel.Parcelize
import kotlinx.parcelize.Parcelize

/**
* Declaring the column info allows for the renaming of variables without implementing a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.ForeignKey.CASCADE
import androidx.room.PrimaryKey
import kotlinx.android.parcel.Parcelize
import kotlinx.parcelize.Parcelize
import java.util.*

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.os.Parcelable
import androidx.room.*
import androidx.room.ForeignKey.CASCADE
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize
import kotlinx.parcelize.Parcelize
import java.util.*

@Parcelize
Expand Down
Loading

0 comments on commit c0e2b8d

Please sign in to comment.