Skip to content

Commit

Permalink
Migrated to Kotlin Dsl
Browse files Browse the repository at this point in the history
The gradle files are updated from gradle groovy to gradle kotlin.
The dependencies are also updated and using ksp rather than kapt
  • Loading branch information
tuuhin committed Nov 2, 2023
1 parent 690d81f commit d6acf3b
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 117 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

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

3 changes: 2 additions & 1 deletion .idea/misc.xml

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

101 changes: 0 additions & 101 deletions app/build.gradle

This file was deleted.

99 changes: 99 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
plugins {
id("com.android.application")
kotlin("android")
id("com.google.devtools.ksp")
id("com.google.dagger.hilt.android")
}

android {
namespace = "com.eva.reminders"
compileSdk = 34

defaultConfig {
applicationId = "com.eva.reminders"
minSdk = 28
targetSdk = 34
versionCode = 1
versionName = "1.0"

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

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.0"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
arg("room.generateKotlin", "true")
}

dependencies {
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.activity:activity-compose:1.8.0")
implementation(platform("androidx.compose:compose-bom:2023.10.01"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
// dependency injection
implementation("com.google.dagger:hilt-android:2.48")
ksp("com.google.dagger:hilt-android-compiler:2.48")
//navigation
implementation("androidx.navigation:navigation-compose:2.7.4")
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
//room
implementation("androidx.room:room-ktx:2.6.0")
implementation("androidx.room:room-runtime:2.6.0")
annotationProcessor("androidx.room:room-compiler:2.6.0")
ksp("androidx.room:room-compiler:2.6.0")
//icons
implementation("androidx.compose.material:material-icons-extended:1.5.4")
// lifecycle utils for for Compose
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.2")
//datastore
implementation("androidx.datastore:datastore-preferences:1.0.0")
//splash
implementation("androidx.core:core-splashscreen:1.1.0-alpha02")
//tests
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
// espresso
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
// compose tests
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
//tooling
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
11 changes: 0 additions & 11 deletions build.gradle

This file was deleted.

6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plugins {
id("com.android.application") version "8.1.2" apply false
kotlin("android") version "1.9.0" apply false
id("com.google.dagger.hilt.android") version "2.48" apply false
id("com.google.devtools.ksp") version "1.9.0-1.0.13" apply false
}
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 Apr 11 00:52:00 IST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencyResolutionManagement {
}
}
rootProject.name = "Reminders"
include ':app'
include(":app")

0 comments on commit d6acf3b

Please sign in to comment.