From 5e4e4a0c0febe904f6cc8a8fedc2775fcbd2275d Mon Sep 17 00:00:00 2001 From: Habeeb Dashti Date: Fri, 13 Oct 2023 13:32:02 -0400 Subject: [PATCH] [FIX] Removed the deprecated use of setTextAppearance --- build.gradle | 28 +++++++++++++++---- gradle.properties | 1 + .../SensorStatisticsViewHolder.java | 4 +-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 0e9d2bbef..45a636c0c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,30 @@ -apply plugin: 'com.android.application' - buildscript { repositories { google() mavenCentral() + maven { + url "https://plugins.gradle.org/m2/" + } } dependencies { - classpath 'com.android.tools.build:gradle:8.2.0-beta01' + classpath 'com.android.tools.build:gradle:8.1.2' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.2.1.3168' + } +} + +plugins { + id "org.sonarqube" version "4.2.1.3168" +} + +apply plugin: 'com.android.application' +apply plugin: 'org.sonarqube' + +sonarqube { + properties { + property "sonar.projectName", "Group 8 SOEN 6431" + property "sonar.projectKey", "Group-8-SOEN-6431" + property "sonar.host.url", "http://localhost:9000" + property "sonar.login", "sqp_7f8adc6706b839b752be96c5d687384252602ab5" } } @@ -131,10 +149,10 @@ dependencies { implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.gridlayout:gridlayout:1.0.0' - implementation 'com.google.android.material:material:1.9.0' + implementation 'com.google.android.material:material:1.10.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.core:core-splashscreen:1.0.1' - implementation 'androidx.mediarouter:mediarouter:1.4.0' + implementation 'androidx.mediarouter:mediarouter:1.6.0' androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation 'androidx.test.ext:junit:1.1.5' diff --git a/gradle.properties b/gradle.properties index 3c8ba69b7..180c04503 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ android.useAndroidX=true org.gradle.jvmargs=-Xmx1024m +systemProp.sonar.host.url=http://localhost:9000 diff --git a/src/main/java/de/dennisguse/opentracks/viewmodels/SensorStatisticsViewHolder.java b/src/main/java/de/dennisguse/opentracks/viewmodels/SensorStatisticsViewHolder.java index 7747da5c9..eb2600050 100644 --- a/src/main/java/de/dennisguse/opentracks/viewmodels/SensorStatisticsViewHolder.java +++ b/src/main/java/de/dennisguse/opentracks/viewmodels/SensorStatisticsViewHolder.java @@ -22,8 +22,8 @@ protected StatsSensorItemBinding createViewBinding(LayoutInflater inflater) { @Override public void configureUI(DataField dataField) { - getBinding().statsValue.setTextAppearance(getContext(), dataField.isPrimary() ? R.style.TextAppearance_OpenTracks_PrimaryValue : R.style.TextAppearance_OpenTracks_SecondaryValue); - getBinding().statsDescriptionMain.setTextAppearance(getContext(), dataField.isPrimary() ? R.style.TextAppearance_OpenTracks_PrimaryHeader : R.style.TextAppearance_OpenTracks_SecondaryHeader); + getBinding().statsValue.setTextAppearance(dataField.isPrimary() ? R.style.TextAppearance_OpenTracks_PrimaryValue : R.style.TextAppearance_OpenTracks_SecondaryValue); + getBinding().statsDescriptionMain.setTextAppearance(dataField.isPrimary() ? R.style.TextAppearance_OpenTracks_PrimaryHeader : R.style.TextAppearance_OpenTracks_SecondaryHeader); } public static class SensorHeartRate extends SensorStatisticsViewHolder {