Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
4256719
fix Gradle checksum (#448)
Zahnstocher Nov 8, 2024
70fb5c5
Add a simple scrollview in available layouts
Binnette Oct 27, 2024
1114efe
fix notifications (Fix #453)
Zahnstocher Aug 27, 2024
c8ef8b3
Export to public directory (Fix #443, Fix #440)
Zahnstocher Aug 1, 2024
211580a
README: update transifex URL
Binnette Nov 18, 2024
7a18caa
display number of satellites (Fix #442)
Zahnstocher Jul 30, 2024
d9430c9
Grant camera write permissions, remove obsolete permissions (Fix #441…
Zahnstocher Nov 19, 2024
115a160
Gradle: remove deprecated option 'android.defaults.buildfeatures.buil…
Binnette Nov 19, 2024
015346e
Gradle: replace jcenter() by mavenCentral()
Binnette Nov 19, 2024
5648bd7
Tests: update powermock to 2.0.9; workaround for 'unnamed modules'; r…
Binnette Nov 19, 2024
f228661
Tests: add missing 'gpx-test.gpx' file
Binnette Nov 19, 2024
7f262c5
Updating the target SDK to 35 with the necessary changes in dependenc…
miltonials Nov 19, 2024
9c68e63
Update GPX export path to Documents folder for user accessibility (#458)
Andyporras Nov 19, 2024
8727ea6
Test: set java version to 17 to solve compatibility issue with powermock
Binnette Nov 19, 2024
ee97a0d
Tests: fix encoding issue in test getStringFromStream
Binnette Nov 19, 2024
ae56326
Add GitHub Android Workflow
Binnette Nov 19, 2024
d684075
Update README. Add build badge
Binnette Nov 21, 2024
e1251f4
Change workflow name to 'Build'
Binnette Nov 21, 2024
800610f
Update Transifex link in App
Binnette Nov 21, 2024
b37cd98
Fix #323 #322: Texts on about page
Binnette Nov 21, 2024
c40e170
Jacoco and Coveralls
Binnette Nov 21, 2024
9974d1a
Update README.md more info ℹ️
Binnette Nov 21, 2024
2c78e5b
Upgrade Android Gradle Plugin to 8.7.2
Binnette Nov 21, 2024
e8e555f
Remove deprecated and unused kotlin-android-extensions
Binnette Nov 21, 2024
9c819b1
Set default values for repo name and branch when setting custom layou…
Binnette Nov 21, 2024
4c59ab9
Fix Javadoc
Binnette Nov 22, 2024
108bc4a
Workflow nightly (#462)
Binnette Nov 23, 2024
0302236
Updates for project OSMTracker for Android™ and language sv (#461)
transifex-integration[bot] Nov 23, 2024
ccfa4a2
Tests: add MercatorProjectionTest
Binnette Nov 24, 2024
d403490
Translate strings-preferences.xml in pl
transifex-integration[bot] Nov 25, 2024
f12694c
androidTest: disable Toast check if android device have android 11 or…
Binnette Nov 25, 2024
7c34e64
androidTest: upgrade espresso to 3.6.1
Binnette Nov 25, 2024
cbb4fb5
androidTest: Remove deprecated WRITE_EXTERNAL_STORAGE permission rule
Binnette Nov 25, 2024
aca3524
androidTest: test for TOAST in logs
Binnette Nov 25, 2024
803f57c
androidTest: fix all androidTests
Binnette Nov 25, 2024
8e48ee2
GitHub workflow: androidTest
Binnette Nov 25, 2024
a0bef4b
Test: upgrade to junit 4.13.2 and Mockito 2.28.2; Add test for FileSy…
Binnette Nov 26, 2024
1f74916
Fix #464: add PackageName to all broadcasted intents
Binnette Nov 27, 2024
d5e54bc
Workflow: run nightly only on develop branch
Binnette Nov 27, 2024
f3d8752
Trigger nightly
Binnette Nov 27, 2024
cd402b2
Workflow: dissable nightly on push
Binnette Nov 27, 2024
659c3bf
Workflow: delete Nightly release before creating a new one
Binnette Nov 27, 2024
db20436
Tests: improve ArrayUtils coverage
Binnette Nov 27, 2024
0b278fc
Tests: add org.json testImplementation
Binnette Nov 28, 2024
6d06195
Workflow: update nightly build
Binnette Nov 28, 2024
c730655
Merge branch 'master' into develop
Binnette Nov 28, 2024
45a5bc8
Add build artifact in nightly builds
Binnette Nov 30, 2024
c8b3190
Extract versionName and versionCode from Manifest. Add -dev suffix on…
Binnette Nov 30, 2024
629c723
Upgrade osmdroid to 6.1.20
Binnette Nov 30, 2024
63feaf1
Tests ExportToStorageTask
Binnette Dec 2, 2024
f6767fd
UI: add missing hint 'Name' for track detail fields
Binnette Dec 3, 2024
410f20f
Translate strings-preferences.xml in hu
transifex-integration[bot] Dec 3, 2024
a1db1c3
Translate strings.xml in hu
transifex-integration[bot] Dec 3, 2024
ee6cd5d
Fix 468 photo images not saved in osmfolder (#472)
Binnette Dec 4, 2024
431b7f3
Upgrade libs & clean gradle
Binnette Dec 4, 2024
bce871a
Merge branch 'master' into develop
Binnette Dec 5, 2024
140538a
Fix #476: Resume tracking btn change the state to stopped (#477)
miltonials Dec 7, 2024
a3ca4bc
Added background color for intro activity
miltonials Dec 11, 2024
8fa107e
Fix #479: Added a check to prevent duplicate DividerItemDecoration in…
miltonials Dec 8, 2024
fdf0a8b
Fix #480: Refactor permission request for writing to external storage
miltonials Dec 8, 2024
76f5100
Using @string for Toast in TrackDetail and TrackManager
miltonials Dec 8, 2024
2440961
Update zh-rTW
Binnette Dec 12, 2024
af8f874
Translate strings.xml in sv
transifex-integration[bot] Dec 12, 2024
baa4543
Translate strings.xml in zh_TW
transifex-integration[bot] Dec 13, 2024
1d745eb
Translate strings.xml in pl
transifex-integration[bot] Dec 16, 2024
bea35b0
Disabled default OSMDroid zoom buttons
miltonials Dec 17, 2024
3520b6c
button design for map buttons
miltonials Dec 17, 2024
52435c8
NFix #351: new map button layout
miltonials Dec 17, 2024
75b2655
Translate strings-preferences.xml in nl
transifex-integration[bot] Dec 17, 2024
abd027f
Translate strings.xml in nl
transifex-integration[bot] Dec 17, 2024
078b41f
Solving issue #347
FR3DD221 Dec 19, 2024
b62f7f4
Merge branch 'issue347' into issue347-dev
FR3DD221 Dec 19, 2024
d8ef754
little corrections on fix of issue #347
FR3DD221 Dec 21, 2024
ce273a1
Fix incorrect Unix epoch date displayed for uploaded GNSS traces
Andyporras Dec 31, 2024
df05dbd
Translate strings.xml in pt_PT
transifex-integration[bot] Jan 12, 2025
fe751b7
Translate strings-preferences.xml in pt_PT
transifex-integration[bot] Jan 12, 2025
a50b7fb
Updates for project OSMTracker for Android™ and language da (#493)
transifex-integration[bot] Jan 31, 2025
64a037c
Translate strings-preferences.xml in fr (#490)
transifex-integration[bot] Jan 31, 2025
f80d8e2
Fix #311. UI Enhance visibility of horizontal dividers in TrackManager
Andyporras Feb 3, 2025
e9747f8
Fix #314: Shows the correct date of OSM trace upload
jamescr Feb 3, 2025
6798bf2
Merge pull request #491 from miltonials/fix-351-display-map-design
jamescr Feb 3, 2025
58e914f
Fix #347. UI: Layout adjustments for large text compatibility
jamescr Feb 3, 2025
46c14fb
Merge pull request #492 from labexp/translations_5d0074f527004ef2915f…
jamescr Feb 3, 2025
2f4c71f
Removes translation files with empty strings
jamescr Feb 4, 2025
5097055
Add transifex config file
jamescr Feb 4, 2025
d09fe7a
Merge remote-tracking branch 'labexp/translations_5d0074f527004ef2915…
jamescr Feb 4, 2025
48ff85f
Updates pt_rPT translations (into correct folder)
jamescr Feb 4, 2025
eb150a3
Merge remote-tracking branch 'labexp/translations_5d0074f527004ef2915…
jamescr Feb 4, 2025
142862a
Updates zh_rTW translations (into correct folder)
jamescr Feb 4, 2025
9207bad
Fix #333: Change exported GPX filenames to 'YYYY-MM-DD_hh-mm-ss_OSMTr…
Kevin-Salazar-itcr Dec 9, 2024
40ad1c5
Customize export label for file sharing #470
Kevin-Salazar-itcr Dec 10, 2024
ab1d540
fix for bug tha cloned names, The label has been implemented in the e…
Andyporras Dec 15, 2024
604078d
Fix failing tests to align with updated code for GPX export functiona…
Andyporras Dec 20, 2024
af6617d
separator as constant “-” for name, date and time and label
Andyporras Feb 3, 2025
f1c6d43
Fix filename pattern options and update unit test for consistency
Andyporras Feb 4, 2025
09209a2
Fix: avoid trailing separator in exported filename when label is empty
Andyporras Feb 4, 2025
eb54294
Fix: remove trailing separator in filename for export, share, and OSM…
Andyporras Feb 4, 2025
d4268e1
Refactor filename label handling and improve clarity in preferences a…
Andyporras Feb 4, 2025
540fc35
Refactor file name label preference values for more clarity
jamescr Feb 4, 2025
430e95d
feat: Enable sharing tracks as a ZIP file if they have associated files
Andyporras Feb 5, 2025
2cd735e
Translate comments to English and update specific imports
Andyporras Feb 7, 2025
4d5d1e4
zipCacheFiles now returns a ZIP and sharing only allows ZIP files
Andyporras Feb 7, 2025
57e88d8
Fix duplicate filename issue when sharing traces
Andyporras Feb 7, 2025
230f05e
Code refactor in share functionality
jamescr Feb 10, 2025
921453e
Fix: create zip without multimedia
Andyporras Feb 10, 2025
e378ba5
preview, edit and delete waypoints
Kevin-Salazar-itcr Feb 11, 2025
15a1a36
The extra dot generated at the end of the file name was removed (solv…
miltonials Feb 12, 2025
666c2b9
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 13, 2025
8e1f6e4
Fix isssue#494
FR3DD221 Feb 13, 2025
4d45698
solved
FR3DD221 Feb 10, 2025
84c592b
fix
FR3DD221 Feb 10, 2025
9793020
Adding fitsSystemWindows and other fixes
FR3DD221 Feb 11, 2025
d4bcd1b
Deleting spanish comment
FR3DD221 Feb 13, 2025
88503ad
Adding onPause method
FR3DD221 Feb 13, 2025
cda51d8
Merge branch 'develop' into modify_waypoints
Kevin-Salazar-itcr Feb 14, 2025
ac3adf3
Bug fixes in UX preview waypoints
Kevin-Salazar-itcr Feb 14, 2025
727ba69
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 17, 2025
3f46d3f
Minor fixes and update for OSMTracker in language es
Kevin-Salazar-itcr Feb 17, 2025
6a083c9
Replace hardcoded strings with constants
Andyporras Feb 17, 2025
ae54db4
Merge remote-tracking branch 'kevin/modify_waypoints' into pr509-wayp…
jamescr Feb 17, 2025
b06f003
use FILE_PROVIDER_AUTHORITY constant from DataHelper
jamescr Feb 17, 2025
f63b8c6
move MIME TYPE constants to DataHelper
jamescr Feb 17, 2025
bcd400c
Merge pull request #2 from jamescr/pr509-waypoints
Andyporras Feb 18, 2025
56a982d
Preview, edit and delete waypoints
jamescr Feb 18, 2025
0fe2ced
Fix inconsistent tag in exported tracks for Play Store update consist…
Andyporras Feb 18, 2025
f903514
Fix and clean up preferences.xml for GPX filename and label settings
Andyporras Feb 18, 2025
dfac289
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 18, 2025
285d31e
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 23, 2025
09c9c17
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 23, 2025
8509fac
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 23, 2025
805ac95
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 24, 2025
a3de87b
Translate accessibility.xml in pt_PT (#546)
transifex-integration[bot] Feb 24, 2025
d5fd9ea
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 24, 2025
5f845f6
Translate strings-preferences.xml in ca (#547)
transifex-integration[bot] Feb 24, 2025
448ad0b
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
037c838
Translate strings-preferences.xml in zh_CN (#545)
transifex-integration[bot] Feb 25, 2025
37ca69f
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
7681409
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
de43ae8
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
9dab2eb
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
e0091d4
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
279b7df
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
ebee5f2
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
dbfc186
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
4fb5c89
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
382b1eb
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
802bca1
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
773186d
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
7594f12
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
cdacde2
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
c129c68
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
0779d4b
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
c6ac05e
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
0fffc5c
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
f509800
[Transifex] Updates for project OSMTracker for Android™ and language …
transifex-integration[bot] Feb 25, 2025
dc0d4f4
Version code 64, version 2025.02.25
jamescr Feb 26, 2025
2b0d503
Translate strings.xml in zh_TW (#550)
transifex-integration[bot] Feb 26, 2025
d34b0b5
Version code 65, version 2025.02.26
jamescr Feb 26, 2025
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
26 changes: 24 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle # skip tests, coverage, etc.
run: ./gradlew assembleDebug --stacktrace -x test
- name: Build with Gradle
run: ./gradlew assembleDebug --stacktrace

- name: Rename output APK
run: |
Expand All @@ -41,3 +41,25 @@ jobs:
with:
name: debug-${{ env.ARTIFACT_DATE }}
path: app/build/outputs/apk/debug/OSMTracker-debug-*.apk

- name: Run unit tests and jacoco coverage
run: ./gradlew testDebugUnitTest jacocoTestReport --stacktrace

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Run connected tests
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: 26
script: |
adb logcat &
./gradlew connectedCheck --no-parallel

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
format: jacoco
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# OSMTracker for Android™

![Build](https://github.com/labexp/osmtracker-android/actions/workflows/android.yml/badge.svg?branch=develop)
[![Coverage Status](https://coveralls.io/repos/github/labexp/osmtracker-android/badge.svg?branch=develop)](https://coveralls.io/github/labexp/osmtracker-android?branch=develop)

**OSMTracker for Android™** is a mobile app designed for OpenStreetMap mappers and outdoor adventurers. It lets you log a GPS track to document your journey. Its customizable buttons let you simply add POIs as track points directly inside your GPX track.

It also supports voice recording, picture taking, and note-taking. This is the perfect app to survey a place or a path whether you are hiking, cycling, or exploring new areas.

![Main screen](https://wiki.openstreetmap.org/w/images/thumb/7/7b/OSMTracker-Android-main-screen-en.jpg/200px-OSMTracker-Android-main-screen-en.jpg)

Here is a screenshot of the main screen with its default buttons. You can [customize](https://github.com/labexp/osmtracker-android/wiki/Custom-buttons-layouts) these buttons to your liking.

## Get the App 📲

[<img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height="80"/>](https://play.google.com/store/apps/details?id=net.osmtracker)
[<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="80">](https://f-droid.org/app/net.osmtracker)

OSMTracker for Android™ official source code repository is [https://github.com/labexp/osmtracker-android](https://github.com/labexp/osmtracker-android).
## More Info ℹ️

[![Build Status](https://travis-ci.org/labexp/osmtracker-android.svg?branch=master)](https://travis-ci.org/labexp/osmtracker-android)
- Find more information in the [documentation](https://github.com/labexp/osmtracker-android/wiki)
- Submit bug reports in the [issue tracker](https://github.com/labexp/osmtracker-android/issues)
- Contributions are welcome, please visit our [contributor guide](https://github.com/labexp/osmtracker-android/blob/master/CONTRIBUTING.md)
- Translations can be done on [Transifex](https://explore.transifex.com/labexp/osmtracker-android/)

For more information about the project, documentation and bug reports please visit https://github.com/labexp/osmtracker-android/wiki
## Note 📝

If you are interested in contribute to this project, please visit https://github.com/labexp/osmtracker-android/blob/master/CONTRIBUTING.md to know the way you could do it.

To help translate OSMTracker, please visit https://www.transifex.com/projects/p/osmtracker-android/
OSMTracker for Android™ official source code repository is [https://github.com/labexp/osmtracker-android](https://github.com/labexp/osmtracker-android).
164 changes: 83 additions & 81 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,47 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'jacoco'
}

android {

useLibrary 'org.apache.http.legacy'
compileSdk 33
namespace 'net.osmtracker'
compileSdk 35

defaultConfig {
applicationId "net.osmtracker"
minSdkVersion 25
targetSdkVersion 33
minSdk 25
targetSdk 35
multiDexEnabled true

// Version code should be increased after each release
versionCode 65
versionName new Date().format('yyyy.MM.dd')

testApplicationId "net.osmtracker.test"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.findByName('release')
}
debug {
versionNameSuffix "-dev"
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}

signingConfigs {
// Create a file $HOME/.gradle/gradle.properties
// containing the values signing.storeFile=..., etc.
if (project.hasProperty('signing.storeFile')) {
release {
storeFile file(project.property('signing.storeFile'))
Expand All @@ -30,92 +52,72 @@ android {
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
if (signingConfigs.hasProperty('release')) {
signingConfig signingConfigs.release
}


}
}

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
android {
lintOptions {
abortOnError false
}
resources.excludes += [
'META-INF/DEPENDENCIES',
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt'
]
}

defaultConfig {
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

testOptions {
unitTests.returnDefaultValues = true
unitTests.all {
it.jvmArgs = [
'--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED'
]
}
animationsDisabled = true
}
namespace 'net.osmtracker'

}

dependencies {

//implementation 'org.apache.james:apache-mime4j-core:0.8.3'

//implementation 'org.apache.httpcomponents:httpmime:4.5.6'

implementation 'org.osmdroid:osmdroid-android:6.1.5'
//implementation 'org.apache.httpcomponents:httpcore:4.4.13'

//implementation 'oauth.signpost:signpost-commonshttp4:1.2.1.2'
implementation 'org.slf4j:slf4j-android:1.7.30'
implementation 'androidx.core:core:1.6.0'
//implementation 'org.apache.commons:commons-io:1.3.2'

// For upload traces to osm server
// Lib to show OSM map as background
implementation 'org.osmdroid:osmdroid-android:6.1.20'
// OAuth
implementation 'net.openid:appauth:0.11.1'
implementation 'de.westnordost:osmapi-traces:3.1'

// Required for local unit tests (JUnit 4 framework)
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.4.0'
// For upload traces to osm server
implementation('de.westnordost:osmapi-traces:3.1') {
// Already included in Android
exclude group: 'net.sf.kxml', module: 'kxml2'
exclude group: 'xmlpull', module: 'xmlpull'
}
// App intro
implementation 'com.github.AppIntro:AppIntro:6.3.1'

testImplementation 'org.powermock:powermock-core:1.7.0RC2'
testImplementation 'org.powermock:powermock-module-junit4:1.7.0RC2'
testImplementation 'org.powermock:powermock-api-mockito2:1.7.0RC2'
implementation 'com.google.android.material:material:1.12.0'
implementation 'org.slf4j:slf4j-android:1.7.30'
implementation 'org.apache.commons:commons-io:1.3.2'
implementation 'androidx.core:core:1.15.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.7.0'

// Required -- JUnit 4 framework
testImplementation 'junit:junit:4.13.2'
// Robolectric environment
testImplementation "androidx.test:core:1.6.1"
// Mockito framework
testImplementation "org.mockito:mockito-core:3.12.4"

testImplementation 'org.powermock:powermock-core:2.0.9'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.9'
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
// Required for local unit tests. Prevent null in JSONObject, JSONArray, etc.
testImplementation 'org.json:json:20240303'

// Required for instrumented tests
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'

implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.3.0'

//compileOnly 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'

// AndroidX Capable version
implementation 'com.github.AppIntro:AppIntro:6.0.0'
implementation 'com.google.android.material:material:1.4.0'


}

configurations.all {
// it's already included in Android and not need from osmapi
exclude group:'net.sf.kxml', module:'kxml2'
exclude group: 'xmlpull', module: 'xmlpull'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test:rules:1.6.1'
}

repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}

apply from: "jacoco.gradle"
25 changes: 25 additions & 0 deletions app/jacoco.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
jacoco {
toolVersion = jacocoVersion
}

tasks.withType(Test).configureEach {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}

tasks.register("jacocoTestReport", JacocoReport) {
dependsOn testDebugUnitTest

reports {
xml.required = true
}

def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*']
def mainSrc = "${project.projectDir}/src/main/java"

sourceDirectories.setFrom(files([mainSrc]))
classDirectories.setFrom(fileTree(dir: layout.buildDirectory.dir("intermediates/javac/debug").get().asFile, excludes: fileFilter))
executionData.setFrom(fileTree(dir: layout.buildDirectory.get(), includes: [
'jacoco/testDebugUnitTest.exec', 'outputs/unit_test_code_coverage/debugUnitTest/testDebugUnitTest.exec'
]))
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.osmtracker.activity.ButtonsPresets;
import net.osmtracker.activity.Preferences;
import net.osmtracker.util.CustomLayoutsUtils;
import net.osmtracker.util.TestUtils;

import org.junit.Rule;
import org.junit.Test;
Expand All @@ -32,6 +33,9 @@

public class DeleteLayoutTest {

@Rule
public GrantPermissionRule storagePermission = GrantPermissionRule.grant(Manifest.permission.WRITE_EXTERNAL_STORAGE);

@Rule
public ActivityTestRule<ButtonsPresets> mRule = new ActivityTestRule(ButtonsPresets.class) {
@Override
Expand All @@ -47,10 +51,6 @@ protected void beforeActivityLaunched() {
}
};

// Storage permissions are required
@Rule
public GrantPermissionRule writePermission = GrantPermissionRule.grant(Manifest.permission.WRITE_EXTERNAL_STORAGE);

private static String layoutName = "mock";
private static String ISOLanguageCode = "es";

Expand Down
Loading
Loading