Skip to content

Commit

Permalink
Merge pull request #4 from tarekFerdous/zeel_ExportActivity
Browse files Browse the repository at this point in the history
Commiting my changes of the method
  • Loading branch information
divawalazeel authored Feb 14, 2024
2 parents 448fafb + 2fa0acd commit 9745bc0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1"
}
}

Expand Down Expand Up @@ -146,3 +147,21 @@ dependencies {

androidTestUtil 'androidx.test:orchestrator:1.4.2'
}

apply plugin: "org.sonarqube"

sonarqube {
properties {
property "sonar.projectName", "OpenTracksConcordia"
property "sonar.projectKey", "OpenTracksConcordia"
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'
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1024m
systemProp.sonar.host.url=http://localhost:9000/
systemProp.sonar.login= sqp_2c42e4be92847c53bf4281979d4fa1d5d8dbbff4
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.stream.Collectors;

import de.dennisguse.opentracks.R;
import de.dennisguse.opentracks.data.ContentProviderUtils;
Expand Down Expand Up @@ -232,9 +231,9 @@ private void createExportTasks(boolean allInOneFile) {
exportTasks = new ArrayList<>();
if (allInOneFile) {
String filename = "OpenTracks-Backup";
exportTasks.add(new ExportTask(filename, trackFileFormat, tracks.stream().map(Track::getId).collect(Collectors.toList())));
exportTasks.add(new ExportTask(filename, trackFileFormat, tracks.stream().map(Track::getId).toList()));
} else {
exportTasks.addAll(tracks.stream().map(it -> new ExportTask(null, trackFileFormat, List.of(it.getId()))).collect(Collectors.toList()));
exportTasks.addAll(tracks.stream().map(it -> new ExportTask(null, trackFileFormat, List.of(it.getId()))).toList());
}
trackExportTotalCount = exportTasks.size();
}
Expand Down

0 comments on commit 9745bc0

Please sign in to comment.