Skip to content

Duplicate class  #75

@matosagencia

Description

@matosagencia

Duplicate class com.google.gson.stream.MalformedJsonException found in modules gson-2.8.5.jar -> gson-2.8.5 (com.google.code.gson:gson:2.8.5) and pagpay-1.1.1.aar -> pagpay-1.1.1-runtime (br.com.uol.pagseguro:pagpay:1.1.1)

`plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
id("kotlin-kapt") // Para geração de código Room e Glide
}

android {
namespace = "com.example.lfmachine"
compileSdk = 35

defaultConfig {
    applicationId = "com.example.lfmachine"
    minSdk = 21
    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.1"
}
packaging {
    resources {
        excludes += "/META-INF/{AL2.0,LGPL2.1}"
    }
}

}

dependencies {
configurations.all {
resolutionStrategy {
force("com.google.code.gson:gson:2.8.5") // Replace with your desired version
}
}
// AndroidX e suporte de interface
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.appcompat)

// Retrofit para chamadas HTTP e Gson para conversão JSON
implementation ("com.squareup.retrofit2:retrofit:2.9.0")
implementation ("com.squareup.retrofit2:converter-gson:2.9.0")

// Glide para carregamento de imagens
implementation ("com.github.bumptech.glide:glide:4.12.0")
kapt ("com.github.bumptech.glide:compiler:4.12.0")

// Material Design Components
implementation ("com.google.android.material:material:1.4.0")

// Room para banco de dados local
implementation ("androidx.room:room-runtime:2.5.1")
kapt ("androidx.room:room-compiler:2.5.1")
implementation ("androidx.room:room-ktx:2.5.1")

// Testes com Room
testImplementation ("androidx.room:room-testing:2.5.1")

// Coroutines para operações assíncronas
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")

// ConstraintLayout para layouts responsivos
implementation ("androidx.constraintlayout:constraintlayout:2.2.0")

// Paging para gerenciamento de grandes conjuntos de dados
implementation ("androidx.paging:paging-runtime:3.1.1")

// Testes unitários e Android Test
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 ("androidx.work:work-runtime:2.7.0")
implementation ("com.github.bumptech.glide:glide:4.15.0")
annotationProcessor ("com.github.bumptech.glide:compiler:4.15.0")

implementation("br.com.uol.pagseguro:pagpay:1.1.1"){
    exclude(group = "com.google.code.gson", module = "gson")
}

// Declaração direta do Gson
implementation("com.google.code.gson:gson:2.8.5")

implementation ("androidx.core:core-ktx:1.12.0")

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions