Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
- OneTapSignInWithGoogleButton added.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevdza-san committed Dec 14, 2023
1 parent c007de5 commit 3580d57
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

6 changes: 3 additions & 3 deletions onetap/build.gradle
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.6'
kotlinCompilerExtensionVersion '1.5.5'
}
publishing {
singleVariant("release") {
@@ -45,7 +45,7 @@ android {

dependencies {
// Compose
implementation 'androidx.activity:activity-compose:1.8.0'
implementation 'androidx.activity:activity-compose:1.8.1'
implementation("androidx.compose.material3:material3:1.1.2")
debugImplementation("androidx.compose.ui:ui-tooling:1.5.4")
implementation("androidx.compose.ui:ui-tooling-preview:1.5.4")
@@ -62,7 +62,7 @@ publishing {
release(MavenPublication) {
groupId = 'com.github.stevdza-san'
artifactId = 'OneTapCompose'
version = '1.0.9'
version = '1.0.10'

afterEvaluate {
from components.release
5 changes: 0 additions & 5 deletions onetap/src/main/java/com/stevdzasan/onetap/Buttons.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.stevdzasan.onetap

import android.util.Log
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Box
@@ -97,14 +96,12 @@ fun OneTapSignInWithGoogleButton(
rememberAccount = rememberAccount,
nonce = nonce,
onTokenIdReceived = { tokenId ->
Log.d(ButtonTAG, "onTokenIdReceived: $tokenId")
onTokenIdReceived?.invoke(tokenId)
getUserFromTokenId(tokenId = tokenId)?.let { googleUser ->
onUserReceived?.invoke(googleUser)
}
},
onDialogDismissed = { message ->
Log.d(ButtonTAG, message)
onDialogDismissed?.invoke(message)
}
)
@@ -145,8 +142,6 @@ private val RobotoFontFamily = FontFamily(
)
)

private const val ButtonTAG = "OneTapSignInWithGoogle"

@Preview
@Composable
private fun LightIconButtonPreview() {

0 comments on commit 3580d57

Please sign in to comment.