Skip to content

Commit

Permalink
Merge pull request #63 from PetJournal/feature/update-dependencies
Browse files Browse the repository at this point in the history
feat: update gradle to kotlin dsl
  • Loading branch information
gusoliveira21 authored Jun 4, 2024
2 parents 374492a + 18806a7 commit 26ba5ab
Show file tree
Hide file tree
Showing 21 changed files with 299 additions and 243 deletions.
116 changes: 0 additions & 116 deletions petJournal/app/build.gradle

This file was deleted.

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

android {
namespace = "com.soujunior.petjournal"
compileSdk = 34

defaultConfig {
applicationId = "com.soujunior.petjournal"
minSdk = 27
targetSdk = 34
versionCode = 6
versionName = "1.0.6"

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.6"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {
implementation(project(":domain"))
implementation(project(":database"))
implementation(project(":data"))

val composeUiVersion = "1.4.2"

implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1")
implementation("io.insert-koin:koin-core:3.1.2")
implementation("io.insert-koin:koin-android:3.1.2")
implementation("io.insert-koin:koin-androidx-compose:3.1.2")
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.moshi:moshi-kotlin:1.12.0")
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")

// Room
// val roomVersion = "2.3.0"
// implementation("androidx.room:room-runtime:$roomVersion")
// kapt("androidx.room:room-compiler:$roomVersion")
// implementation("androidx.room:room-ktx:$roomVersion")

// Room
// val roomVersion = "2.3.0"
// implementation("androidx.room:room-runtime:$roomVersion")
// ksp("androidx.room:room-compiler:$roomVersion")
// implementation("androidx.room:room-ktx:$roomVersion")
// Room
val roomVersion = "2.3.0"
implementation("androidx.room:room-runtime:$roomVersion")
ksp("androidx.room:room-compiler:$roomVersion")

implementation("androidx.room:room-ktx:$roomVersion")

// BANNERSLIDER
implementation("io.coil-kt:coil-compose:1.4.0")
implementation("com.google.accompanist:accompanist-pager-indicators:0.13.0")

// MATERIAL 2
implementation("androidx.compose.material:material:$composeUiVersion")
implementation("androidx.compose.material:material-icons-extended:$composeUiVersion")
// MATERIAL 3 - MATERIAL YOU
implementation("com.google.android.material:material:1.9.0")

// MATERIAL 3 - STATUS BAR
implementation("com.google.accompanist:accompanist-systemuicontroller:0.30.1")
implementation("androidx.navigation:navigation-compose:2.6.0-beta01")
implementation("androidx.compose.material3:material3:1.1.2")
// COMPOSE
implementation("androidx.activity:activity-compose:1.7.1")
implementation("androidx.compose.ui:ui:$composeUiVersion")
implementation("androidx.compose.ui:ui-tooling-preview:$composeUiVersion")
implementation("androidx.compose.ui:ui-util:$composeUiVersion")

implementation("com.github.bumptech.glide:glide:4.12.0")
ksp("com.github.bumptech.glide:ksp:4.14.2")
//kapt("com.github.bumptech.glide:compiler:4.12.0")

// TESTE - COMPOSE
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$composeUiVersion")
debugImplementation("androidx.compose.ui:ui-tooling:$composeUiVersion")
debugImplementation("androidx.compose.ui:ui-test-manifest:$composeUiVersion")

testImplementation("androidx.arch.core:core-testing:2.2.0")
implementation("androidx.work:work-runtime-ktx:2.8.1")
androidTestImplementation("androidx.test:rules:1.5.0")
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("androidx.arch.core:core-testing:2.1.0")

testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.2")
testImplementation("junit:junit:4.13.2")
testImplementation("io.mockk:mockk:1.12.0")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.25")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
}
2 changes: 1 addition & 1 deletion petJournal/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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.soujunior.petjournal.di.mainModule
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.startKoin
import org.koin.core.logger.Level

class PetJournalApplicationKoin : Application() {
override fun onCreate() {
Expand All @@ -15,7 +16,8 @@ class PetJournalApplicationKoin : Application() {

private fun setupKoin() {
startKoin {
androidLogger()
//androidLogger()
androidLogger(Level.ERROR)
androidContext(this@PetJournalApplicationKoin)
modules(mainModule)
}
Expand Down
11 changes: 0 additions & 11 deletions petJournal/build.gradle

This file was deleted.

38 changes: 38 additions & 0 deletions petJournal/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
buildscript {
apply(from = "dependencies.gradle")
extra["compose_ui_version"] = "1.4.2"

repositories {
google()
mavenCentral()
}

dependencies {
classpath("com.android.tools.build:gradle:8.2.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21")
classpath("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.21-1.0.16")
// classpath("com.google.dagger:hilt-android-gradle-plugin:2.46.1")
}
// plugins{
//id("com.google.devtools.ksp") version "1.8.10-1.0.9" apply false
// }
}

//allprojects {
// repositories {
// google()
// mavenCentral()
// }
//}


//allprojects {
// repositories {
// google()
// mavenCentral()
// }
//}

tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
8 changes: 8 additions & 0 deletions petJournal/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins{
`kotlin-dsl`
}

repositories {
mavenCentral()
google()
}
Empty file.
Binary file added petJournal/buildSrc/build/libs/buildSrc.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions petJournal/buildSrc/build/tmp/jar/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

53 changes: 0 additions & 53 deletions petJournal/data/build.gradle

This file was deleted.

Loading

0 comments on commit 26ba5ab

Please sign in to comment.