Skip to content

Commit

Permalink
Re-apply "Update AGP to 4.2.x for Java 11 compatibility purpose"
Browse files Browse the repository at this point in the history
This reverts commit e8621a7.
  • Loading branch information
ggfan committed Jun 28, 2021
1 parent 5146ba1 commit 98e7841
Show file tree
Hide file tree
Showing 32 changed files with 109 additions and 92 deletions.
16 changes: 9 additions & 7 deletions AccountTransferApi/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
compileSdkVersion 30
buildToolsVersion '30.0.3'
defaultConfig {
applicationId "com.google.accounttransfer.sample"
minSdkVersion 19
targetSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -20,8 +20,10 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.+'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
// For Account Transfer api, use SDK version 11.2.0 or higher
compile 'com.google.android.gms:play-services-auth-base:11.2.0'
}
implementation 'com.google.android.gms:play-services-auth-base:17.1.2'
}

4 changes: 4 additions & 0 deletions AccountTransferApi/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.accounttransfer.sample">

<uses-permission
android:name="android.permission.GET_ACCOUNTS"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import android.content.Intent;
import android.os.Build;
import android.os.IBinder;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.util.Log;
import com.google.android.gms.auth.api.accounttransfer.AccountTransfer;
import com.google.android.gms.auth.api.accounttransfer.AccountTransferClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import android.accounts.AccountManager;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
Expand Down
11 changes: 5 additions & 6 deletions AccountTransferApi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

buildscript {
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:4.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -14,10 +15,8 @@ buildscript {

allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
google()
mavenCentral()
}
}

Expand Down
2 changes: 2 additions & 0 deletions AccountTransferApi/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useAndroidX=true
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
13 changes: 7 additions & 6 deletions CredentialsQuickstart/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.google.example.credentialsbasic"
minSdkVersion 17
targetSdkVersion 27
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
Expand All @@ -20,9 +20,10 @@ android {
}

dependencies {
compile 'com.android.support:appcompat-v7:27.0.2'
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'

compile 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'

compile 'com.google.api-client:google-api-client:1.22.0'
implementation 'com.google.api-client:google-api-client:1.22.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:layout_height="match_parent"
tools:context=".MainActivity">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -39,7 +39,7 @@
android:visibility="invisible"
tools:visibility="visible" />

</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>

<EditText
android:id="@+id/edit_text_email"
Expand Down
7 changes: 3 additions & 4 deletions CredentialsQuickstart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildscript {
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:4.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,8 +15,7 @@ buildscript {

allprojects {
repositories {
jcenter()
google()
mavenLocal()
mavenCentral()
}
}
2 changes: 2 additions & 0 deletions CredentialsQuickstart/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useAndroidX=true
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
13 changes: 7 additions & 6 deletions CredentialsSignIn/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.google.example.credentialssignin"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
Expand All @@ -20,8 +20,9 @@ android {
}

dependencies {
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.cardview:cardview:1.0.0'

implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
Expand Down
8 changes: 4 additions & 4 deletions CredentialsSignIn/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:orientation="vertical"
android:overScrollMode="always">

<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/google_sign_in_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -56,9 +56,9 @@

</LinearLayout>

</android.support.v7.widget.CardView>
</androidx.cardview.widget.CardView>

<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/email_sign_in_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -113,7 +113,7 @@

</LinearLayout>

</android.support.v7.widget.CardView>
</androidx.cardview.widget.CardView>

</LinearLayout>

Expand Down
6 changes: 3 additions & 3 deletions CredentialsSignIn/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildscript {
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:4.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,7 +15,7 @@ buildscript {

allprojects {
repositories {
jcenter()
google()
mavenCentral()
}
}
4 changes: 4 additions & 0 deletions CredentialsSignIn/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
2 changes: 1 addition & 1 deletion CredentialsSignIn/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
25 changes: 12 additions & 13 deletions SmsVerification/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
compileSdkVersion 30
buildToolsVersion '30.0.3'

signingConfigs {
debug {
Expand All @@ -17,7 +17,7 @@ android {
defaultConfig {
applicationId "com.google.samples.smartlock.sms_verify"
minSdkVersion 23
targetSdkVersion 25
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -41,16 +41,15 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})

implementation 'com.android.support:appcompat-v7:25.3.1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:design:25.3.1'
implementation 'com.google.android.gms:play-services-base:11.0.1'
implementation 'com.google.android.gms:play-services-identity:11.0.1'
implementation 'com.google.android.gms:play-services-auth:11.0.1'
implementation 'com.google.android.gms:play-services-auth-api-phone:11.0.1'
implementation 'com.android.support:support-v4:25.3.1'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'com.android.volley:volley:1.2.0'
implementation 'com.google.android.gms:play-services-base:17.6.0'
implementation 'com.google.android.gms:play-services-identity:17.0.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.google.android.gms:play-services-auth-api-phone:17.5.1'
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
}

apply plugin: 'com.google.gms.google-services'
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.LocalBroadcastManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.NotificationCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import android.util.Log;
import android.widget.Toast;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

/**
* Created by pmatthews on 9/14/16.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.widget.Toolbar;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.widget.Toolbar;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Loading

0 comments on commit 98e7841

Please sign in to comment.