Skip to content

Commit

Permalink
Security updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Bdegraaf1234 committed Apr 30, 2024
1 parent dd394be commit 004a866
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 111 deletions.
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
16 changes: 7 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,22 @@
* limitations under the License.
*/
buildscript {
ext.kotlin_version = '1.9.22'
ext.dokka_version = '1.9.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 Down Expand Up @@ -90,7 +88,7 @@ subprojects {

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = '17'
jvmTarget = "$java_version"
apiVersion = '1.8'
languageVersion = '1.8'
}
Expand Down Expand Up @@ -121,5 +119,5 @@ nexusPublishing {
}

wrapper {
gradleVersion '8.7'
gradleVersion "$gradle_version"
}
43 changes: 43 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,46 @@ android.defaults.buildfeatures.buildconfig=true
# 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

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
2 changes: 1 addition & 1 deletion gradle/android.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
android {
compileSdkVersion 33
buildToolsVersion '32.0.0'
buildToolsVersion '34.0.0'

defaultConfig {
minSdkVersion 24
Expand Down
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"
}
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"
6 changes: 3 additions & 3 deletions plugins/radar-android-google-activity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ android {
// Configuration //
//---------------------------------------------------------------------------//

description = 'Google Activity Recognition plugin for RADAR passive remote monitoring app.'
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:21.0.1'
api project(":radar-commons-android")
implementation "com.google.android.gms:play-services-location:$play_services_location_version"
}

apply from: "$rootDir/gradle/publishing.gradle"
8 changes: 4 additions & 4 deletions plugins/radar-android-google-places/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
apply from: "$rootDir/gradle/android.gradle"

android {
namespace 'org.radarbase.passive.google.places'
namespace "org.radarbase.passive.google.places"
}

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

description = 'Google places plugin for RADAR passive remote monitoring app.'
description = "Google places plugin for RADAR passive remote monitoring app."

//---------------------------------------------------------------------------//
// Sources and classpath configurations //
//---------------------------------------------------------------------------//
dependencies {
api project(':radar-commons-android')
implementation 'com.google.android.libraries.places:places:3.2.0'
api project(":radar-commons-android")
implementation "com.google.android.libraries.places:places:$places_version"
}

apply from: "$rootDir/gradle/publishing.gradle"
6 changes: 3 additions & 3 deletions plugins/radar-android-google-sleep/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ android {
// Configuration //
//---------------------------------------------------------------------------//

description = 'Google sleep plugin for RADAR passive remote monitoring app.'
description = "Google sleep 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:21.0.1'
api project(":radar-commons-android")
implementation "com.google.android.gms:play-services-location:$play_services_location_version"
}

apply from: "$rootDir/gradle/publishing.gradle"
8 changes: 4 additions & 4 deletions plugins/radar-android-login-oauth2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ apply from: "$rootDir/gradle/android.gradle"

android {
namespace "org.radarbase.android.auth.oauth2"
defaultConfig.manifestPlaceholders = ['appAuthRedirectScheme': 'org.radarbase.android']
defaultConfig.manifestPlaceholders = ["appAuthRedirectScheme": "org.radarbase.android"]
}

description = 'RADAR Android OAuth2 LoginManager.'
description = "RADAR Android OAuth2 LoginManager."

dependencies {
api project(':radar-commons-android')
api 'net.openid:appauth:0.11.1'
api project(":radar-commons-android")
api "net.openid:appauth:$appauth_version"
}

apply from: "$rootDir/gradle/publishing.gradle"
12 changes: 6 additions & 6 deletions plugins/radar-android-login-qr/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply plugin: 'kotlin-android'
apply plugin: "kotlin-android"

apply from: "$rootDir/gradle/android.gradle"

Expand All @@ -10,15 +10,15 @@ android {
}
}

description = 'RADAR Android QR LoginManager.'
description = "RADAR Android QR LoginManager."

dependencies {
api project(':radar-commons-android')
implementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false }
implementation 'androidx.appcompat:appcompat:1.6.1'
api project(":radar-commons-android")
implementation("com.journeyapps:zxing-android-embedded:$zxing_android_embedded_version") { transitive = false }
implementation "androidx.appcompat:appcompat:$appcompat_version"
// Support Android 14+
//noinspection GradleDependency
implementation 'com.google.zxing:core:3.4.0'
implementation "com.google.zxing:core:$zxing_core_version"
}

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

0 comments on commit 004a866

Please sign in to comment.