From b3c49b44734ece58e096cd866e29dd78ce5c5602 Mon Sep 17 00:00:00 2001 From: Sam Stern Date: Fri, 20 Sep 2019 09:54:45 -0700 Subject: [PATCH 1/3] ss-fix-build --- SmsVerification/README.md | 1 + SmsVerification/app/build.gradle | 6 ++++-- SmsVerification/build.gradle | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/SmsVerification/README.md b/SmsVerification/README.md index 33e627c7..fe0d2e06 100644 --- a/SmsVerification/README.md +++ b/SmsVerification/README.md @@ -22,6 +22,7 @@ the HTTP endpoint the app uses to send the SMS). The format is: 0000000000 + 0000000000 https://your-server.com/api/verify https://your-server.com/api/request https://your-server.com/api/reset diff --git a/SmsVerification/app/build.gradle b/SmsVerification/app/build.gradle index 51a18b99..bc1a520f 100644 --- a/SmsVerification/app/build.gradle +++ b/SmsVerification/app/build.gradle @@ -8,7 +8,9 @@ android { debug { // Note: mutual dependency between this file, and SMS generated by // server. (See README.md.) - storeFile file('../debug.keystore') + if (new File('../debug.keystore').exists()) { + storeFile file('../debug.keystore') + } } } @@ -49,7 +51,7 @@ dependencies { compile 'com.google.android.gms:play-services-auth-api-phone:11.0.1' compile 'com.android.support:support-v4:25.3.1' testCompile 'junit:junit:4.12' - compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7' + compile 'com.android.support.constraint:constraint-layout:1.0.2' } apply plugin: 'com.google.gms.google-services' diff --git a/SmsVerification/build.gradle b/SmsVerification/build.gradle index efd9c417..9bbdbd0e 100644 --- a/SmsVerification/build.gradle +++ b/SmsVerification/build.gradle @@ -2,6 +2,9 @@ buildscript { repositories { + maven { + url 'https://maven.google.com' + } jcenter() } dependencies { @@ -15,6 +18,9 @@ buildscript { allprojects { repositories { + maven { + url 'https://maven.google.com' + } jcenter() } } From 5fcc0361ab979da97b7be154a9a2d75c50ce79c1 Mon Sep 17 00:00:00 2001 From: Jeremy Walker Date: Tue, 24 Sep 2019 09:51:06 -0700 Subject: [PATCH 2/3] Update LICENSE --- LICENSE | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE b/LICENSE index 1bbf2a29..549dddff 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ From ce38deceb5a1096684d0c6f4d7811a0c87a7ae84 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Wed, 25 Sep 2019 14:43:21 +0900 Subject: [PATCH 3/3] Fix the build - Include a fake google-services.json - Include the placeholder strings for URLs in the strings.xml - Remove app/google-services.json from the gitignore so that a fake file can be in the repository - Use google() for adding the google maven repository - Replace compile as implementation in the build.gradle --- SmsVerification/.gitignore | 1 - SmsVerification/app/build.gradle | 23 ++++---- SmsVerification/app/google-services.json | 59 +++++++++++++++++++ .../app/src/main/res/values/strings.xml | 6 ++ SmsVerification/build.gradle | 10 +--- .../gradle/wrapper/gradle-wrapper.properties | 4 +- 6 files changed, 81 insertions(+), 22 deletions(-) create mode 100644 SmsVerification/app/google-services.json diff --git a/SmsVerification/.gitignore b/SmsVerification/.gitignore index 6100031c..75535ba2 100644 --- a/SmsVerification/.gitignore +++ b/SmsVerification/.gitignore @@ -9,4 +9,3 @@ .externalNativeBuild sensitive.xml debug.keystore -app/google-services.json diff --git a/SmsVerification/app/build.gradle b/SmsVerification/app/build.gradle index bc1a520f..3566e35b 100644 --- a/SmsVerification/app/build.gradle +++ b/SmsVerification/app/build.gradle @@ -37,21 +37,20 @@ repositories { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:25.3.1' - compile 'com.android.volley:volley:1.0.0' - compile 'com.android.support:design:25.3.1' - compile 'com.google.android.gms:play-services-base:11.0.1' - compile 'com.google.android.gms:play-services-identity:11.0.1' - compile 'com.google.android.gms:play-services-auth:11.0.1' - compile 'com.google.android.gms:play-services-auth-api-phone:11.0.1' - compile 'com.android.support:support-v4:25.3.1' - testCompile 'junit:junit:4.12' - compile 'com.android.support.constraint:constraint-layout:1.0.2' + 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' } apply plugin: 'com.google.gms.google-services' diff --git a/SmsVerification/app/google-services.json b/SmsVerification/app/google-services.json new file mode 100644 index 00000000..bb3e73a9 --- /dev/null +++ b/SmsVerification/app/google-services.json @@ -0,0 +1,59 @@ +{ + "project_info": { + "project_number": "0000000000", + "firebase_url": "https://xxxxxxxxx.firebaseio.com", + "project_id": "xxxxxxxxxxx", + "storage_bucket": "xxxxxxxxxxxxx" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:000000000:android:fake_mobile_sdk_app_id", + "android_client_info": { + "package_name": "com.google.samples.smartlock.sms_verify" + } + }, + "oauth_client": [ + { + "client_id": "fake_client_id.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "fake_client_id.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.google.samples.smartlock.sms_verify", + "certificate_hash": "fake_certificate_hash" + } + }, + { + "client_id": "fake_client_id.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "fake_current_key" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 2, + "other_platform_oauth_client": [ + { + "client_id": "fake_client_id.apps.googleusercontent.com", + "client_type": 3 + } + ] + }, + "ads_service": { + "status": 2 + } + } + } + ], + "configuration_version": "1" +} diff --git a/SmsVerification/app/src/main/res/values/strings.xml b/SmsVerification/app/src/main/res/values/strings.xml index d6fb8dac..6622a3ee 100644 --- a/SmsVerification/app/src/main/res/values/strings.xml +++ b/SmsVerification/app/src/main/res/values/strings.xml @@ -42,4 +42,10 @@ Server sent SMS Verifying SMS Reset Verification + + 0000000000 + 0000000000 + https://your-server.com/api/verify + https://your-server.com/api/request + https://your-server.com/api/reset diff --git a/SmsVerification/build.gradle b/SmsVerification/build.gradle index 9bbdbd0e..041b1e9a 100644 --- a/SmsVerification/build.gradle +++ b/SmsVerification/build.gradle @@ -2,13 +2,11 @@ buildscript { repositories { - maven { - url 'https://maven.google.com' - } + google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.google.gms:google-services:3.0.0' // provides com.google.gms.google-services plugin // NOTE: Do not place your application dependencies here; they belong @@ -18,9 +16,7 @@ buildscript { allprojects { repositories { - maven { - url 'https://maven.google.com' - } + google() jcenter() } } diff --git a/SmsVerification/gradle/wrapper/gradle-wrapper.properties b/SmsVerification/gradle/wrapper/gradle-wrapper.properties index 6d91c2c4..0a27575e 100644 --- a/SmsVerification/gradle/wrapper/gradle-wrapper.properties +++ b/SmsVerification/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed May 03 18:24:44 BST 2017 +#Wed Sep 25 14:30:25 JST 2019 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-5.4.1-all.zip