Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gradle #241

Merged
merged 6 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .idea/gradle.xml

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

56 changes: 36 additions & 20 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,33 @@ android {
buildConfigField("String", "API_KEY", "\"${properties.getProperty("API_KEY")}\"")
buildConfigField("String", "SECRET", "\"${properties.getProperty("SECRET")}\"")
buildConfigField("String", "SUPABASE_URL", "\"${properties.getProperty("SUPABASE_URL")}\"")


}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

}
flavorDimensions "environment"
productFlavors {
dev {
dimension "environment"
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
buildConfigField("String", "API_KEY", "\"${properties.getProperty("API_KEY_DEBUG")}\"")
buildConfigField("String", "SECRET", "\"${properties.getProperty("SECRET_DEBUG")}\"")
buildConfigField("String", "SUPABASE_URL", "\"${properties.getProperty("SUPABASE_URL_DEBUG")}\"")
}
prod {
dimension "environment"
applicationIdSuffix ".prod"
versionNameSuffix "-prod"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
Expand Down Expand Up @@ -93,12 +109,12 @@ dependencies {
// implementation 'io.supabase:postgrest-kt:0.9.0-alpha-4'

// implementation("io.github.jan-tennert.supabase:postgrest-kt:0.2.0")
implementation("io.ktor:ktor-client-cio:1.6.0")
implementation("io.github.jan-tennert.supabase:postgrest-kt-android:2.0.0")
implementation "io.ktor:ktor-client-android:2.2.1"
implementation "io.ktor:ktor-utils-jvm:1.6.0"
implementation "io.ktor:ktor-client-logging-jvm:1.6.0"
implementation("io.ktor:ktor-client-core:2.2.4")
implementation(libs.ktor.client.cio)
implementation(libs.postgrest.kt.android)
implementation libs.ktor.client.android
implementation libs.ktor.utils.jvm
implementation libs.ktor.client.logging.jvm
implementation(libs.ktor.client.core)

def composeBom = platform('androidx.compose:compose-bom:2023.09.02')
implementation(composeBom)
Expand All @@ -111,20 +127,20 @@ dependencies {
implementation "androidx.compose.material:material"
implementation "androidx.compose.runtime:runtime-livedata"
implementation "androidx.compose.ui:ui-tooling"
implementation "com.google.accompanist:accompanist-themeadapter-material:0.28.0"
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
implementation "com.github.bumptech.glide:compose:1.0.0-alpha.1"
implementation "androidx.compose.material3:material3:1.1.1"
testImplementation("org.mockito:mockito-core:2.1.0")

debugImplementation "androidx.compose.ui:ui-tooling:1.4.2"
implementation "androidx.compose.ui:ui-tooling-preview:1.4.2"
implementation libs.accompanist.themeadapter.material
implementation(libs.androidx.hilt.navigation.compose)
implementation libs.glide.compose
implementation libs.androidx.material3
testImplementation libs.mockito.core

debugImplementation libs.androidx.ui.tooling
implementation libs.androidx.ui.tooling.preview
def nav_version = "2.5.3"
implementation("androidx.navigation:navigation-compose:$nav_version")
implementation "androidx.compose.material:material-icons-extended:1.0.0"
implementation(libs.androidx.navigation.compose)
implementation libs.androidx.material.icons.extended

implementation libs.caruilib
testImplementation "org.mockito.kotlin:mockito-kotlin:5.1.0"
testImplementation libs.mockito.kotlin

testImplementation libs.junit
androidTestImplementation libs.androidx.test.runner
Expand Down
2 changes: 1 addition & 1 deletion app/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
39 changes: 39 additions & 0 deletions app/src/dev/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"project_info": {
"project_number": "328124391538",
"project_id": "groceries-store-ad0eb",
"storage_bucket": "groceries-store-ad0eb.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:328124391538:android:5ebfa735442a1c667162eb",
"android_client_info": {
"package_name": "com.hieuwu.groceriesstore.dev"
}
},
"oauth_client": [
{
"client_id": "328124391538-r347t652e5bc34a0u053jo0a6n5frbuj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCRO-bwglWoFIpfqmBdrodtPSIeA1OGcLs"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "328124391538-r347t652e5bc34a0u053jo0a6n5frbuj.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
13 changes: 0 additions & 13 deletions app/src/main/java/com/hieuwu/groceriesstore/LoadingDialog.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.hieuwu.groceriesstore.domain.models.UserModel
import com.hieuwu.groceriesstore.utilities.USER_TABLE

@Entity

@Entity(tableName = USER_TABLE)
class User(
@PrimaryKey
var id: String,
Expand Down
16 changes: 0 additions & 16 deletions app/src/main/res/layout/loading_layout.xml

This file was deleted.

39 changes: 39 additions & 0 deletions app/src/prod/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"project_info": {
"project_number": "328124391538",
"project_id": "groceries-store-ad0eb",
"storage_bucket": "groceries-store-ad0eb.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:328124391538:android:5ebfa735442a1c667162eb",
"android_client_info": {
"package_name": "com.hieuwu.groceriesstore.prod"
}
},
"oauth_client": [
{
"client_id": "328124391538-r347t652e5bc34a0u053jo0a6n5frbuj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCRO-bwglWoFIpfqmBdrodtPSIeA1OGcLs"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "328124391538-r347t652e5bc34a0u053jo0a6n5frbuj.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
32 changes: 31 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[versions]
accompanistThemeadapterMaterialVersion = "0.28.0"
appCompatVersion = "1.4.2"
buildGradleVersion = "8.1.1"
buildGradleVersion = "8.2.2"
cardViewVersion = "1.0.0"
carUiLibVersion = "2.0.0"
constraintLayoutVersion = "2.1.4"
Expand All @@ -14,34 +15,55 @@ glideVersion = "4.13.2"
glideComposeVersion = "1.0.0-beta01"
googleServicesVersion = "4.3.13"
gsonVersion = "2.9.0"
hiltNavigationComposeVersion = "1.0.0"
hiltVersion = '2.48'
jUnitVersion = "4.13.2"
kotlinVersion = "1.9.0"
kotlinCoroutineAdapter = "0.9.2"
kotlinCoroutinePlayServicesVersion = "1.6.4"
kotlinxImmutable = "0.3.5"
ktlintGradleVersion = "11.0.0"
ktorClientAndroidVersion = "2.3.0"
ktorClientCioVersion = "1.6.0"
ktorClientCoreVersion = "2.2.4"
ktorClientLoggingJvmVersion = "1.6.0"
ktorUtilsJvmVersion = "1.6.0"
legacySupportVersion = "1.0.0"
lifecycleVersion = "2.5.0"
lottieVersion = "5.2.0"
material3Version = "1.1.1"
materialIconsExtendedVersion = "1.0.0"
materialVersion = "1.6.1"
mockitoCoreVersion = "2.1.0"
mockitoKotlinVersion = "5.1.0"
moshiConverterVersion = "2.9.0"
moshiVersion = "1.12.0"
navigationComposeVersion = "2.5.3"
navigationVersion = "2.5.0"
postgrestKtAndroidVersion = "2.0.0"
retrofitVersion = "2.9.0"
roomVersion = "2.5.0"
spotlessVersion = "6.8.0"
testRunnerVersion = "1.4.0"
timberVersion = "5.0.1"
uiToolingPreviewVersion = "1.6.1"
uiToolingVersion = "1.4.2"
workVersion = "2.7.1"

[libraries]
accompanist-themeadapter-material = { module = "com.google.accompanist:accompanist-themeadapter-material", version.ref = "accompanistThemeadapterMaterialVersion" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appCompatVersion" }
androidx-core = { module = "androidx.core:core-ktx", version.ref = "coreVersion" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigationComposeVersion" }
androidx-lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleVersion" }
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleVersion" }
androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "materialIconsExtendedVersion" }
androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3Version" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationComposeVersion" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "testRunnerVersion" }
androidx-test-arch-core = { module = "androidx.arch.core:core-testing", version.ref = "coreTestingVersion" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "uiToolingVersion" }
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "uiToolingPreviewVersion" }
androidx-work-runtime = { module = "androidx.work:work-runtime-ktx", version.ref = "workVersion" }
cardview = { module = "androidx.cardview:cardview", version.ref = "cardViewVersion" }
caruilib = { module = "com.android.car.ui:car-ui-lib", version.ref = "carUiLibVersion" }
Expand All @@ -63,13 +85,21 @@ junit = { module = "junit:junit", version.ref = "jUnitVersion" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlinVersion" }
kotlin-coroutines-play-services = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "kotlinCoroutinePlayServicesVersion" }
kotlinx-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version.ref = "kotlinxImmutable" }
ktor-client-android = { module = "io.ktor:ktor-client-android", version.ref = "ktorClientAndroidVersion" }
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktorClientCioVersion" }
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktorClientCoreVersion" }
ktor-client-logging-jvm = { module = "io.ktor:ktor-client-logging-jvm", version.ref = "ktorClientLoggingJvmVersion" }
ktor-utils-jvm = { module = "io.ktor:ktor-utils-jvm", version.ref = "ktorUtilsJvmVersion" }
legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "legacySupportVersion" }
lottie = { module = "com.airbnb.android:lottie", version.ref = "lottieVersion" }
lottie-compose = { module = "com.airbnb.android:lottie-compose", version.ref = "lottieVersion" }
material-components = { module = "com.google.android.material:material", version.ref = "materialVersion" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCoreVersion" }
mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlinVersion" }
moshi = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshiVersion" }
navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigationVersion" }
navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigationVersion" }
postgrest-kt-android = { module = "io.github.jan-tennert.supabase:postgrest-kt-android", version.ref = "postgrestKtAndroidVersion" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofitVersion" }
retrofit-converter-moshi = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "moshiConverterVersion" }
retrofit-coroutines-adapter = { module = "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter", version.ref = "kotlinCoroutineAdapter" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Oct 10 05:12:00 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 3 additions & 0 deletions local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
API_KEY=YOUR_SUPABASE_KEY
SECRET=YOUR_SUPABASE_SECRET
SUPABASE_URL=YOUR_SUPABASE_URL
API_KEY_DEBUG=YOUR_SUPABASE_KEY_DEBUG
SECRET_DEBUG=YOUR_SUPABASE_SECRET_DEBUG
SUPABASE_URL_DEBUG=YOUR_SUPABASE_URL_DEBUG
sdk.dir=/Users/hieuvu/Library/Android/sdk
Loading