Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 7b6db39

Browse files
Upgrade to AGP 7.0.0-beta03
1 parent b0c6384 commit 7b6db39

File tree

7 files changed

+63
-62
lines changed

7 files changed

+63
-62
lines changed

androidTest-shared/build.gradle.kts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ plugins {
2020
}
2121

2222
android {
23-
compileSdkVersion(Versions.COMPILE_SDK)
23+
compileSdk = Versions.COMPILE_SDK
2424
defaultConfig {
25-
minSdkVersion(Versions.MIN_SDK)
26-
targetSdkVersion(Versions.TARGET_SDK)
27-
versionCode = 1
28-
versionName = "1.0"
25+
minSdk = Versions.MIN_SDK
26+
targetSdk = Versions.TARGET_SDK
2927

3028
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3129
}
3230

33-
lintOptions {
31+
lint {
3432
// Version changes are beyond our control, so don't warn. The IDE will still mark these.
3533
disable("GradleDependency")
3634
}

ar/build.gradle.kts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import kotlin.reflect.full.memberFunctions
2+
13
/*
24
* Copyright 2020 Google LLC
35
*
@@ -21,30 +23,29 @@ plugins {
2123
}
2224

2325
android {
24-
compileSdkVersion(Versions.COMPILE_SDK)
26+
compileSdk = Versions.COMPILE_SDK
2527
defaultConfig {
26-
minSdkVersion(Versions.MIN_SDK)
27-
targetSdkVersion(Versions.TARGET_SDK)
28-
versionCode = 1
29-
versionName = "1.0"
28+
minSdk = Versions.MIN_SDK
29+
targetSdk = Versions.TARGET_SDK
3030
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3131
consumerProguardFiles("consumer-proguard-rules.pro")
3232
}
3333

3434
buildTypes {
3535
maybeCreate("staging")
3636
getByName("staging") {
37-
initWith(getByName("debug"))
37+
// TODO: replace with initWith(getByName("debug")) in 7.0.0-beta04
38+
this::class.memberFunctions.first { it.name == "initWith" }.call(this, getByName("debug"))
3839

3940
// Specifies a sorted list of fallback build types that the
4041
// plugin should try to use when a dependency does not include a
4142
// "staging" build type.
4243
// Used with :test-shared, which doesn't have a staging variant.
43-
setMatchingFallbacks(listOf("debug"))
44+
matchingFallbacks += listOf("debug")
4445
}
4546
}
4647

47-
lintOptions {
48+
lint {
4849
disable("InvalidPackage")
4950
// Version changes are beyond our control, so don't warn. The IDE will still mark these.
5051
disable("GradleDependency")

benchmark/build.gradle.kts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import com.squareup.kotlinpoet.MemberName.Companion.member
2+
import kotlin.reflect.full.memberFunctions
3+
14
/*
25
* Copyright 2020 Google LLC
36
*
@@ -17,35 +20,32 @@
1720
plugins {
1821
id("com.android.library")
1922
kotlin("android")
20-
kotlin("android.extensions")
2123
id("androidx.benchmark")
2224
kotlin("kapt")
2325
}
2426

2527
android {
26-
compileSdkVersion(Versions.COMPILE_SDK)
28+
compileSdk = Versions.COMPILE_SDK
2729
defaultConfig {
28-
minSdkVersion(Versions.MIN_SDK)
29-
targetSdkVersion(Versions.TARGET_SDK)
30-
versionCode = 1
31-
versionName = "1.0"
30+
minSdk = Versions.MIN_SDK
31+
targetSdk = Versions.TARGET_SDK
3232
testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"
3333
}
3434

3535
buildTypes {
3636
maybeCreate("staging")
3737
getByName("staging") {
38-
initWith(getByName("debug"))
38+
// TODO: replace with initWith(getByName("debug")) in 7.0.0-beta04
39+
this::class.memberFunctions.first { it.name == "initWith" }.call(this, getByName("debug"))
3940
isDefault = true
40-
versionNameSuffix = "-staging"
4141
isMinifyEnabled = true
4242
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
4343

4444
// Specifies a sorted list of fallback build types that the
4545
// plugin should try to use when a dependency does not include a
4646
// "staging" build type.
4747
// Used with :test-shared, which doesn't have a staging variant.
48-
setMatchingFallbacks(listOf("debug"))
48+
matchingFallbacks += listOf("debug")
4949
}
5050
}
5151

buildSrc/src/main/java/Versions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ object Versions {
2323
const val TARGET_SDK = 30
2424
const val MIN_SDK = 21
2525

26-
const val ANDROID_GRADLE_PLUGIN = "7.0.0-alpha14"
26+
const val ANDROID_GRADLE_PLUGIN = "7.0.0-beta03"
2727
const val BENCHMARK = "1.0.0"
2828
const val COMPOSE = "1.0.0-beta04"
2929
const val FIREBASE_CRASHLYTICS = "2.3.0"
3030
const val GOOGLE_SERVICES = "4.3.3"
3131
const val KOTLIN = "1.4.32"
3232
const val NAVIGATION = "2.3.5"
33-
const val HILT_AGP = "2.34-beta"
33+
const val HILT_AGP = "2.36"
3434

3535
// TODO: Remove this once the version for
3636
// "org.threeten:threetenbp:${Versions.threetenbp}:no-tzdb" using java-platform in the
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Wed Feb 10 08:38:31 CET 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-rc-2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

mobile/build.gradle.kts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import kotlin.reflect.full.memberFunctions
2+
13
/*
24
* Copyright 2020 Google LLC
35
*
@@ -17,7 +19,6 @@
1719
plugins {
1820
id("com.android.application")
1921
kotlin("android")
20-
kotlin("android.extensions")
2122
kotlin("kapt")
2223
id("androidx.navigation.safeargs.kotlin")
2324
id("com.google.firebase.crashlytics")
@@ -37,23 +38,23 @@ android {
3738
buildConfigField(
3839
"com.google.android.gms.maps.model.LatLng",
3940
"MAP_VIEWPORT_BOUND_NE",
40-
"new com.google.android.gms.maps.model.LatLng(${properties["map_viewport_bound_ne"]})"
41+
"new com.google.android.gms.maps.model.LatLng(${project.properties["map_viewport_bound_ne"]})"
4142
)
4243
buildConfigField(
4344
"com.google.android.gms.maps.model.LatLng",
4445
"MAP_VIEWPORT_BOUND_SW",
45-
"new com.google.android.gms.maps.model.LatLng(${properties["map_viewport_bound_sw"]})"
46+
"new com.google.android.gms.maps.model.LatLng(${project.properties["map_viewport_bound_sw"]})"
4647
)
4748

48-
buildConfigField("float", "MAP_CAMERA_FOCUS_ZOOM", properties["map_camera_focus_zoom"] as String)
49+
buildConfigField("float", "MAP_CAMERA_FOCUS_ZOOM", project.properties["map_camera_focus_zoom"] as String)
4950

50-
resValue("dimen", "map_camera_bearing", properties["map_default_camera_bearing"] as String)
51-
resValue("dimen", "map_camera_target_lat", properties["map_default_camera_target_lat"] as String)
52-
resValue("dimen", "map_camera_target_lng", properties["map_default_camera_target_lng"] as String)
53-
resValue("dimen", "map_camera_tilt", properties["map_default_camera_tilt"] as String)
54-
resValue("dimen", "map_camera_zoom", properties["map_default_camera_zoom"] as String)
55-
resValue("dimen", "map_viewport_min_zoom", properties["map_viewport_min_zoom"] as String)
56-
resValue("dimen", "map_viewport_max_zoom", properties["map_viewport_max_zoom"] as String)
51+
resValue("dimen", "map_camera_bearing", project.properties["map_default_camera_bearing"] as String)
52+
resValue("dimen", "map_camera_target_lat", project.properties["map_default_camera_target_lat"] as String)
53+
resValue("dimen", "map_camera_target_lng", project.properties["map_default_camera_target_lng"] as String)
54+
resValue("dimen", "map_camera_tilt", project.properties["map_default_camera_tilt"] as String)
55+
resValue("dimen", "map_camera_zoom", project.properties["map_default_camera_zoom"] as String)
56+
resValue("dimen", "map_viewport_min_zoom", project.properties["map_viewport_min_zoom"] as String)
57+
resValue("dimen", "map_viewport_max_zoom", project.properties["map_viewport_max_zoom"] as String)
5758

5859
manifestPlaceholders["crashlyticsEnabled"] = true
5960

@@ -93,14 +94,15 @@ android {
9394
}
9495
maybeCreate("staging")
9596
getByName("staging") {
96-
initWith(getByName("debug"))
97+
// TODO: replace with initWith(getByName("debug")) in 7.0.0-beta04
98+
this::class.memberFunctions.first { it.name == "initWith" }.call(this, getByName("debug"))
9799
versionNameSuffix = "-staging"
98100

99101
// Specifies a sorted list of fallback build types that the
100102
// plugin should try to use when a dependency does not include a
101103
// "staging" build type.
102104
// Used with :test-shared, which doesn't have a staging variant.
103-
setMatchingFallbacks(listOf("debug"))
105+
matchingFallbacks += listOf("debug")
104106
}
105107
}
106108

@@ -134,7 +136,7 @@ android {
134136
}
135137
}
136138

137-
lintOptions {
139+
lint {
138140
// Eliminates UnusedResources false positives for resources used in DataBinding layouts
139141
isCheckGeneratedSources = true
140142
// Running lint over the debug variant is enough
@@ -162,8 +164,8 @@ android {
162164
}
163165

164166
packagingOptions {
165-
exclude("META-INF/AL2.0")
166-
exclude("META-INF/LGPL2.1")
167+
resources.excludes += "META-INF/AL2.0"
168+
resources.excludes += "META-INF/LGPL2.1"
167169
}
168170
}
169171

shared/build.gradle.kts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import kotlin.reflect.full.memberFunctions
2+
13
/*
24
* Copyright 2020 Google LLC
35
*
@@ -17,39 +19,36 @@
1719
plugins {
1820
id("com.android.library")
1921
kotlin("android")
20-
kotlin("android.extensions")
2122
kotlin("kapt")
2223
id("dagger.hilt.android.plugin")
2324
}
2425

2526
android {
26-
compileSdkVersion(Versions.COMPILE_SDK)
27+
compileSdk = Versions.COMPILE_SDK
2728
defaultConfig {
28-
minSdkVersion(Versions.MIN_SDK)
29-
targetSdkVersion(Versions.TARGET_SDK)
30-
versionCode = 1
31-
versionName = "1.0"
29+
minSdk = Versions.MIN_SDK
30+
targetSdk = Versions.TARGET_SDK
3231
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3332

34-
buildConfigField("String", "CONFERENCE_TIMEZONE", properties["conference_timezone"] as String)
35-
buildConfigField("String", "CONFERENCE_DAY1_START", properties["conference_day1_start"] as String)
36-
buildConfigField("String", "CONFERENCE_DAY1_END", properties["conference_day1_end"] as String)
37-
buildConfigField("String", "CONFERENCE_DAY2_START", properties["conference_day2_start"] as String)
38-
buildConfigField("String", "CONFERENCE_DAY2_END", properties["conference_day2_end"] as String)
39-
buildConfigField("String", "CONFERENCE_DAY3_START", properties["conference_day3_start"] as String)
40-
buildConfigField("String", "CONFERENCE_DAY3_END", properties["conference_day3_end"] as String)
33+
buildConfigField("String", "CONFERENCE_TIMEZONE", project.properties["conference_timezone"] as String)
34+
buildConfigField("String", "CONFERENCE_DAY1_START", project.properties["conference_day1_start"] as String)
35+
buildConfigField("String", "CONFERENCE_DAY1_END", project.properties["conference_day1_end"] as String)
36+
buildConfigField("String", "CONFERENCE_DAY2_START", project.properties["conference_day2_start"] as String)
37+
buildConfigField("String", "CONFERENCE_DAY2_END", project.properties["conference_day2_end"] as String)
38+
buildConfigField("String", "CONFERENCE_DAY3_START", project.properties["conference_day3_start"] as String)
39+
buildConfigField("String", "CONFERENCE_DAY3_END", project.properties["conference_day3_end"] as String)
4140

42-
buildConfigField("String", "CONFERENCE_DAY1_AFTERHOURS_START", properties["conference_day1_afterhours_start"] as String)
43-
buildConfigField("String", "CONFERENCE_DAY2_CONCERT_START", properties["conference_day2_concert_start"] as String)
41+
buildConfigField("String", "CONFERENCE_DAY1_AFTERHOURS_START", project.properties["conference_day1_afterhours_start"] as String)
42+
buildConfigField("String", "CONFERENCE_DAY2_CONCERT_START", project.properties["conference_day2_concert_start"] as String)
4443

4544
buildConfigField(
4645
"String",
47-
"BOOTSTRAP_CONF_DATA_FILENAME", properties["bootstrap_conference_data_filename"] as String
46+
"BOOTSTRAP_CONF_DATA_FILENAME", project.properties["bootstrap_conference_data_filename"] as String
4847
)
4948

5049
buildConfigField(
5150
"String",
52-
"CONFERENCE_WIFI_OFFERING_START", properties["conference_wifi_offering_start"] as String
51+
"CONFERENCE_WIFI_OFFERING_START", project.properties["conference_wifi_offering_start"] as String
5352
)
5453

5554
consumerProguardFiles("consumer-proguard-rules.pro")
@@ -72,17 +71,18 @@ android {
7271
}
7372
maybeCreate("staging")
7473
getByName("staging") {
75-
initWith(getByName("debug"))
74+
// TODO: replace with initWith(getByName("debug")) in 7.0.0-beta04
75+
this::class.memberFunctions.first { it.name == "initWith" }.call(this, getByName("debug"))
7676

7777
// Specifies a sorted list of fallback build types that the
7878
// plugin should try to use when a dependency does not include a
7979
// "staging" build type.
8080
// Used with :test-shared, which doesn't have a staging variant.
81-
setMatchingFallbacks(listOf("debug"))
81+
matchingFallbacks += listOf("debug")
8282
}
8383
}
8484

85-
lintOptions {
85+
lint {
8686
disable("InvalidPackage", "MissingTranslation")
8787
// Version changes are beyond our control, so don't warn. The IDE will still mark these.
8888
disable("GradleDependency")

0 commit comments

Comments
 (0)