Skip to content

Commit 30caa52

Browse files
committed
Integrate Latest @ 228601768
Changes to all ... - Changed gradle to use implementation instead of compile. - Update Firebase iOS to use 5.14.0. - Update Firebase Android dependencies, including removing firebase-common dependencies which is not needed. - Modify our testapps to use externalNativeBuild.ndkBuild rather than shellingout to call ndk-build. CL: 228601768
1 parent bc21e96 commit 30caa52

File tree

31 files changed

+198
-455
lines changed

31 files changed

+198
-455
lines changed

admob/testapp/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# AdMob test application.
44
target 'testapp' do
5-
pod 'Firebase/Core', '5.12.0'
6-
pod 'Firebase/AdMob', '5.12.0'
5+
pod 'Firebase/Core', '5.14.0'
6+
pod 'Firebase/AdMob', '5.14.0'
77
end

admob/testapp/build.gradle

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.1.0'
9+
classpath 'com.android.tools.build:gradle:3.2.1'
1010
classpath 'com.google.gms:google-services:4.0.1'
1111
}
1212
}
@@ -21,9 +21,6 @@ allprojects {
2121

2222
apply plugin: 'com.android.application'
2323

24-
// Pre-experimental Gradle plug-in NDK boilerplate below.
25-
// Right now the Firebase plug-in does not work with the experimental
26-
// Gradle plug-in so we're using ndk-build for the moment.
2724
project.ext {
2825
// Configure the Firebase C++ SDK location.
2926
firebase_cpp_sdk_dir = System.getProperty('firebase_cpp_sdk.dir')
@@ -46,22 +43,11 @@ project.ext {
4643
sprintf('Firebase C++ SDK directory %s does not exist',
4744
firebase_cpp_sdk_dir))
4845
}
49-
// Check the NDK location using the same configuration options as the
50-
// experimental Gradle plug-in.
51-
ndk_dir = project.android.ndkDirectory
52-
if (ndk_dir == null || !ndk_dir.exists()) {
53-
ndk_dir = System.getenv('ANDROID_NDK_HOME')
54-
if (ndk_dir == null || ndk_dir.isEmpty()) {
55-
throw new StopActionException(
56-
'Android NDK directory should be specified using the ndk.dir ' +
57-
'property or ANDROID_NDK_HOME environment variable.')
58-
}
59-
}
6046
}
6147

