Skip to content

Commit 016b19c

Browse files
authored
Unify android sdk version configuration. (#220)
1 parent 200c0a0 commit 016b19c

File tree

17 files changed

+57
-50
lines changed

17 files changed

+57
-50
lines changed

fiamui-app/fiamui-app.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
apply plugin: "com.android.application"
1616

1717
android {
18-
compileSdkVersion 27
18+
compileSdkVersion project.targetSdkVersion
1919

2020
defaultConfig {
2121
applicationId "com.example.firebase.fiamui"
2222
minSdkVersion 16
23-
targetSdkVersion 27
23+
targetSdkVersion project.targetSdkVersion
2424
versionCode 1
2525
versionName "1.0"
2626
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

firebase-common/firebase-common.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@
1414

1515
apply plugin: 'com.android.library'
1616

17-
def androidVersion = 28
18-
1917
android {
2018
adbOptions {
2119
timeOutInMs 60 * 1000
2220
}
2321

24-
compileSdkVersion androidVersion
22+
compileSdkVersion project.targetSdkVersion
2523
defaultConfig {
26-
minSdkVersion 14
27-
targetSdkVersion androidVersion
24+
minSdkVersion project.minSdkVersion
25+
targetSdkVersion project.targetSdkVersion
2826
versionName version
2927
multiDexEnabled true
3028
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

firebase-database-collection/firebase-database-collection.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414

1515
apply plugin: 'com.android.library'
1616

17-
def androidVersion = 28
18-
1917
android {
20-
compileSdkVersion androidVersion
18+
compileSdkVersion project.targetSdkVersion
2119
defaultConfig {
2220
minSdkVersion 9
2321
}

firebase-database/firebase-database.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
apply plugin: 'com.android.library'
1616

17-
def androidVersion = 28
18-
19-
2017
tasks.withType(org.gradle.api.tasks.testing.Test) {
2118
testLogging {
2219
exceptionFormat = 'full'
@@ -32,10 +29,10 @@ android {
3229
timeOutInMs 60 * 1000
3330
}
3431

35-
compileSdkVersion androidVersion
32+
compileSdkVersion project.targetSdkVersion
3633
defaultConfig {
37-
targetSdkVersion androidVersion
38-
minSdkVersion 14
34+
targetSdkVersion project.targetSdkVersion
35+
minSdkVersion project.minSdkVersion
3936
versionName version
4037
multiDexEnabled true
4138
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

firebase-firestore/firebase-firestore.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
apply plugin: 'com.android.library'
1616
apply plugin: 'com.google.protobuf'
1717

18-
def androidVersion = 28
19-
2018
protobuf {
2119
// Configure the protoc executable
2220
protoc {
@@ -53,10 +51,10 @@ android {
5351
timeOutInMs 60 * 1000
5452
}
5553

56-
compileSdkVersion androidVersion
54+
compileSdkVersion project.targetSdkVersion
5755
defaultConfig {
58-
targetSdkVersion androidVersion
59-
minSdkVersion 14
56+
targetSdkVersion project.targetSdkVersion
57+
minSdkVersion project.minSdkVersion
6058
versionName version
6159
multiDexEnabled true
6260
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

firebase-functions/firebase-functions.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@
1414

1515
apply plugin: 'com.android.library'
1616

17-
def androidVersion = 28
18-
1917
android {
2018
adbOptions {
2119
timeOutInMs 60 * 1000
2220
}
2321

24-
compileSdkVersion androidVersion
22+
compileSdkVersion project.targetSdkVersion
2523
defaultConfig {
26-
targetSdkVersion androidVersion
27-
minSdkVersion 14
24+
targetSdkVersion project.targetSdkVersion
25+
minSdkVersion project.minSdkVersion
2826
versionName version
2927
multiDexEnabled true
3028
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

firebase-inappmessaging-display/firebase-inappmessaging-display.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
apply plugin: "com.android.library"
1616

1717
android {
18-
compileSdkVersion 28
19-
18+
compileSdkVersion project.targetSdkVersion
2019
defaultConfig {
2120
minSdkVersion 16
22-
targetSdkVersion 28
21+
targetSdkVersion project.targetSdkVersion
2322
versionCode 1
2423
versionName "1.0"
2524
multiDexEnabled true

firebase-storage/firebase-storage.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
apply plugin: 'com.android.library'
1616

17-
def androidVersion = 28
18-
1917

2018
tasks.withType(org.gradle.api.tasks.testing.Test) {
2119
testLogging {
@@ -32,10 +30,10 @@ android {
3230
timeOutInMs 60 * 1000
3331
}
3432

35-
compileSdkVersion androidVersion
33+
compileSdkVersion project.targetSdkVersion
3634
defaultConfig {
37-
targetSdkVersion androidVersion
38-
minSdkVersion 14
35+
targetSdkVersion project.targetSdkVersion
36+
minSdkVersion project.minSdkVersion
3937
multiDexEnabled true
4038
versionName version
4139
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

protolite-well-known-types/protolite-well-known-types.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ protobuf {
4040
}
4141
}
4242
android {
43-
compileSdkVersion 28
44-
43+
compileSdkVersion project.targetSdkVersion
4544
defaultConfig {
46-
minSdkVersion 14
47-
targetSdkVersion 28
45+
targetSdkVersion project.targetSdkVersion
46+
minSdkVersion project.minSdkVersion
4847
versionCode 1
4948
versionName '1.0'
5049
}

root-project.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ buildscript {
3737
}
3838
}
3939

40+
apply from: 'sdkProperties.gradle'
41+
4042
ext {
4143
playServicesVersion = '16.0.1'
4244
supportAnnotationsVersion = '28.0.0'

sdkProperties.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2018 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
ext {
16+
targetSdkVersion = 28
17+
minSdkVersion = 14
18+
}

test-apps/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ plugins {
3131
id 'com.github.ben-manes.versions' version '0.20.0'
3232
}
3333

34+
apply from: '../sdkProperties.gradle'
35+
3436
allprojects {
3537
ext.testBuildType = project.getProperties().get("testBuildType", "debug")
3638

test-apps/database-test-app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ apply plugin: 'com.android.application'
1818

1919
android {
2020
testBuildType = project.testBuildType
21-
compileSdkVersion 28
21+
compileSdkVersion project.targetSdkVersion
2222

2323
defaultConfig {
2424
applicationId "com.google.firebase.testapps.database"
2525
minSdkVersion 16
26-
targetSdkVersion 28
26+
targetSdkVersion project.targetSdkVersion
2727
versionCode 1
2828
versionName "1.0"
2929
multiDexEnabled true

test-apps/firestore-test-app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ apply plugin: 'com.android.application'
1818

1919
android {
2020
testBuildType = project.testBuildType
21-
compileSdkVersion 28
21+
compileSdkVersion project.targetSdkVersion
2222

2323
defaultConfig {
2424
applicationId "com.google.firebase.testapps.firestore"
2525
minSdkVersion 16
26-
targetSdkVersion 28
26+
targetSdkVersion project.targetSdkVersion
2727
versionCode 1
2828
versionName "1.0"
2929
multiDexEnabled true

test-apps/functions-test-app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ apply plugin: 'com.android.application'
1818

1919
android {
2020
testBuildType = project.testBuildType
21-
compileSdkVersion 28
21+
compileSdkVersion project.targetSdkVersion
2222

2323
defaultConfig {
2424
applicationId "com.google.firebase.testapps.functions"
2525
minSdkVersion 16
26-
targetSdkVersion 28
26+
targetSdkVersion project.targetSdkVersion
2727
versionCode 1
2828
versionName "1.0"
2929
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'

test-apps/storage-test-app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ apply plugin: 'com.android.application'
1818

1919
android {
2020
testBuildType = project.testBuildType
21-
compileSdkVersion 28
21+
compileSdkVersion project.targetSdkVersion
2222

2323
defaultConfig {
2424
applicationId "com.google.firebase.testapps.storage"
2525
minSdkVersion 16
26-
targetSdkVersion 28
26+
targetSdkVersion project.targetSdkVersion
2727
versionCode 1
2828
versionName "1.0"
2929
multiDexEnabled true

tools/apksize/default.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ android {
2525
abortOnError false
2626
checkReleaseBuilds false
2727
}
28-
compileSdkVersion 26
28+
compileSdkVersion project.targetSdkVersion
2929

3030
defaultConfig {
3131
applicationId 'com.google.apksize'
32-
minSdkVersion 26
33-
multiDexEnabled true
34-
targetSdkVersion 26
32+
minSdkVersion project.targetSdkVersion
33+
multiDexEnabled true
34+
targetSdkVersion project.targetSdkVersion
3535
versionCode 1
3636
versionName '1.0'
3737
}

0 commit comments

Comments
 (0)