stevdza-san / OneTapCompose

This library allow you to easily integrate One-Tap Sign in with Google(Credential Manager) in your project with Jetpack Compose. It keeps away all the boilerplate code.
Apache License 2.0
176 stars 15 forks source link

Failed to resolve: com.github.stevdza-san:OneTapCompose:1.0.3 #7

Closed sebapian closed 10 months ago

sebapian commented 10 months ago

Hi there, I'm currently following your course but all of a sudden I'm unable to resolve your OneTapCompose library. I am utilising your v1.0.3 and have maven { url 'https://jitpack.io } in settings.gradle. Do you know why this is the case?

stevdza-san commented 10 months ago

I've updated a readme file. Because if you're using .kts extension for a gradle build files, you do need to declare jitpack repository a little bit different.

sebapian commented 10 months ago

I am not using a .kts extension for my gradle build files. Below is my settings.gradle file. For some reason only OneTapCompose:1.0.3 isn't resolving, your MessageBarCompose is working fine!

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}
rootProject.name = "DiaryApp"
include ':app'

Below is the error:

FAILURE: Build completed with 8 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.stevdza-san:OneTapCompose:1.0.3.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/stevdza-san/OneTapCompose/1.0.3/OneTapCompose-1.0.3.pom
       - https://repo.maven.apache.org/maven2/com/github/stevdza-san/OneTapCompose/1.0.3/OneTapCompose-1.0.3.pom
       - https://jitpack.io/com/github/stevdza-san/OneTapCompose/1.0.3/OneTapCompose-1.0.3.pom
     Required by:
         project :app

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
stevdza-san commented 10 months ago

That's strange, because I've just now tested it out (1.0.3) and it works on my end.

sebapian commented 10 months ago

I've managed to solve this issue. This was due to my Gradle Version being 8.0. Changing it to 7.5 resolved the issue immediately.

sebapian commented 10 months ago

Sorry I would like to reopen, it is still not working. When I visit [https://jitpack.io/com/github/stevdza-san/OneTapCompose/1.0.3/build.log] the following shows: image

stevdza-san commented 10 months ago

Okay, so after debugging I've realized that I needed to update the Java version to 17. I've pushed a new release "1.0.7". Use that version now. I hope it works! :)

mkhalidibrahimi commented 10 months ago

still itt has issue my gradle is 8.0, here is the complete error message:

1: Task failed with an exception.

stevdza-san commented 10 months ago

Try using gradle version: "8.1.0".

mkhalidibrahimi commented 10 months ago

still the same issue here is my gradle code:

plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'com.google.gms.google-services' }

android { namespace 'com.authy.memo' compileSdk 33

defaultConfig {
    applicationId "com.authy.memo"
    minSdk 26
    targetSdk 33
    versionCode 1
    versionName "1.0"

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

buildTypes {
    release {
        minifyEnabled 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.3.2'
}
packagingOptions {
    resources {
        excludes += '/META-INF/{AL2.0,LGPL2.1}'
    }
}

}

stevdza-san commented 10 months ago

Have you tried the new 1.0.7 version? And also, don't forget to add the jitpack repo in the settings.gradle file:

.kts maven(url = "https://jitpack.io")

groovy

maven {
    url 'https://jitpack.io'
}
Jburgin9 commented 8 months ago

I know this is closed but I'm just commenting for anybody who may still run into a problem:

  1. Jitpack download: Add this to your setting gradle file maven { url = uri("https://jitpack.io") }
  2. If you are receiving the error that you can't resolve OneTapCompose, then disable offline mode and sign project again and you should be good to go

If me doing this is wrong please chime in and let me know!