6248
android {
6349
compileSdkVersion 26
64-
buildToolsVersion '26.0.3'
50+
buildToolsVersion '28.0.3'
6551

6652
sourceSets {
6753
main {
@@ -74,11 +60,22 @@ android {
7460

7561
defaultConfig {
7662
applicationId 'com.google.android.admob.testapp'
77-
minSdkVersion 14
63+
minSdkVersion 16
7864
targetSdkVersion 26
7965
versionCode 1
8066
versionName '1.0'
67+
externalNativeBuild.ndkBuild {
68+
arguments "FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
69+
"NDK_APPLICTION_MK=jni/Application.mk",
70+
sprintf("APP_PLATFORM=android-%d",
71+
android.defaultConfig.minSdkVersion.mApiLevel)
72+
}
73+
}
74+
75+
externalNativeBuild.ndkBuild {
76+
path 'jni/Android.mk'
8177
}
78+
8279
buildTypes {
8380
release {
8481
minifyEnabled true
@@ -91,31 +88,8 @@ android {
9188
}
9289

9390
dependencies {
94-
compile 'com.google.firebase:firebase-core:16.0.5'
95-
compile 'com.google.firebase:firebase-ads:17.1.1'
96-
compile 'com.google.firebase:firebase-common:16.0.4'
91+
implementation 'com.google.firebase:firebase-core:16.0.6'
92+
implementation 'com.google.firebase:firebase-ads:17.1.2'
9793
}
9894

9995
apply plugin: 'com.google.gms.google-services'
100-
101-
task ndkBuildCompile(type:Exec) {
102-
description 'Use ndk-build to compile the C++ application.'
103-
commandLine("${project.ext.ndk_dir}${File.separator}ndk-build",
104-
"FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
105-
sprintf("APP_PLATFORM=android-%d",
106-
android.defaultConfig.minSdkVersion.mApiLevel))
107-
}
108-
109-
task ndkBuildClean(type:Exec) {
110-
description 'Use ndk-build to clean the C++ application.'
111-
commandLine("${project.ext.ndk_dir}${File.separator}ndk-build",
112-
"FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
113-
"clean")
114-
}
115-
116-
// Once the Android Gradle plug-in has generated tasks, add dependencies for
117-
// the ndk-build targets.
118-
project.afterEvaluate {
119-
preBuild.dependsOn(ndkBuildCompile)
120-
clean.dependsOn(ndkBuildClean)
121-
}

admob/testapp/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

analytics/testapp/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Analytics test application.
44
target 'testapp' do
5-
pod 'Firebase/Core', '5.12.0'
6-
pod 'Firebase/Analytics', '5.12.0'
5+
pod 'Firebase/Core', '5.14.0'
6+
pod 'Firebase/Analytics', '5.14.0'
77
end

analytics/testapp/build.gradle

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.1.0'
9+
classpath 'com.android.tools.build:gradle:3.2.1'
1010
classpath 'com.google.gms:google-services:4.0.1'
1111
}
1212
}
@@ -21,9 +21,6 @@ allprojects {
2121

2222
apply plugin: 'com.android.application'
2323

24-
// Pre-experimental Gradle plug-in NDK boilerplate below.
25-
// Right now the Firebase plug-in does not work with the experimental
26-
// Gradle plug-in so we're using ndk-build for the moment.
2724
project.ext {
2825
// Configure the Firebase C++ SDK location.
2926
firebase_cpp_sdk_dir = System.getProperty('firebase_cpp_sdk.dir')
@@ -46,22 +43,11 @@ project.ext {
4643
sprintf('Firebase C++ SDK directory %s does not exist',
4744
firebase_cpp_sdk_dir))
4845
}
49-
// Check the NDK location using the same configuration options as the
50-
// experimental Gradle plug-in.
51-
ndk_dir = project.android.ndkDirectory
52-
if (ndk_dir == null || !ndk_dir.exists()) {
53-
ndk_dir = System.getenv('ANDROID_NDK_HOME')
54-
if (ndk_dir == null || ndk_dir.isEmpty()) {
55-
throw new StopActionException(
56-
'Android NDK directory should be specified using the ndk.dir ' +
57-
'property or ANDROID_NDK_HOME environment variable.')
58-
}
59-
}
6046
}
6147

6248
android {
6349
compileSdkVersion 26
64-
buildToolsVersion '26.0.3'
50+
buildToolsVersion '28.0.3'
6551

6652
sourceSets {
6753
main {
@@ -74,11 +60,22 @@ android {
7460

7561
defaultConfig {
7662
applicationId 'com.google.android.analytics.testapp'
77-
minSdkVersion 14
63+
minSdkVersion 16
7864
targetSdkVersion 26
7965
versionCode 1
8066
versionName '1.0'
67+
externalNativeBuild.ndkBuild {
68+
arguments "FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
69+
"NDK_APPLICTION_MK=jni/Application.mk",
70+
sprintf("APP_PLATFORM=android-%d",
71+
android.defaultConfig.minSdkVersion.mApiLevel)
72+
}
73+
}
74+
75+
externalNativeBuild.ndkBuild {
76+
path 'jni/Android.mk'
8177
}
78+
8279
buildTypes {
8380
release {
8481
minifyEnabled true
@@ -91,31 +88,8 @@ android {
9188
}
9289

9390
dependencies {
94-
compile 'com.google.firebase:firebase-core:16.0.5'
95-
compile 'com.google.firebase:firebase-analytics:16.0.5'
96-
compile 'com.google.firebase:firebase-common:16.0.4'
91+
implementation 'com.google.firebase:firebase-core:16.0.6'
92+
implementation 'com.google.firebase:firebase-analytics:16.0.6'
9793
}
9894

9995
apply plugin: 'com.google.gms.google-services'
100-
101-
task ndkBuildCompile(type:Exec) {
102-
description 'Use ndk-build to compile the C++ application.'
103-
commandLine("${project.ext.ndk_dir}${File.separator}ndk-build",
104-
"FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
105-
sprintf("APP_PLATFORM=android-%d",
106-
android.defaultConfig.minSdkVersion.mApiLevel))
107-
}
108-
109-
task ndkBuildClean(type:Exec) {
110-
description 'Use ndk-build to clean the C++ application.'
111-
commandLine("${project.ext.ndk_dir}${File.separator}ndk-build",
112-
"FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
113-
"clean")
114-
}
115-
116-
// Once the Android Gradle plug-in has generated tasks, add dependencies for
117-
// the ndk-build targets.
118-
project.afterEvaluate {
119-
preBuild.dependsOn(ndkBuildCompile)
120-
clean.dependsOn(ndkBuildClean)
121-
}

analytics/testapp/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

auth/testapp/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Auth test application.
44
target 'testapp' do
5-
pod 'Firebase/Core', '5.12.0'
6-
pod 'Firebase/Auth', '5.12.0'
5+
pod 'Firebase/Core', '5.14.0'
6+
pod 'Firebase/Auth', '5.14.0'
77
end

auth/testapp/build.gradle

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.1.0'
9+
classpath 'com.android.tools.build:gradle:3.2.1'
1010
classpath 'com.google.gms:google-services:4.0.1'
1111
}
1212
}
@@ -21,9 +21,6 @@ allprojects {
2121

2222
apply plugin: 'com.android.application'
2323

24-
// Pre-experimental Gradle plug-in NDK boilerplate below.
25-
// Right now the Firebase plug-in does not work with the experimental
26-
// Gradle plug-in so we're using ndk-build for the moment.
2724
project.ext {
2825
// Configure the Firebase C++ SDK location.
2926
firebase_cpp_sdk_dir = System.getProperty('firebase_cpp_sdk.dir')
@@ -46,22 +43,11 @@ project.ext {
4643
sprintf('Firebase C++ SDK directory %s does not exist',
4744
firebase_cpp_sdk_dir))
4845
}
49-
// Check the NDK location using the same configuration options as the
50-
// experimental Gradle plug-in.
51-
ndk_dir = project.android.ndkDirectory
52-
if (ndk_dir == null || !ndk_dir.exists()) {
53-
ndk_dir = System.getenv('ANDROID_NDK_HOME')
54-
if (ndk_dir == null || ndk_dir.isEmpty()) {
55-
throw new StopActionException(
56-
'Android NDK directory should be specified using the ndk.dir ' +
57-
'property or ANDROID_NDK_HOME environment variable.')
58-
}
59-
}
6046
}
6147

6248
android {
6349
compileSdkVersion 26
64-
buildToolsVersion '26.0.3'
50+
buildToolsVersion '28.0.3'
6551

6652
sourceSets {
6753
main {
@@ -74,11 +60,22 @@ android {
7460

7561
defaultConfig {
7662
applicationId 'com.google.android.auth.testapp'
77-
minSdkVersion 14
63+
minSdkVersion 16
7864
targetSdkVersion 26
7965
versionCode 1
8066
versionName '1.0'
67+
externalNativeBuild.ndkBuild {
68+
arguments "FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
69+
"NDK_APPLICTION_MK=jni/Application.mk",
70+
sprintf("APP_PLATFORM=android-%d",
71+
android.defaultConfig.minSdkVersion.mApiLevel)
72+
}
73+
}
74+
75+
externalNativeBuild.ndkBuild {
76+
path 'jni/Android.mk'
8177
}
78+
8279
buildTypes {
8380
release {
8481
minifyEnabled true
@@ -91,31 +88,8 @@ android {
9188
}
9289

9390
dependencies {
94-
compile 'com.google.firebase:firebase-core:16.0.5'
95-
compile 'com.google.firebase:firebase-auth:16.0.5'
96-
compile 'com.google.firebase:firebase-common:16.0.4'
91+
implementation 'com.google.firebase:firebase-core:16.0.6'
92+
implementation 'com.google.firebase:firebase-auth:16.1.0'
9793
}
9894

9995
apply plugin: 'com.google.gms.google-services'
100-
101-
task ndkBuildCompile(type:Exec) {
102-
description 'Use ndk-build to compile the C++ application.'
103-
commandLine("${project.ext.ndk_dir}${File.separator}ndk-build",
104-
"FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
105-
sprintf("APP_PLATFORM=android-%d",
106-
android.defaultConfig.minSdkVersion.mApiLevel))
107-
}
108-
109-
task ndkBuildClean(type:Exec) {
110-
description 'Use ndk-build to clean the C++ application.'
111-
commandLine("${project.ext.ndk_dir}${File.separator}ndk-build",
112-
"FIREBASE_CPP_SDK_DIR=${project.ext.firebase_cpp_sdk_dir}",
113-
"clean")
114-
}
115-
116-
// Once the Android Gradle plug-in has generated tasks, add dependencies for
117-
// the ndk-build targets.
118-
project.afterEvaluate {
119-
preBuild.dependsOn(ndkBuildCompile)
120-
clean.dependsOn(ndkBuildClean)
121-
}

auth/testapp/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

database/testapp/Podfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Firebase Realtime Database test application.
44
target 'testapp' do
5-
pod 'Firebase/Core', '5.12.0'
6-
pod 'Firebase/Database', '5.12.0'
7-
pod 'Firebase/Auth', '5.12.0'
5+
pod 'Firebase/Core', '5.14.0'
6+
pod 'Firebase/Database', '5.14.0'
7+
pod 'Firebase/Auth', '5.14.0'
88
end

0 commit comments

Comments
 (0)