Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 33 additions & 32 deletions BlockStore/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,21 @@
* limitations under the License.
*/
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'dagger.hilt.android.plugin'
id 'kotlin-kapt'
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.hilt.android)
alias(libs.plugins.kotlin.kapt)
}

android {
compileSdkVersion 31
buildToolsVersion "30.0.3"

compileSdk 35
namespace "com.google.android.gms.identity.sample.blockstore"
defaultConfig {
applicationId "com.google.android.gms.identity.sample.blockstore"
minSdkVersion 21
targetSdkVersion 31
minSdk 21
targetSdk 35
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -44,42 +42,45 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.gms:play-services-auth-blockstore:16.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.test.espresso:espresso-idling-resource:3.4.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
implementation libs.kotlin.stdlib
implementation libs.play.services.auth.blockstore
implementation libs.material.design
implementation libs.androidx.core.ktx
implementation libs.androidx.appcompat
implementation libs.androidx.constraintlayout
implementation libs.androidx.espresso.idling.resource
testImplementation libs.junit
debugImplementation libs.androidx.test.monitor
androidTestImplementation libs.androidx.espresso.core
androidTestImplementation libs.androidx.test.ext.junit

// Hilt
implementation 'com.google.dagger:hilt-android:2.37'
kapt 'com.google.dagger:hilt-android-compiler:2.37'
implementation 'androidx.hilt:hilt-work:1.0.0'
kapt 'androidx.hilt:hilt-compiler:1.0.0'
implementation libs.hilt.android
kapt libs.hilt.android.compiler
implementation libs.hilt.work
kapt libs.hilt.compiler

// Lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0-alpha03"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"
implementation libs.androidx.lifecycle.viewmodel.ktx
implementation libs.androidx.lifecycle.livedata.ktx
implementation libs.androidx.lifecycle.common.java8

// Activity
implementation "androidx.activity:activity-ktx:1.3.1"
implementation libs.androidx.activity.ktx

// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.4.3"
implementation libs.kotlinx.coroutines.play.services
}
7 changes: 4 additions & 3 deletions BlockStore/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms.identity.sample.blockstore">
<manifest
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="false"
Expand All @@ -22,7 +22,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BlockStore">
<activity android:name=".MainActivity"
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
31 changes: 7 additions & 24 deletions BlockStore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,13 @@
* limitations under the License.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.21"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.hilt.android) apply false
}

allprojects {
repositories {
google()
mavenCentral()
}
tasks.register('clean', Delete) {
delete rootProject.fileTree("build")
}

task clean(type: Delete) {
delete rootProject.buildDir
}
48 changes: 48 additions & 0 deletions BlockStore/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[versions]
android_gradle_plugin = '8.6.0'
hilt_android = "2.52"
hilt = "1.2.0"
kotlin = '2.0.0'
kotlinx_coroutines = '1.7.3'
junit = '4.13.2'
material_design = '1.12.0'
androidx_core = '1.13.1'
androidx_activity = '1.9.2'
androidx_appcompat = '1.7.0'
androidx_constraintlayout = '2.1.4'
play_services_auth_blockstore = "16.4.0"
androidx_lifecycle = '2.8.5'
androidx_test_ext_junit = '1.2.1'
androidx_test_monitor = '1.7.2'
androidx_test_espresso = '3.6.1'


[plugins]
android_application = { id = "com.android.application", version.ref = "android_gradle_plugin" }
android_library = { id = "com.android.library", version.ref = "android_gradle_plugin" }
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin_kapt = { id = "org.jetbrains.kotlin.kapt" }
hilt_android = { id = "com.google.dagger.hilt.android", version.ref = "hilt_android" }

[libraries]
hilt_compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "hilt" }
hilt_work = { module = "androidx.hilt:hilt-work", version.ref = "hilt" }
hilt_android = { module = "com.google.dagger:hilt-android", version.ref = "hilt_android" }
hilt_android_compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt_android" }
junit = { module = "junit:junit", version.ref = "junit" }
kotlin_stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinx_coroutines_play_services = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "kotlinx_coroutines" }
material_design = { module = "com.google.android.material:material", version.ref = "material_design" }
androidx_core_ktx = { module = "androidx.core:core-ktx", version.ref = "androidx_core" }
androidx_activity_ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx_activity" }
androidx_appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx_appcompat" }
androidx_constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx_constraintlayout" }
play_services_auth_blockstore = { module = "com.google.android.gms:play-services-auth-blockstore", version.ref = "play_services_auth_blockstore" }
androidx_lifecycle_common_java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidx_lifecycle" }
androidx_lifecycle_livedata_ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidx_lifecycle" }
androidx_lifecycle_viewmodel_ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx_lifecycle" }
androidx_test_monitor = { module = "androidx.test:monitor", version.ref = "androidx_test_monitor" }
androidx_test_ext_junit = { module = "androidx.test.ext:junit", version.ref = "androidx_test_ext_junit" }
androidx_espresso_core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidx_test_espresso" }
androidx_espresso_idling_resource = { module = "androidx.test.espresso:espresso-idling-resource", version.ref = "androidx_test_espresso" }

