Skip to content

Commit

Permalink
Merge pull request #444 from RADAR-base/release-1.2.5
Browse files Browse the repository at this point in the history
Release 1.2.5
  • Loading branch information
Bdegraaf1234 committed May 8, 2024
2 parents 23f0a3b + 95825a9 commit d0934db
Show file tree
Hide file tree
Showing 44 changed files with 1,876 additions and 118 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- master
- dev

jobs:
security:
Expand Down Expand Up @@ -32,6 +33,8 @@ jobs:
run: >
snyk test
--all-sub-projects
--configuration-matching='^releaseRuntimeClasspath$'
--configuration-matching="^runtimeClasspath$"
--fail-on=upgradable
--org=radar-base
--policy-path=$PWD/.snyk
--policy-path=.snyk
--severity-threshold=high
2 changes: 1 addition & 1 deletion avro-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
description = "Version of Apache Avro compatible with Android"

dependencies {
implementation("org.slf4j:slf4j-api:2.0.7")
implementation("org.slf4j:slf4j-api:$slf4j_api_version")

testImplementation(project(":radar-commons-android")) {
exclude group: 'org.apache.avro', module: 'avro'
Expand Down
21 changes: 11 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,23 @@
* limitations under the License.
*/
buildscript {
ext.kotlin_version = '1.8.21'
ext.dokka_version = '1.8.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.0.1'
classpath "com.android.tools.build:gradle:$gradle_android_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.bjoernq:unmockplugin:0.7.9'
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.18"
classpath "com.github.bjoernq:unmockplugin:$unmock_plugin_version"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokka_android_gradle_plugin_version"
classpath("org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version")
}
}

plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("com.github.ben-manes.versions") version "0.46.0"
id("io.github.gradle-nexus.publish-plugin") version "$publish_plugin_version"
id("com.github.ben-manes.versions") version "$versions_plugin_version"
}

allprojects {
Expand All @@ -41,7 +40,7 @@ allprojects {
ext.issueUrl = 'https://github.com/' + githubRepoName + '/issues'
ext.website = 'http://radar-base.org'

version = "1.2.4"
version = "$project_version"
group = 'org.radarbase'

ext.versionCode = 52
Expand Down Expand Up @@ -90,19 +89,21 @@ subprojects {

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = '11'
jvmTarget = "$java_version"
apiVersion = '1.8'
languageVersion = '1.8'
}
}
}

