Skip to content
Closed
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
3 changes: 2 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:

- name: Prepare builddir
run: |
# secrets are only available for collabrators, other will build with OsmDroid (but a few more options than F-Droid still)
echo "${{ secrets.MAPBOX }}" > $GITHUB_WORKSPACE/mapbox.properties
echo "${{ secrets.DROPBOX }}" > $GITHUB_WORKSPACE/dropbox.properties
echo "${{ secrets.RUNALYZE }}" > $GITHUB_WORKSPACE/runalyze.properties
Expand Down Expand Up @@ -105,7 +106,7 @@ jobs:
rm $GITHUB_WORKSPACE/mapbox.properties
# For special build steps, see https://gitlab.com/fdroid/fdroiddata.git metadata/org.runnerup.free.yml
rm -rf wear ANT-Android-SDKs $GITHUB_WORKSPACE/dropbox.properties $GITHUB_WORKSPACE/runalyze.properties
sed -i -e '/play-services/d' -e '/mapboxsdk/d' -e '/api.mapbox.com/d' app/build.gradle
sed -i -e '/play-services/d' -e '/com.mapbox.maps/d' -e '/api.mapbox.com/d' app/build.gradle
sed -i -e '/wearable/d' common/build.gradle
./gradlew clean :app:assembleLatestRelease

Expand Down
2 changes: 1 addition & 1 deletion ANT-Android-SDKs
2,439 changes: 0 additions & 2,439 deletions app/assets/egm96-delta.dat

This file was deleted.

63 changes: 8 additions & 55 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ android {
}
}

splits {
abi {
// Disable, app bundles used in play
// enable rootProject.ext.allowNonFree && gradle.startParameter.taskNames.contains("assembleLatestRelease")
// relevant archs only - these are the only available anyway for newer NDK
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
universalApk = true
}
}

defaultConfig {
// Set a separate applicationId to allow variant installations
// The applicationId is also used in some xml files (android:targetPackage)
Expand All @@ -74,7 +64,6 @@ android {
}

signingConfigs {
//noinspection GroovyMissingReturnStatement
release {
}
}
Expand All @@ -98,7 +87,11 @@ android {
lint {
baseline = file('lint-baseline.xml')
checkReleaseBuilds = true
lintConfig = file('lint.xml')
if (mapboxEnabled) {
lintConfig = file('lint.xml')
} else {
lintConfig = file('lint-osmdroid.xml')
}
showAll = true
//textOutput = 'stdout'
textReport = true
Expand Down Expand Up @@ -145,18 +138,6 @@ repositories {
}
}

// Duplicate class kotlin.collections.jdk8 (from MapBox?)
dependencies {
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.0") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.0") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
}

dependencies {
implementation project(':common')
implementation project(':hrdevice')
Expand All @@ -166,13 +147,10 @@ dependencies {
implementation "androidx.preference:preference:${rootProject.ext.preference_version}"
implementation "androidx.viewpager2:viewpager2:1.1.0"
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation "androidx.core:core-location-altitude:1.0.0-beta01"

latestImplementation "com.google.android.material:material:1.13.0"
if (rootProject.ext.enableWear) {
// Build Wear separately, do not include in phone apk
// latestWearApp project(':wear')

//noinspection GradleDependency
latestImplementation "com.google.android.gms:play-services-wearable:${rootProject.ext.googlePlayServicesWearableVersion}"
}

Expand All @@ -183,12 +161,9 @@ dependencies {
latestImplementation "com.google.android.gms:play-services-location:${rootProject.ext.googlePlayServicesVersion}"
}
if (rootProject.ext.mapboxEnabled) {
//noinspection GradleDependency
latestImplementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.2'
latestImplementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0'
latestImplementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-scalebar-v8:0.2.0'
latestImplementation 'com.mapbox.maps:android-ndk27:11.17.1'
} else {
implementation 'org.osmdroid:osmdroid-android:6.1.11'
implementation 'org.osmdroid:osmdroid-android:6.1.20'
}
latestImplementation 'com.jjoe64:graphview:4.2.2'

Expand Down Expand Up @@ -232,25 +207,3 @@ android.applicationVariants.configureEach {
buildConfigField 'String', 'DROPBOX_ID', "\"${rootProject.ext.dropboxId}\""
buildConfigField 'String', 'DROPBOX_SECRET', "\"${rootProject.ext.dropboxSecret}\""
}

//Based on an example from https://developer.android.com/studio/build/configure-apk-splits.html
//Most comments from there removed

// Map for the version code that gives each ABI a value (generic has lower value)
ext.abiCodes = ['arm64-v8a': 8, 'armeabi': 2, 'armeabi-v7a': 3, 'mips': 4, 'mips64': 5, 'x86': 6, 'x86_64': 7]

import com.android.build.OutputFile

// For each APK output variant, override versionCode with a combination of
// ext.abiCodes * 10000 + variant.versionCode. (universal gets no offset)
android.applicationVariants.configureEach { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode =
project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))

if (baseAbiVersionCode != null) {
output.versionCodeOverride =
baseAbiVersionCode * 10000 + variant.versionCode
}
}
}
48 changes: 48 additions & 0 deletions app/lint-osmdroid.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="all" >
<ignore path="ANT-Android-SDKs/**" />
</issue>
<!-- promote to error, must be handled -->
<issue id="InlinedApi" severity="fatal" />
<issue id="InconsistentArrays" severity="fatal" />

