Skip to content

Commit

Permalink
Merge pull request #883 from enviroCar/develop
Browse files Browse the repository at this point in the history
Release Version 2.1.0
  • Loading branch information
matthesrieke authored Jan 22, 2022
2 parents 98403d7 + 6198bfa commit 1aee69d
Show file tree
Hide file tree
Showing 62 changed files with 740 additions and 168 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
.idea
.gradle
local.properties
Dockerfile.build
4 changes: 2 additions & 2 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: set up JDK 8
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '11'
distribution: 'adopt'
cache: gradle

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: set up JDK 8
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '11'
distribution: 'adopt'
cache: gradle

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ build/
*.iml
local.properties
*/release/
gradle-release.properties
lcs-keystore
31 changes: 31 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM mingc/android-build-box:1.24.0

ARG ORG_GRADLE_PROJECT_MAPBOX_DOWNLOADS_TOKEN

RUN mkdir /app
WORKDIR /app

# rm the NDK because it breaks the build
RUN rm -rf /opt/android-sdk/ndk/current
RUN rm -rf /opt/android-sdk/ndk/23.1.7779620

COPY ./gradle /app/gradle
COPY ./gradlew /app
COPY ./gradle.properties /app
COPY ./settings.gradle /app
COPY ./build.gradle /app

# add a step that downloads the latest gradle wrapper before the actual build
#RUN ./gradlew help

COPY . /app


RUN ./gradlew build

# build the image with:
# docker build --build-arg ORG_GRADLE_PROJECT_MAPBOX_DOWNLOADS_TOKEN=<mapbox-api-token> -t envirocar-app-build:latest -f Dockerfile.build .
#
# to copy the final APK from the image to the host path /tmp/envirocar:
# docker run --rm -v /tmp/envirocar:/mnt/out envirocar-app-build:latest cp /app/org.envirocar.app/build/outputs/apk/debug/org.envirocar.app-debug.apk /mnt/out

41 changes: 41 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM mingc/android-build-box:1.24.0

ARG ORG_GRADLE_PROJECT_RELEASE_STORE_FILE
ARG ORG_GRADLE_PROJECT_RELEASE_STORE_PASSWORD
ARG ORG_GRADLE_PROJECT_RELEASE_KEY_ALIAS
ARG ORG_GRADLE_PROJECT_RELEASE_KEY_PASSWORD
ARG ORG_GRADLE_PROJECT_MAPBOX_DOWNLOADS_TOKEN

RUN mkdir /app
WORKDIR /app

# rm the NDK because it breaks the build
RUN rm -rf /opt/android-sdk/ndk/current
RUN rm -rf /opt/android-sdk/ndk/23.1.7779620

COPY ./gradle /app/gradle
COPY ./gradlew /app
COPY ./gradle.properties /app
COPY ./settings.gradle /app
COPY ./build.gradle /app
COPY ./lcs-keystore /app/lcs-keystore

# add a step that downloads the latest gradle wrapper before the actual build
#RUN ./gradlew help

COPY . /app
# use the following as --build-arg variables:
# ORG_GRADLE_PROJECT_RELEASE_STORE_FILE=/app/lcs-keystore
# ORG_GRADLE_PROJECT_RELEASE_STORE_PASSWORD=<pw>
# ORG_GRADLE_PROJECT_RELEASE_KEY_ALIAS=<alias>
# ORG_GRADLE_PROJECT_RELEASE_KEY_PASSWORD=<pw>


RUN ./gradlew assembleRelease

# build the image with:
# docker build --build-arg ORG_GRADLE_PROJECT_RELEASE_STORE_FILE=/app/lcs-keystore --build-arg ORG_GRADLE_PROJECT_RELEASE_STORE_PASSWORD=<pw> --build-arg ORG_GRADLE_PROJECT_RELEASE_KEY_ALIAS=<alias> --build-arg ORG_GRADLE_PROJECT_RELEASE_KEY_PASSWORD=<pw> --build-arg ORG_GRADLE_PROJECT_MAPBOX_DOWNLOADS_TOKEN=<mapbox-api-token> -t envirocar-app-release:latest -f Dockerfile.release .
#
# to copy the final APK from the image to the host path /tmp/envirocar:
# docker run --rm -v /tmp/envirocar:/mnt/out envirocar-app-release:latest cp /app/org.envirocar.app/build/outputs/apk/release/org.envirocar.app-release.apk /mnt/out

3 changes: 2 additions & 1 deletion android-obd-simulator/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
android:icon="@drawable/app_icon" >
<activity android:name=".OBDSimulator"
android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden">
android:configChanges="orientation|keyboardHidden"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
30 changes: 20 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2/" }
google()

}

dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.android.tools.build:gradle:7.0.3'
}

}

plugins {
id "com.github.dcendents.android-maven" version "2.1"
id "com.github.hierynomus.license" version "0.15.0"
id 'maven-publish'
id "com.github.hierynomus.license" version "0.16.1"
}

allprojects {
Expand All @@ -38,19 +36,31 @@ allprojects {
mavenLocal()
maven { url "https://jitpack.io" }
mavenCentral()
jcenter()
google()
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = "mapbox"
// Use the secret token you stored in gradle.properties as the password
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
}

ext {
androidPlugin = 'com.android.tools.build:gradle:3.1.2'
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
compileSdkVersion = 31
targetSdkVersion = 31
buildToolsVersion = '30.0.2'
versionCode = 50
versionName = "2.0.0"
versionCode = 51
versionName = "2.1.0"
ndkVersion = "21.4.7075529"

javaCompileVersion = JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
2 changes: 0 additions & 2 deletions org.envirocar.algorithm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
}

buildTypes {
Expand Down
16 changes: 11 additions & 5 deletions org.envirocar.app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
package="org.envirocar.app"
android:installLocation="internalOnly"
android:versionCode="50"
android:versionName="2.0.0">
android:versionCode="51"
android:versionName="2.1.0"
>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Expand Down Expand Up @@ -85,7 +86,8 @@
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Theme.Cario">
android:theme="@style/Theme.Cario"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down Expand Up @@ -116,13 +118,17 @@
<!--</intent-filter>-->
</service>

<receiver android:name=".services.SystemStartupReceiver">
<receiver
android:name=".services.SystemStartupReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
</intent-filter>
</receiver>
<receiver android:name="org.envirocar.app.services.WlanConnectionReceiver">
<receiver
android:name="org.envirocar.app.services.WlanConnectionReceiver"
android:exported="true">
<intent-filter android:priority="100">
<!-- <action android:name="android.net.wifi.STATE_CHANGE" />-->
<action android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
Expand Down
16 changes: 13 additions & 3 deletions org.envirocar.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ dependencies {
implementation rootProject.ext.rxBindingCore
implementation rootProject.ext.rxBindingAppCompat

// MapBox SDK
implementation(rootProject.ext.mapbox) {
transitive = true
//MapBox SDK
implementation (rootProject.ext.mapbox){
exclude group: 'group_name', module: 'module_name'
}

// Test
Expand Down Expand Up @@ -103,11 +103,21 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion
ndkVersion rootProject.ext.ndkVersion

signingConfigs {
release {
storeFile file(project.properties['RELEASE_STORE_FILE'] ?: "/tmp/tmp.key")
storePassword project.properties['RELEASE_STORE_PASSWORD'] ?: ""
keyAlias project.properties['RELEASE_KEY_ALIAS'] ?: ""
keyPassword project.properties['RELEASE_KEY_PASSWORD'] ?: ""
}
}

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

Expand Down
6 changes: 3 additions & 3 deletions org.envirocar.app/res/layout/activity_recording_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
android:gravity="center"
android:orientation="vertical">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_recscreen_trackdetails_gps"
android:layout_width="25dp"
android:layout_height="25dp"
Expand All @@ -102,7 +102,7 @@
android:gravity="center"
android:orientation="vertical">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_recscreen_trackdetails_bluetooth"
android:layout_width="25dp"
android:layout_height="25dp"
Expand Down Expand Up @@ -259,7 +259,7 @@
android:gravity="center"
android:orientation="horizontal">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_track_details_speed_image"
android:layout_width="24dp"
android:layout_height="24dp"
Expand Down Expand Up @@ -265,7 +265,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_track_details_stops_image"
android:layout_width="24dp"
android:layout_height="24dp"
Expand Down Expand Up @@ -305,7 +305,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_track_details_stoptime_image"
android:layout_width="24dp"
android:layout_height="24dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_car_details_attr_engine_image"
android:layout_width="24dp"
android:layout_height="24dp"
Expand Down Expand Up @@ -185,7 +185,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentLeft="true"
Expand Down Expand Up @@ -263,7 +263,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_car_details_attr_power_image"
android:layout_width="24dp"
android:layout_height="24dp"
Expand Down
6 changes: 3 additions & 3 deletions org.envirocar.app/res/layout/car_detail_card_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
android:paddingTop="5dp"
android:paddingBottom="5dp">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/expandView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
Expand Down Expand Up @@ -118,7 +118,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentLeft="true"
Expand Down Expand Up @@ -231,7 +231,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">

<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/activity_car_details_attr_engine_image"
android:layout_width="24dp"
android:layout_height="24dp"
Expand Down
Loading

0 comments on commit 1aee69d

Please sign in to comment.