Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated app to run and compile #2387

Merged
merged 3 commits into from
Feb 26, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'

- name: Build with Gradle
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'

- name: Build with Gradle
run: |
Expand Down
34 changes: 19 additions & 15 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ val keystoreExists = System.getenv("KEYSTORE_FILE") != null

android {
namespace = "io.pslab"
compileSdk = 33
compileSdk = 34

defaultConfig {
applicationId = "io.pslab"
minSdk = 21
targetSdk = 31
minSdk = 31
targetSdk = 34
versionCode = 22
versionName = "2.1.0"
versionName = "3.1.0"
}

signingConfigs {
Expand Down Expand Up @@ -53,37 +53,38 @@ android {
}
}


dependencies {

// Android stock libraries
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.cardview:cardview:1.0.0")
implementation("androidx.recyclerview:recyclerview:1.3.0")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.preference:preference:1.2.0")
implementation("androidx.browser:browser:1.5.0")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.preference:preference:1.2.1")
implementation("androidx.browser:browser:1.7.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")

// Custom tools libraries
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
implementation("com.github.bmelnychuk:atv:1.2.9")
implementation("de.hdodenhof:circleimageview:3.1.0")
implementation("com.github.devlight.navigationtabstrip:navigationtabstrip:1.0.4")
implementation("com.afollestad.material-dialogs:core:0.9.6.0")
implementation("com.afollestad.material-dialogs", "commons", "0.9.6.0")
implementation("com.github.medyo:android-about-page:1.3.1")
implementation("com.github.tiagohm.MarkdownView:library:0.19.0")
implementation("com.github.mirrajabi:search-dialog:1.2.4")
implementation("com.sdsmdg.harjot:croller:1.0.7")
implementation("com.github.BeppiMenozzi:Knob:1.9.0")
implementation("com.github.warkiz.widget:indicatorseekbar:2.1.2")
implementation("com.github.Vatican-Cameos:CarouselPicker:1.2")
implementation("com.github.anastr:speedviewlib:1.6.0")
implementation("com.github.anastr:speedviewlib:1.6.1")
implementation("com.github.GoodieBag:ProtractorView:v1.2")
implementation("com.github.Triggertrap:SeekArc:v1.1")

// Apache commons
implementation("org.apache.commons:commons-math3:3.6.1")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("org.apache.commons:commons-lang3:3.14.0")

// Picasso
implementation("com.squareup.picasso:picasso:2.71828")
Expand All @@ -97,10 +98,13 @@ dependencies {
implementation("com.jakewharton:butterknife:$butterKnifeVersion")

// Map libraries
val osmDroidVersion = "6.1.11"
implementation("org.osmdroid:osmdroid-android:$osmDroidVersion")
implementation("org.osmdroid:osmdroid-mapsforge:$osmDroidVersion")
implementation("org.osmdroid:osmdroid-geopackage:$osmDroidVersion")
implementation("org.osmdroid:osmdroid-android:6.1.18")
implementation("org.osmdroid:osmdroid-mapsforge:6.1.18")
implementation("org.osmdroid:osmdroid-geopackage:6.1.18") {
exclude("org.osmdroid.gpkg");
exclude("ormlite-core");
exclude("com.j256.ormlite");
}

// Realm
implementation("io.realm:android-adapters:4.0.0")
Expand Down
32 changes: 17 additions & 15 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"
tools:ignore="HighSamplingRate" />
Expand All @@ -21,24 +21,26 @@

<application
android:name=".PSLabApplication"
android:allowBackup="true"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:allowBackup="false"
android:fullBackupContent="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:roundIcon="@drawable/app_icon_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:icon, android:allowBackup">
tools:replace="android:icon,android:allowBackup">
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />

<activity
android:name=".activity.SoundMeterActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity android:name=".activity.CreateConfigActivity" />
<activity
android:name=".activity.ThermometerActivity"
android:screenOrientation="portrait"
android:screenOrientation="fullSensor"
android:theme="@style/AppTheme" />
<activity
android:name=".activity.RoboticArmActivity"
Expand Down Expand Up @@ -84,38 +86,38 @@
<activity android:name=".activity.SensorDataLoggerActivity" />
<activity
android:name=".activity.MultimeterActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity
android:name=".activity.PowerSourceActivity"
android:screenOrientation="portrait"
android:screenOrientation="fullSensor"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".activity.LuxMeterActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity
android:name=".activity.WaveGeneratorActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity
android:name=".activity.AccelerometerActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity android:name=".activity.DataLoggerActivity" />
<activity
android:name=".activity.BarometerActivity"
android:configChanges="keyboardHidden|screenSize|orientation"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity
android:name=".activity.CompassActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity
android:name=".activity.GyroscopeActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity
android:name=".activity.GasSensorActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />
<activity android:name=".activity.MapsActivity" />
<activity
android:name=".activity.DustSensorActivity"
android:screenOrientation="portrait" />
android:screenOrientation="fullSensor" />

<receiver android:name=".receivers.USBDetachReceiver" />

Expand Down
17 changes: 17 additions & 0 deletions app/src/main/res/xml/data_extraction_rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<exclude domain="root" />
<exclude domain="file" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</cloud-backup>
<device-transfer>
<exclude domain="root" />
<exclude domain="file" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</device-transfer>
</data-extraction-rules>
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("io.realm:realm-gradle-plugin:10.11.0")
classpath("io.realm:realm-gradle-plugin:10.13.3-transformer-api")
}
}

plugins {
id("com.android.application") version "7.4.2" apply false
id("com.android.application") version "8.1.2" apply false
}
8 changes: 7 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx1536m \
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
google_key = "AIzaSyBFvrqI8_J108WntI7surDGqCUcd1RbHPQ"
android.useAndroidX=true
android.enableJetifier=true
kapt.incremental.apt=true
org.gradle.warning.mode=all
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed May 24 12:24:11 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pluginManagement {
mavenCentral()
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
Expand All @@ -14,5 +15,6 @@ dependencyResolutionManagement {
maven("https://plugins.gradle.org/m2/")
}
}

rootProject.name = "PSLab"
include(":app")
Loading