Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5535: Upgrade builds to target SDK 34 #5604

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ runs:
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "platform-tools"
shell: bash

- name: Install SDK 33
- name: Install SDK 34
run: |
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "platforms;android-33"
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "platforms;android-34"
shell: bash

- name: Install build tools 32.0.0
Expand Down
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ package_group(
"flavor": "oppia",
"min_sdk_version": 21,
"multidex": "native",
"target_sdk_version": 33,
"target_sdk_version": 34,
},
{
"flavor": "oppia_kitkat",
"main_dex_list": "//:config/kitkat_main_dex_class_list.txt",
"min_sdk_version": 21,
"multidex": "manual_main_dex",
"target_sdk_version": 33,
"target_sdk_version": 34,
},
]
]
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 33
compileSdkVersion 34
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "org.oppia.android"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AppAndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.ui">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="33" />
android:targetSdkVersion="34" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/DatabindingAdaptersManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.databinding.adapters">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="33" />
android:targetSdkVersion="34" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/DatabindingResourcesManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.databinding">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="33" />
android:targetSdkVersion="34" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/RecyclerviewAdaptersManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.recyclerview.adapters">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="33" />
android:targetSdkVersion="34" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/ViewModelManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.vm">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="33" />
android:targetSdkVersion="34" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/ViewModelsManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.view.models">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="33" />
android:targetSdkVersion="34" />
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/ViewsManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.views">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="33" />
android:targetSdkVersion="34" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class FontScaleConfigurationUtil @Inject constructor() {
// TODO(#3616): Migrate to the proper SDK 30+ APIs.
@Suppress("DEPRECATION") // The code is correct for targeted versions of Android.
windowManager!!.defaultDisplay.getMetrics(metrics)
@Suppress("DEPRECATION")
metrics.scaledDensity = configuration.fontScale * metrics.density
context.createConfigurationContext(configuration)
context.resources.displayMetrics.setTo(metrics)
Expand Down
2 changes: 1 addition & 1 deletion app/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# app/src/test/resources/robolectric.properties
# TODO(#4748): Remove the need for this file after upgrading Robolectric tests to API 33
# TODO(#4748): Remove the need for this file after upgrading Robolectric tests to API 34
sdk=30
12 changes: 6 additions & 6 deletions build_flavors.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ _FLAVOR_METADATA = {
"dev": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 33,
"target_sdk_version": 34,
"multidex": "native",
"proguard_specs": [], # Developer builds are not optimized.
"production_release": False,
Expand All @@ -58,7 +58,7 @@ _FLAVOR_METADATA = {
"dev_kitkat": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 33,
"target_sdk_version": 34,
"multidex": "manual_main_dex",
"main_dex_list": _MAIN_DEX_LIST_TARGET_KITKAT,
"proguard_specs": [], # Developer builds are not optimized.
Expand All @@ -73,7 +73,7 @@ _FLAVOR_METADATA = {
"alpha": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 33,
"target_sdk_version": 34,
"multidex": "native",
"proguard_specs": _PRODUCTION_PROGUARD_SPECS,
"production_release": True,
Expand All @@ -87,7 +87,7 @@ _FLAVOR_METADATA = {
"alpha_kitkat": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 33,
"target_sdk_version": 34,
"multidex": "manual_main_dex",
"main_dex_list": _MAIN_DEX_LIST_TARGET_KITKAT,
"proguard_specs": [],
Expand All @@ -102,7 +102,7 @@ _FLAVOR_METADATA = {
"beta": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 33,
"target_sdk_version": 34,
"multidex": "native",
"proguard_specs": _PRODUCTION_PROGUARD_SPECS,
"production_release": True,
Expand All @@ -116,7 +116,7 @@ _FLAVOR_METADATA = {
"ga": {
"manifest": "//app:src/main/AndroidManifest.xml",
"min_sdk_version": 21,
"target_sdk_version": 33,
"target_sdk_version": 34,
"multidex": "native",
"proguard_specs": _PRODUCTION_PROGUARD_SPECS,
"production_release": True,
Expand Down
2 changes: 1 addition & 1 deletion build_vars.bzl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BUILD_SDK_VERSION = 33
BUILD_SDK_VERSION = 34
BUILD_TOOLS_VERSION = "32.0.0"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.config">

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="33" />
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="34" />
</manifest>
4 changes: 2 additions & 2 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 33
compileSdkVersion 34
buildToolsVersion "30.0.2"

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
4 changes: 2 additions & 2 deletions domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 33
compileSdkVersion 34
buildToolsVersion "30.0.2"

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
javaCompileOptions {
Expand Down
2 changes: 1 addition & 1 deletion domain/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.domain">
<uses-sdk android:targetSdkVersion="33" />
<uses-sdk android:targetSdkVersion="34" />
</manifest>
2 changes: 1 addition & 1 deletion domain/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# domain/src/test/resources/robolectric.properties
# TODO(#4748): Remove the need for this file after upgrading Robolectric tests to API 33
# TODO(#4748): Remove the need for this file after upgrading Robolectric tests to API 34
sdk=30
4 changes: 2 additions & 2 deletions testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 33
compileSdkVersion 34
buildToolsVersion "30.0.2"

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion testing/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# testing/src/test/resources/robolectric.properties
# TODO(#4748): Remove the need for this file after upgrading Robolectric tests to API 33
# TODO(#4748): Remove the need for this file after upgrading Robolectric tests to API 34
sdk=30
4 changes: 2 additions & 2 deletions utility/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 33
compileSdkVersion 34
buildToolsVersion "30.0.2"

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
javaCompileOptions {
Expand Down
2 changes: 1 addition & 1 deletion utility/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.util">
<uses-sdk android:targetSdkVersion="33" />
<uses-sdk android:targetSdkVersion="34" />
</manifest>
Loading