// Configuration for the gradle-versions plugin https://github.com/ben-manes/gradle-versions-plugin
def isNonStable = { String version ->
def stableKeyword = ["RELEASE", "FINAL", "GA"].any { version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}

// Configuration for the gradle-versions plugin https://github.com/ben-manes/gradle-versions-plugin
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
Expand All @@ -119,5 +120,5 @@ nexusPublishing {
}

wrapper {
gradleVersion '8.1.1'
gradleVersion "$gradle_version"
}
48 changes: 46 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,54 @@ org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=1536m -Dfile.encoding=UTF-8 -X
org.gradle.parallel=true
org.gradle.vfs.watch=true
kotlin.code.style=official

android.defaults.buildfeatures.buildconfig=true
android.jetifier.ignorelist=jackson-core-2.16.1.jar

# 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
# org.gradle.parallel=true

project_version=1.2.5

java_version=17
kotlin_version=1.9.23
gradle_version=8.7

gradle_android_version=8.3.2
unmock_plugin_version=0.7.9
dokka_android_gradle_plugin_version=0.9.18
dokka_version=1.9.20
publish_plugin_version=2.0.0
versions_plugin_version=0.51.0

radar_commons_version=0.15.0
radar_schemas_commons_version=0.8.7

radar_faros_sdk_version=0.1.0

slf4j_api_version=2.0.13
appcompat_version=1.6.1
okhttp_version=4.12.0
localbroadcastmanager_version=1.1.0
legacy_support_version=1.0.0
lifecycle_service_version=2.7.0
firebase_bom_version=32.8.1
slf4j_handroid_version=2.0.4
material_version=1.11.0
constraintlayout_version=2.1.4
play_services_location_version=21.2.0
places_version=3.4.0
appauth_version=0.11.1
zxing_android_embedded_version=4.3.0
zxing_core_version=3.5.3

# test dependencies
androidx_core_version=1.5.0
androidx_ext_truth_version=1.5.0
androidx_ext_junit_version=1.1.5
androidx_runner_version=1.5.0
androidx_espresso_version=3.5.1
truth_version=1.4.2
runner_version=1.5.2
# junit 4!
junit_version=4.13.2
8 changes: 4 additions & 4 deletions gradle/android.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
android {
compileSdkVersion 33
buildToolsVersion '32.0.0'
buildToolsVersion '34.0.0'

defaultConfig {
minSdkVersion 24
minSdkVersion 26
targetSdkVersion 33
versionCode versionCode
versionName version
Expand Down Expand Up @@ -31,7 +31,7 @@ android {
exclude 'META-INF/LICENSE'
}
compileOptions {
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_17
}
}
78 changes: 35 additions & 43 deletions gradle/test.gradle
Original file line number Diff line number Diff line change
@@ -1,55 +1,47 @@
apply plugin: 'de.mobilej.unmock'
apply plugin: "de.mobilej.unmock"

android {
defaultConfig.testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
}

ext {
androidXCoreVersion = '1.5.0'
androidXExtTruthVersion = '1.5.0'
androidXExtJunitVersion = '1.1.5'
androidXRunnerVersion = '1.5.0'
androidXEspressoVersion = '3.5.1'
useLibrary "android.test.runner"
useLibrary "android.test.base"
useLibrary "android.test.mock"
}

dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.slf4j:slf4j-simple:2.0.7'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.11.0'
testImplementation "junit:junit:$junit_version"
testImplementation "org.slf4j:slf4j-simple:$slf4j_api_version"
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"

// Core library
androidTestImplementation "androidx.test:core:$androidXCoreVersion"
androidTestImplementation "androidx.test:core:$androidx_core_version"

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation "androidx.test:runner:1.5.2"
androidTestImplementation "androidx.test:rules:$androidXRunnerVersion"
androidTestImplementation "androidx.test:runner:$runner_version"
androidTestImplementation "androidx.test:rules:$androidx_runner_version"

// Assertions
androidTestImplementation "androidx.test.ext:junit:$androidXExtJunitVersion"
androidTestImplementation "androidx.test.ext:truth:$androidXExtTruthVersion"
androidTestImplementation "com.google.truth:truth:1.1.3"
androidTestImplementation "androidx.test.ext:junit:$androidx_ext_junit_version"
androidTestImplementation "androidx.test.ext:truth:$androidx_ext_truth_version"
androidTestImplementation "com.google.truth:truth:$truth_version"

// Espresso dependencies
androidTestImplementation "androidx.test.espresso:espresso-core:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-intents:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-accessibility:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-web:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$androidx_espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-intents:$androidx_espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-accessibility:$androidx_espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-web:$androidx_espresso_version"
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$androidx_espresso_version"

// The following Espresso dependency can be either "implementation"
// or "androidTestImplementation", depending on whether you want the
// dependency to appear on your APK's compile classpath or the test APK
// dependency to appear on your APK"s compile classpath or the test APK
// classpath.
androidTestImplementation "androidx.test.espresso:espresso-idling-resource:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-idling-resource:$androidx_espresso_version"

androidTestImplementation "androidx.test.espresso:espresso-core:$androidXEspressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_version"

unmock 'org.robolectric:android-all:5.0.2_r3-robolectric-r0'
unmock "org.robolectric:android-all:5.0.2_r3-robolectric-r0"
}

unMock {
Expand Down Expand Up @@ -87,18 +79,18 @@ unMock {
keepStartingWith "com.android.internal.util."
keep "android.net.Uri"
keepStartingWith "org.json."
keep 'android.os.SystemClock'
keep 'android.os.RemoteException'
keep 'android.os.HandlerThread'
keep 'android.os.Handler'
keep 'android.os.IMessenger'
keep 'android.os.Process'
keep 'android.os.Looper'
keep 'android.os.ZygoteStartFailedEx'
keep 'android.system.Os'
keep 'android.os.Binder'
keep 'android.os.MessageQueue'
keep 'android.os.Message'
keep "android.os.SystemClock"
keep "android.os.RemoteException"
keep "android.os.HandlerThread"
keep "android.os.Handler"
keep "android.os.IMessenger"
keep "android.os.Process"
keep "android.os.Looper"
keep "android.os.ZygoteStartFailedEx"
keep "android.system.Os"
keep "android.os.Binder"
keep "android.os.MessageQueue"
keep "android.os.Message"

keepAndRename "java.nio.charset.Charsets" to "xjava.nio.charset.Charsets"
}
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 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions plugins/radar-android-application-status/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ android {
// Configuration //
//---------------------------------------------------------------------------//

description = 'Application statistics plugin for RADAR passive remote monitoring app'
description = "Application statistics plugin for RADAR passive remote monitoring app"

//---------------------------------------------------------------------------//
// Sources and classpath configurations //
//---------------------------------------------------------------------------//

dependencies {
api project(':radar-commons-android')
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
api project(":radar-commons-android")
implementation "androidx.localbroadcastmanager:localbroadcastmanager:$localbroadcastmanager_version"
}

apply from: "$rootDir/gradle/publishing.gradle"
12 changes: 6 additions & 6 deletions plugins/radar-android-faros/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
apply from: "$rootDir/gradle/android.gradle"

android {
namespace 'org.radarbase.passive.bittium'
namespace "org.radarbase.passive.bittium"
}

//---------------------------------------------------------------------------//
// Configuration //
//---------------------------------------------------------------------------//

description = 'Faros plugin for RADAR passive remote monitoring app'
ext.nexusRepo = 'https://repo.thehyve.nl/content/repositories/' + (version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases')
description = "Faros plugin for RADAR passive remote monitoring app"
ext.nexusRepo = "https://repo.thehyve.nl/content/repositories/" + (version.endsWith("-SNAPSHOT") ? "snapshots" : "releases")

//---------------------------------------------------------------------------//
// Sources and classpath configurations //
//---------------------------------------------------------------------------//

repositories {
maven { url 'https://repo.thehyve.nl/content/repositories/releases' }
maven { url "https://repo.thehyve.nl/content/repositories/releases" }
}

dependencies {
api project(':radar-commons-android')
implementation 'org.radarcns:radar-faros-sdk:0.1.0'
api project(":radar-commons-android")
implementation "org.radarcns:radar-faros-sdk:$radar_faros_sdk_version"
}

apply from: "$rootDir/gradle/publishing.gradle"
27 changes: 27 additions & 0 deletions plugins/radar-android-google-activity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Google Activity plugin of RADAR-pRMT

Plugin to monitor the user activity transition data. The user activity data is tracked via Google Activity Recognition API. The API automatically detects activities by periodically reading short bursts of sensor data and processing them using machine learning models. This API provides the activity and transition of it.

This plugin requires the Android `ACTIVITY_RECOGNITION` permission for devices with API level 29 or higher, and the `com.google.android.gms.permission.ACTIVITY_RECOGNITION` permission for devices with API level 28 or lower.

## Installation

To add the plugin to your app, add the following snippet to your app's `build.gradle` file.

```gradle
dependencies {
implementation "org.radarbase:radar-android-google-activity:$radarCommonsAndroidVersion"
}
```

Add `org.radarbase.passive.google.activity.GoogleActivityProvider` to the `plugins` variable of the `RadarService` instance in your app.

## Configuration

To enable this plugin, add the provider `google_activity` to `plugins` property of the configuration.

This plugin produces data for the following topics: (types starts with `org.radarcns.passive.google` namespace)

| Topic | Type | Description |
|--------------------------------------------|---------------------------------|---------------------------------------------------------------------------------------|
| `android_google_activity_transition_event` | `GoogleActivityTransitionEvent` | Represents an activity transition event, for example start to walk, stop running etc. |
21 changes: 21 additions & 0 deletions plugins/radar-android-google-activity/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apply from: "$rootDir/gradle/android.gradle"

android {
namespace "org.radarbase.passive.google.activity"
}

//---------------------------------------------------------------------------//
// Configuration //
//---------------------------------------------------------------------------//

description = "Google Activity Recognition plugin for RADAR passive remote monitoring app."

//---------------------------------------------------------------------------//
// Sources and classpath configurations //
//---------------------------------------------------------------------------//
dependencies {
api project(":radar-commons-android")
implementation "com.google.android.gms:play-services-location:$play_services_location_version"
}

apply from: "$rootDir/gradle/publishing.gradle"
Loading

0 comments on commit d0934db

Please sign in to comment.