From 39be572e17d48bbfd15df22d8174511814c2736a Mon Sep 17 00:00:00 2001 From: Yash Changrani Date: Sat, 14 Oct 2023 17:36:53 -0400 Subject: [PATCH] Remove this unused "track" local variable --- build.gradle | 24 +++++++++++++++++-- gradle.properties | 4 +++- .../opentracks/TrackRecordedActivity.java | 2 +- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 551c2ca5f..c2887fe38 100644 --- a/build.gradle +++ b/build.gradle @@ -25,8 +25,9 @@ buildscript { maven { url "https://plugins.gradle.org/m2/"} } dependencies { - classpath 'com.android.tools.build:gradle:8.0.2' - classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.1.1" + classpath 'com.android.tools.build:gradle:8.1.2' + classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1' + } } @@ -165,3 +166,22 @@ dependencies { androidTestUtil 'androidx.test:orchestrator:1.4.2' } + +apply plugin: "org.sonarqube" + +sonarqube { + properties { + property "sonar.projectName", "OpenTracksConcordia" + property "sonar.projectKey", "opentracks" + property "sonar.tests", ["src/androidTest/java"] + property "sonar.test.inclusions", "/*Test/*" + property "sonar.sourceEncoding", "UTF-8" + property "sonar.sources", "src/main/java" + property "sonar.exclusions", '/*Test/*,' + + '*.json,' + + '/*test/*,' + + '*/.gradle/*,' + + '**/R.class' + } +} + diff --git a/gradle.properties b/gradle.properties index 031c2ce75..35a95edd8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,5 @@ android.useAndroidX=true org.gradle.jvmargs=-Xmx1024m -android.suppressUnsupportedCompileSdk=34 \ No newline at end of file +android.suppressUnsupportedCompileSdk=34 +systemProp.sonar.host.url=http://localhost:9000 +systemProp.sonar.login=sqp_64567e25c0b9ca202bd8e272f45f80f604ae3deb diff --git a/src/main/java/de/dennisguse/opentracks/TrackRecordedActivity.java b/src/main/java/de/dennisguse/opentracks/TrackRecordedActivity.java index f47e6b7c8..01c392536 100644 --- a/src/main/java/de/dennisguse/opentracks/TrackRecordedActivity.java +++ b/src/main/java/de/dennisguse/opentracks/TrackRecordedActivity.java @@ -101,7 +101,7 @@ protected void onCreate(Bundle savedInstanceState) { trackRecordingServiceConnection = new TrackRecordingServiceConnection(bindCallback); - Track track = contentProviderUtils.getTrack(trackId); + contentProviderUtils.getTrack(trackId); viewBinding.bottomAppBarLayout.bottomAppBar.replaceMenu(R.menu.track_detail); setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);