<issue id="UsingOnClickInXml" severity="ignore">
<ignore path="**/reportlist_row.xml" />
</issue>

<!-- All translations will not be complete -->
<issue id="MissingTranslation" severity="ignore" />

<!-- icon with all densities are not included - don't bother -->
<issue id="IconMissingDensityFolder" severity="ignore" />
<issue id="MissingQuantity">
<!-- Transifex refuses quantity="one" for tr,pl (gradle) lint requires it, Inspect allows both-->
<ignore path="res/values-tr/cues.xml" />
<ignore path="res/values-pl/cues.xml" />
<ignore path="res/values-zh/cues.xml" />
</issue>
<issue id="UnusedQuantity">
<ignore path="res/values-lt/cues.xml" />
<ignore path="res/values-zh/cues.xml" />
</issue>

<issue id="IconDensities">
<ignore path="res/**" />
<ignore path="**/common/src/main/res/**" />
</issue>
<issue id="IconColors">
<ignore path="**/ic_stat_notify.png" />
</issue>
<issue id="ObsoleteSdkInt" severity="ignore">
<ignore regexp=".*drawable-r21$" />
</issue>
<!-- TODO -->
<issue id="ClickableViewAccessibility" severity="ignore">
<ignore path="**/NumberPicker.java" />
</issue>
<!-- Specific for CI - MapBox cannot be downloaded -->
<issue id="UnusedResources" severity="ignore">
<ignore path="**/res/drawable-*/ic_map_marker*.png" />
</issue>
</lint>
45 changes: 9 additions & 36 deletions app/lint.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="all" >
<ignore path="ANT-Android-SDKs/**" />
</issue>
<!-- promote to error, must be handled -->
<issue id="InlinedApi" severity="fatal" />
<issue id="InconsistentArrays" severity="fatal" />

<!-- Libraries depend on older support libraries, must be replaced. -->

<!-- Support lib > 25.0.1 _sometimes_ raises this issue. Should be fixed though -->
<issue id="RestrictedApi" severity="warning" />
<issue id="UsingOnClickInXml" severity="ignore">
<ignore path="**/reportlist_row.xml" />
</issue>

<!-- All translations will not be complete -->
<issue id="MissingTranslation" severity="ignore" />

<!-- icon with all densities are not included - don't bother -->
<issue id="IconMissingDensityFolder" severity="ignore" />

<!-- Lint failure with AGP 7.0.0 -->
<issue id="UsingOnClickInXml" severity="ignore" />

<issue id="ResourceType">
<ignore path="src/org/runnerup/view/MainLayout.java" />
</issue>
<issue id="PrivateResource">
<ignore path="src/org/runnerup/notification/NotificationStateManager.java" />
</issue>
<issue id="MissingQuantity">
<!-- Transifex refuses quantity="one" for tr,pl (gradle) lint requires it, Inspect allows both-->
<ignore path="res/values-tr/cues.xml" />
Expand All @@ -35,38 +27,19 @@
<ignore path="res/values-zh/cues.xml" />
</issue>

