Skip to content
Open
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
75 changes: 29 additions & 46 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
kotlin("kapt")
alias(libs.plugins.kotlin.compose)
id("com.google.dagger.hilt.android")
id("com.google.devtools.ksp")
}

android {
namespace = "com.androidfactory.simplerick"
compileSdk = libs.versions.compileSdk.get().toInt()
compileSdk = 35

defaultConfig {
applicationId = "com.androidfactory.simplerick"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = 33
versionCode = 1
versionName = "1.0"
minSdk = 26

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

buildTypes {
Expand All @@ -32,55 +26,44 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = "11"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {

implementation(project(":network"))

implementation(platform(libs.compose.bom))
implementation(libs.bundles.compose)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
implementation(libs.androidx.foundation)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)

implementation(libs.navigation.compose)
// Dependency injection
implementation(libs.hilt.android)
ksp(libs.dagger.hilt.android.compiler)
implementation(libs.androidx.hilt.navigation.compose)

// Image loading
implementation(libs.coil.compose)

// Dependency injection
implementation("com.google.dagger:hilt-android:2.44")
kapt("com.google.dagger:hilt-android-compiler:2.44")
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")

implementation(libs.core.ktx)
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.activity.compose)

testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(libs.compose.ui.test.junit)
debugImplementation(libs.compose.ui.tooling)
debugImplementation(libs.compose.ui.test.manifest)
}

kapt {
correctErrorTypes = true
// Network Module
implementation(project(":network"))
}
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET"/>

<application
android:name=".SimpleRickApplication"
android:allowBackup="true"
Expand Down
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.kotlin.serialization) apply false
id("com.google.dagger.hilt.android") version "2.44" apply false
id("com.google.devtools.ksp") version "2.0.21-1.0.27" apply false
id("com.google.dagger.hilt.android") version "2.49" apply false
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
Expand Down
99 changes: 49 additions & 50 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,66 +1,65 @@
[versions]
minSdk = "26"
compileSdk = "34"

coilComposeVersion = "2.5.0"
ktorVersion = "2.3.6"
agpVersion = "8.3.2"
kotlinVersion = "1.8.10"
composeBomVersion = "2024.09.03"
navVersion = "2.7.7"
activityComposeVersion = "1.9.0"
coreKtxVersion = "1.13.1"
lifecycleRuntimeKtxVersion = "2.8.2"

espressoCoreVersion = "3.5.1"
junit = "1.1.5"
junitVersion = "4.13.2"

[libraries]
agp = "8.7.3"
kotlin = "2.0.21"
coreKtx = "1.15.0"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
lifecycleRuntimeKtx = "2.8.7"
activityCompose = "1.9.3"
composeBom = "2024.11.00"
composeFoundation = "1.4.3"
appcompat = "1.7.0"
material = "1.12.0"
# Ktor
ktorVersion = "3.0.1"
# Coil
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilComposeVersion" }

# Android
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityComposeVersion" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtxVersion" }
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtxVersion" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navVersion" }
coilComposeVersion = "2.7.0"
# Dagger-Hilt
hiltAndroid = "2.49"
hiltAndroidCompiler = "2.49"
hiltNavigationCompose = "1.2.0"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "composeFoundation" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
# Ktor
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktorVersion" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktorVersion" }
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktorVersion" }
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktorVersion" }
ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktorVersion" }

# Compose
compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBomVersion" }
compose-ui = { module = "androidx.compose.ui:ui" }
compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
compose-material3 = { module = "androidx.compose.material3:material3" }
compose-foundation = { module = "androidx.compose.foundation:foundation" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
compose-ui-test-junit = { module = "androidx.compose.ui:ui-test-junit4" }
compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }

# Testing
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCoreVersion" }
ext-junit = { module = "androidx.test.ext:junit", version.ref = "junit" }
junit = { module = "junit:junit", version.ref = "junitVersion" }
# Coil
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilComposeVersion" }
# Dagger-Hilt
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigationCompose" }
dagger-hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hiltAndroidCompiler" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }

[plugins]
android-library = { id = "com.android.library", version.ref = "agpVersion" }
android-application = { id = "com.android.application", version.ref = "agpVersion" }

kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinVersion" }
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

[bundles]
compose = [
"compose-ui", "compose-ui-graphics", "compose-ui-tooling-preview", "compose-material3", "compose-foundation"
]
ktor = [
"ktor-client-core", "ktor-client-okhttp", "ktor-client-logging",
"ktor-client-content-negotiation", "ktor-serialization-kotlinx-json"
]
]
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Nov 26 20:44:52 EST 2023
#Wed Dec 11 02:43:47 TRT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 8 additions & 6 deletions network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ plugins {

android {
namespace = "com.androidfactory.network"
compileSdk = libs.versions.compileSdk.get().toInt()
compileSdk = 35

defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
minSdk = 24

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
Expand All @@ -29,15 +28,18 @@ android {
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = "11"
}
}

dependencies {

implementation(libs.bundles.ktor)

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}
10 changes: 8 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
pluginManagement {
repositories {
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
Expand All @@ -13,6 +19,6 @@ dependencyResolutionManagement {
}
}

rootProject.name = "Simple Rick"
rootProject.name = "JetRickUniverse"
include(":app")
include(":network")