Skip to content

Commit

Permalink
migrated groovy to kts
Browse files Browse the repository at this point in the history
  • Loading branch information
Girish Garg committed Mar 13, 2023
1 parent a79bb02 commit 0550f60
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 132 deletions.
114 changes: 0 additions & 114 deletions app/build.gradle

This file was deleted.

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

android {
namespace = "com.example.alarmgroups"
compileSdk = 33

defaultConfig {
applicationId = "com.girish.alarmgroups"
minSdk = 26
targetSdk = 33
versionCode = 1
versionName = "1.0.0"

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

buildTypes {
getByName("debug") {
isDebuggable = true
}
getByName("release") {
isMinifyEnabled = true
isDebuggable = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += listOf("-Xjvm-default=all")

}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.1.1"
}
packagingOptions {
resources {
excludes.add("/META-INF/{AL2.0,LGPL2.1}")
}
}
}

dependencies {
val composeUiVersion = "1.1.1"
implementation(libs.androidx.core.ktx)
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1")
implementation("androidx.activity:activity-compose:1.3.1")
implementation("androidx.compose.ui:ui:$composeUiVersion")
implementation("androidx.compose.ui:ui-tooling-preview:$composeUiVersion")
implementation("androidx.compose.material:material:1.1.1")
implementation("com.google.android.material:material:1.4.0")
implementation("androidx.appcompat:appcompat:1.6.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
implementation("androidx.navigation:navigation-ui-ktx:2.5.3")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$composeUiVersion")
debugImplementation("androidx.compose.ui:ui-tooling:$composeUiVersion")
debugImplementation("androidx.compose.ui:ui-test-manifest:$composeUiVersion")
implementation("androidx.compose.material:material-icons-extended:1.3.1")

// Kotlin Extensions and Coroutines support for Room
implementation("androidx.room:room-ktx:2.5.0")

// Room
implementation("androidx.room:room-runtime:2.5.0")
kapt("androidx.room:room-compiler:2.5.0")

// Hilt
implementation("com.google.dagger:hilt-android:2.44.2")
kapt("com.google.dagger:hilt-compiler:2.44.2")
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")

// Compose
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1")

// Navigation in compose
implementation("androidx.navigation:navigation-compose:2.5.3")
implementation("com.google.accompanist:accompanist-navigation-animation:0.28.0")

// Accompanist
implementation("com.google.accompanist:accompanist-swiperefresh:0.28.0")
implementation("com.google.accompanist:accompanist-systemuicontroller:0.27.0")

// Wheel Picker
implementation("com.github.gargVader:WheelPickerCompose:Release")
coreLibraryDesugaring ("com.android.tools:desugar_jdk_libs:1.1.6")

// Moshi - Type Converter
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")

// Leak Canary
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.10")

}
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
15 changes: 0 additions & 15 deletions build.gradle

This file was deleted.

12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
buildscript {
repositories {
google()
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "7.3.1" apply false
id("com.android.library") version "7.3.1" apply false
id("org.jetbrains.kotlin.android") version "1.6.10" apply false
id("com.google.dagger.hilt.android") version "2.44" apply false
}

21 changes: 21 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[versions]
compose_ui_version = "1.1.1"
androidxCore = "1.9.0"
androidxLifecycle = "2.3.1"
androidxActivity = "1.3.1"
androidxComposeUi = "1.1.1"
androidxAppcompat = "1.6.0"


[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" }
androidx-lifecycle-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidxLifecycle" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidxActivity" }

androidx-compose-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "androidxComposeUi" }
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "androidxComposeUi" }
androidx-compose-material = { group = "androidx.compose.material", name = "material", version.ref = "androidxComposeUi" }

androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppcompat"}


4 changes: 2 additions & 2 deletions settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url = uri("https://jitpack.io") }
}
}
rootProject.name = "AlarmGroups"
include ':app'
include(":app")

0 comments on commit 0550f60

Please # to comment.