<issue id="InvalidPackage">
<ignore regexp=".*okio.*" />
<ignore regexp=".*retrofit.*" />
<ignore path="**/com.squareup.okio/**" />
<ignore path="**/com.vividsolutions/**" />
</issue>
<issue id="IconDensities">
<ignore path="res/**" />
<ignore path="**/common/src/main/res/**" />
</issue>
<issue id="IconColors">
<ignore path="**/ic_stat_notify.png" />
</issue>
<issue id="WrongRegion" severity="ignore">
<ignore regexp="^.*?\Q\res\values-en-rNL\\E.*?$" />
</issue>
<issue id="ObsoleteSdkInt" severity="ignore">
<ignore regexp=".*-r14$" />
</issue>
<!-- SuppressLint has no effect in gradle plugin 3.0.0, bug? -->
<issue id="ClickableViewAccessibility" severity="ignore">
<ignore path="**/NumberPicker.java" />
</issue>
<!-- Ignored since minimum version less than 17 requires both left/right and start/end -->
<issue id="RtlHardcoded" severity="ignore"/>
<!-- used by library? -->
<!--issue id="LogNotTimber" severity="ignore"/-->
<issue id="ObsoleteLintCustomCheck" severity="ignore">
<ignore regexp="timber.*" />
<ignore regexp=".*drawable-r21$" />
</issue>
<!-- SuppressLint has no effect in gradle plugin 3.0.0, bug? -->
<!-- TODO -->
<issue id="ClickableViewAccessibility" severity="ignore">
<ignore path="**/NumberPicker.java" />
</issue>
<!-- lint-osmdroid.xml has specific suppressions, maintained separately -->
</lint>
1 change: 0 additions & 1 deletion app/res/layout/account_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
</ListView>

Expand Down
2 changes: 0 additions & 2 deletions app/res/layout/account_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
style="@style/AccountListText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_weight="1"
android:minWidth="48dp"
Expand All @@ -75,7 +74,6 @@
android:id="@+id/account_row_upload"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:minWidth="48dp"
android:minHeight="48dp"
Expand Down
2 changes: 1 addition & 1 deletion app/res/layout/actionbar_dropdown_spinner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:gravity="left" />
android:gravity="start" />
2 changes: 1 addition & 1 deletion app/res/layout/actionbar_spinner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
style="@style/TextAppearance.AppCompat.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left" />
android:gravity="start" />
3 changes: 1 addition & 2 deletions app/res/layout/detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
android:id="@+id/notes_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top|left"
android:gravity="top|start"
android:hint="@string/Notes_about_your_workout"
android:inputType="textCapSentences|textMultiLine"
android:minLines="4"
Expand Down Expand Up @@ -229,7 +229,6 @@
android:background="@drawable/btn_blue"
android:drawablePadding="-32dp"
android:drawableEnd="@drawable/ic_av_play_arrow"
android:drawableRight="@drawable/ic_av_play_arrow"
android:text="@string/Resume" />

<Button
Expand Down
1 change: 0 additions & 1 deletion app/res/layout/filepermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="URI"
tools:ignore="HardcodedText"/>

Expand Down
1 change: 0 additions & 1 deletion app/res/layout/history_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:contentDescription="@string/Sport"/>

<TextView
Expand Down
9 changes: 2 additions & 7 deletions app/res/layout/hr_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
<TextView
style="@style/RunHeader"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:gravity="start"
android:text="@string/Device" />

<TextView
style="@style/RunHeader"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:gravity="end"
android:text="@string/Heart_rate" />
</LinearLayout>
Expand All @@ -43,8 +41,7 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp" >
android:layout_marginStart="8dp" >

<TextView style="@style/RunHeader" />
</LinearLayout>
Expand All @@ -58,14 +55,12 @@
android:id="@+id/hr_device"
style="@style/RunInfo"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:gravity="start" />

<TextView
android:id="@+id/hr_value"
style="@style/RunInfo"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp" />
android:layout_marginEnd="8dp" />
</LinearLayout>
</LinearLayout>

Expand Down
2 changes: 0 additions & 2 deletions app/res/layout/manage_workouts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="false"
android:layout_alignParentRight="false"
android:layout_alignParentLeft="false"
android:layout_alignParentStart="false"
android:layout_above="@id/manage_button_table" />

Expand Down
Loading