2 changes: 1 addition & 1 deletion BlockStore/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
#Thu Aug 19 16:25:07 EDT 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
14 changes: 14 additions & 0 deletions BlockStore/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "BlockStore"
include ':app'
71 changes: 37 additions & 34 deletions CredentialManager/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
*/

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
repositories {
google()
mavenCentral()
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.hilt.android)
alias(libs.plugins.kotlin.kapt)
}

// Load keystore properties for our signing key
Expand All @@ -31,15 +29,13 @@ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
namespace 'com.google.credentialmanager.sample'
compileSdk 34
compileSdkPreview "VanillaIceCream"
compileSdk 35
defaultConfig {
applicationId "com.google.credentialmanager.sample"
minSdk 21
targetSdkPreview "VanillaIceCream"
targetSdk 35
versionCode 1
versionName "1.0"

versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
Expand All @@ -55,7 +51,6 @@ android {
}
}


buildTypes {
release {
applicationIdSuffix ".release"
Expand All @@ -67,19 +62,17 @@ android {
debug {
signingConfig signingConfigs.config
}

}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

composeOptions {
kotlinCompilerExtensionVersion = "1.4.2"
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
Expand All @@ -89,27 +82,37 @@ android {
buildFeatures {
viewBinding true
}

hilt {
enableAggregatingTask = true
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation libs.androidx.core.ktx
implementation libs.androidx.appcompat
implementation libs.material.design
implementation libs.androidx.constraintlayout

implementation libs.androidx.credentials.play.auth
implementation libs.androidx.credentials

implementation 'androidx.credentials:credentials-play-services-auth:1.5.0-alpha02'
implementation 'androidx.credentials:credentials:1.5.0-alpha02'
implementation libs.kotlin.coroutines.core
implementation libs.kotlin.coroutines.android

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation libs.androidx.lifecycle.runtime.ktx
implementation libs.androidx.lifecycle.viewmodel.ktx
implementation libs.androidx.lifecycle.runtime.compose

implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation "androidx.lifecycle:lifecycle-runtime-compose:2.6.2"
// Hilt
implementation libs.hilt.android
kapt libs.hilt.android.compiler
implementation libs.hilt.work
kapt libs.hilt.compiler

testImplementation libs.junit
debugImplementation libs.androidx.test.monitor
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.espresso.core
}
3 changes: 2 additions & 1 deletion CredentialManager/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.CredentialManagerSample"
tools:targetApi="31">
android:enableOnBackInvokedCallback="true"
tools:targetApi="tiramisu">
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.credentialmanager.sample


import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent

/**
* Hilt module that provides singleton (application-scoped) objects.
*/
@Module
@InstallIn(SingletonComponent::class)
class AppModule {}
Loading