Skip to content

Commit

Permalink
- Support for Android 15
Browse files Browse the repository at this point in the history
- public transport enabler library updated (2024-11-06)
- Plugin android-rocket-launcher removed from project (#7).
  It was outdated and not longer available in the repositories.
  Instead I added a simplified version of the open-app-task in the apps
  build.gradle file to do the same thing.
  • Loading branch information
Eric Scheibler committed Nov 6, 2024
1 parent 77fe465 commit 44c97fa
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 43 deletions.
45 changes: 23 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.application'
apply plugin: 'android-rocket-launcher'

// get signing properties
Properties keystoreProperties = new Properties()
Expand All @@ -20,13 +19,14 @@ if (keystoreProperties.isEmpty()) {
}

android {
compileSdkVersion 34
compileSdkVersion 35
namespace "org.walkersguide.android"

defaultConfig {
versionCode 40
versionCode 41
versionName '3.2.0-b4'
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
multiDexEnabled true
resConfigs "en", "de", "uk"
// contact data
Expand Down Expand Up @@ -63,7 +63,6 @@ android {
beta {
applicationId "org.walkersguide.android.beta"
dimension "version"
versionName '3.0.0-b12'
signingConfig signingConfigs.beta
// internal database
buildConfigField 'String', 'DATABASE_NAME', '"walkersguide.db"'
Expand All @@ -75,7 +74,6 @@ android {
prod {
applicationId "org.walkersguide.android"
dimension "version"
versionName '3.2.0-b3'
signingConfig signingConfigs.prod
// internal database
buildConfigField 'String', 'DATABASE_NAME', '"walkersguide.db"'
Expand Down Expand Up @@ -103,47 +101,50 @@ android {

lintOptions {
disable "GoogleAppIndexingWarning", "Autofill", "IconLauncherShape", "ButtonStyle"
abortOnError false
abortOnError true
baseline file("lint-baseline.xml")
}
}

dependencies {
// androidX
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.core:core:1.13.1'
implementation 'androidx.core:core:1.15.0'
implementation 'androidx.drawerlayout:drawerlayout:1.2.0'
implementation 'androidx.fragment:fragment:1.8.0'
implementation 'androidx.fragment:fragment:1.8.5'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'

// material design
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

// google helpers
implementation 'com.google.guava:guava:31.0.1-android'
implementation 'com.google.guava:guava:33.3.1-android'
implementation 'com.google.code.gson:gson:2.10.1'

// logging
implementation 'com.jakewharton.timber:timber:4.7.1'

// public transport enabler
implementation 'de.schildbach.pte:public-transport-enabler-2023-11-25@jar'
implementation 'de.schildbach.pte:public-transport-enabler-2024-11-06@jar'
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.13'
implementation 'org.slf4j:slf4j-api:2.0.9'
implementation 'org.slf4j:slf4j-api:2.0.16'
}

configurations.implementation {
// must exclude that jdk below, otherwise classes get duplicated
// required since update of androidx.core dependency to version 1.10.0
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}

repositories {
// include local libs directory
flatDir {
dirs 'libs'
// open the APK on your Android Device
android.applicationVariants.all { variant ->
if (variant.install) {
tasks.create(name: "open${variant.name.capitalize()}", type: Exec,
dependsOn: variant.install) {
group = 'Open'
description "Installs and opens the APK for ${variant.description}."
doFirst {
String activityClass = ".ui.activity.MainActivity"
commandLine android.adbExe, 'shell', 'am', 'start', '-n',
"${variant.applicationId}/${activityClass}"
}
}
}
}

Binary file not shown.
4 changes: 2 additions & 2 deletions app/src/main/java/org/walkersguide/android/util/Helper.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ public static String formatYesOrNo(boolean value) {

public static Date parseTimestamp(String timestamp) {
try {
return (new SimpleDateFormat(ISO_8601_FORMAT1)).parse(timestamp);
return (new SimpleDateFormat(ISO_8601_FORMAT1, Locale.ROOT)).parse(timestamp);
} catch (Exception e) {}
try {
return (new SimpleDateFormat(ISO_8601_FORMAT2)).parse(timestamp);
return (new SimpleDateFormat(ISO_8601_FORMAT2, Locale.ROOT)).parse(timestamp);
} catch (Exception e) {}
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<!-- options menu -->
<string name="planRouteMenuItemSwap">Swap start and destination</string>
<string name="planRouteMenuItemExcludedWays">Excluded ways</string>
<string name="planRouteMenuItemRoutingWayClasses">Way classes</string>
<string name="planRouteMenuItemRoutingWayClasses">Way class weights</string>
<string name="planRouteMenuItemClear">Clear points</string>

<!-- ConfigureWayClassWeightsDialog -->
Expand Down
19 changes: 2 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath 'com.cesarferreira:android-rocket-launcher:1.0.0'
}
plugins {
id 'com.android.application' version '8.7.0' apply false
}

allprojects {
repositories {
google()
jcenter()
}

// enable compiler warnings
//tasks.withType(JavaCompile) {
// options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 22 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)

repositories {
google()
mavenCentral()

// include local libs directory
flatDir {
dirs 'app/libs'
}
}
}

// root project
rootProject.name = 'WalkersGuide'

Expand Down

0 comments on commit 44c97fa

Please sign in to comment.