Skip to content

Commit

Permalink
Chore update to gradle version catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Aug 5, 2023
1 parent 29deced commit 6aa9fb2
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 82 deletions.
131 changes: 64 additions & 67 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
apply from: 'jacoco.gradle'

android {
compileSdk 34
compileSdk libs.versions.compileSdk.get().toInteger()
ndkVersion '22.0.7026061'

defaultConfig {
applicationId 'org.openobservatory.ooniprobe'
minSdk 21
targetSdk 34
defaultConfig {
applicationId 'org.openobservatory.ooniprobe'
minSdk libs.versions.minSdk.get().toInteger()
targetSdk libs.versions.targetSdk.get().toInteger()
versionName '3.8.3'
versionCode 102
testInstrumentationRunner "org.openobservatory.ooniprobe.TestAndroidJUnitRunner"
Expand Down Expand Up @@ -104,82 +107,76 @@ dependencies {
implementation project(path: ':engine')

// AndroidX
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-process:2.5.1'
implementation 'androidx.preference:preference:1.2.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
implementation 'com.google.guava:guava:30.1.1-android'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation libs.androidx.appcompat
implementation libs.androidx.constraintlayout
implementation libs.androidx.lifecycle.process
implementation libs.androidx.preference
implementation libs.androidx.localbroadcastmanager
implementation libs.androidx.legacy.support.v4

// Google
implementation libs.google.material
implementation libs.google.guava
implementation libs.google.gson

// Third-party
annotationProcessor 'com.github.Raizlabs.DBFlow:dbflow-processor:4.2.4'
implementation 'com.github.Raizlabs.DBFlow:dbflow-core:4.2.4'
implementation 'com.github.Raizlabs.DBFlow:dbflow:4.2.4'
annotationProcessor libs.dbflow.processor
implementation libs.dbflow.core
implementation libs.dbflow.lib

implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
implementation libs.retrofit.lib
implementation libs.retrofit.converter.gson
implementation libs.retrofit.logging.interceptor


implementation 'com.jakewharton:butterknife:10.2.3'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
implementation libs.butterknife.core
annotationProcessor libs.butterknife.compiler

implementation 'com.github.xanscale.LocalhostToolkit:app:19.05.01'
implementation 'com.airbnb.android:lottie:3.0.7'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'ru.noties:markwon:2.0.1'
implementation 'commons-io:commons-io:2.6'
//arcview to fragment_dashboard
implementation 'com.github.florent37:shapeofview:1.3.2'
implementation libs.xanscale.localhost.toolkit
implementation libs.lottie
implementation libs.markwon
implementation libs.commons.io
//arcview to fragment_dashboard
implementation libs.shapeofview

// Flavor
fullImplementation platform('com.google.firebase:firebase-bom:26.3.0')
fullImplementation 'com.google.firebase:firebase-messaging'
fullImplementation 'ly.count.android:sdk:21.11.0'
fullImplementation 'io.sentry:sentry-android:6.3.0'
fullImplementation 'com.google.android.play:core:1.10.3'
fullImplementation platform(libs.google.firebase.bom)
fullImplementation libs.google.firebase.messaging
fullImplementation libs.countly.sdk
fullImplementation libs.sentry.android
fullImplementation libs.google.play.core

// Dependency Injection
implementation 'com.google.dagger:dagger:2.36'
annotationProcessor 'com.google.dagger:dagger-compiler:2.36'
implementation libs.google.dagger
annotationProcessor libs.google.dagger.compiler

// Logger
implementation project(':applogger')

// Testing
// Unit Testing
testImplementation 'junit:junit:4.13.2'
testImplementation 'androidx.test:core:1.4.0'
testImplementation 'androidx.test:runner:1.4.0'
testImplementation 'androidx.test:rules:1.4.0'
testImplementation 'org.mockito:mockito-core:4.6.1'
testImplementation 'org.mockito:mockito-inline:4.6.1'
testImplementation 'org.robolectric:robolectric:4.5.1'
testImplementation 'com.github.blocoio:faker:1.2.8'
testImplementation 'org.ooni:oonimkall:2023.07.18-162729'
testAnnotationProcessor 'com.google.dagger:dagger-compiler:2.36'

// Instrumentation Testing
androidTestImplementation 'tools.fastlane:screengrab:2.0.0'
androidTestImplementation 'com.github.blocoio:faker:1.2.8'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
androidTestImplementation('androidx.test.espresso:espresso-contrib:3.4.0') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
androidTestImplementation('androidx.test.espresso:espresso-core:3.4.0') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
androidTestImplementation('com.schibsted.spain:barista:3.9.0')
androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:2.36"
// Unit Testing
testImplementation libs.junit4
testImplementation libs.androidx.core
testImplementation libs.androidx.runner
testImplementation libs.androidx.rules
testImplementation libs.mockito.core
testImplementation libs.mockito.inline
testImplementation libs.robolectric
testImplementation libs.faker
testImplementation libs.ooni.oonimkall
testAnnotationProcessor libs.google.dagger.compiler

// Instrumentation Testing
androidTestImplementation libs.fastlane.screengrab
androidTestImplementation libs.faker
androidTestImplementation libs.androidx.runner
androidTestImplementation libs.androidx.rules
androidTestImplementation libs.androidx.junit
androidTestImplementation libs.androidx.espresso.intents
androidTestImplementation libs.androidx.espresso.contrib
androidTestImplementation libs.androidx.espresso.core
androidTestImplementation libs.barista
androidTestAnnotationProcessor libs.google.dagger.compiler
}

static def versionCodeDate() {
Expand Down
2 changes: 1 addition & 1 deletion app/jacoco.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'jacoco'

jacoco {
toolVersion '0.8.5'
toolVersion libs.versions.jacoco.get().toString()
}

task jacocoAndroidTestReport(type: JacocoReport) {
Expand Down
8 changes: 4 additions & 4 deletions applogger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {
}

android {
compileSdk 31
compileSdk libs.versions.compileSdk.get().toInteger()

defaultConfig {
minSdk 16
targetSdk 31
minSdk libs.versions.minSdk.get().toInteger()
targetSdk libs.versions.targetSdk.get().toInteger()

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -32,5 +32,5 @@ android {
}

dependencies {
testImplementation 'junit:junit:+'
testImplementation libs.junit4
}
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ buildscript {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
classpath 'com.google.gms:google-services:4.3.13'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
classpath libs.android.gradlePlugin
classpath libs.gms.googleServices
classpath libs.kotlin.gradlePlugin
}
}

Expand Down
15 changes: 8 additions & 7 deletions engine/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdk libs.versions.compileSdk.get().toInteger()

defaultConfig {
minSdkVersion 19
targetSdkVersion 30
minSdk libs.versions.minSdk.get().toInteger()
targetSdk libs.versions.targetSdk.get().toInteger()
}

compileOptions {
Expand All @@ -32,8 +33,8 @@ android {
dependencies {
// For the stable and dev app flavours we're using the library
// build published at Maven Central.
stableImplementation 'org.ooni:oonimkall:2023.07.18-162729'
devImplementation 'org.ooni:oonimkall:2023.07.18-162729'
stableImplementation libs.ooni.oonimkall
devImplementation libs.ooni.oonimkall

// For the experimental flavour, you need to compile your own
// oonimkall.aar and put it into the ../engine-experimental dir
Expand Down
117 changes: 117 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
[versions]
androidGradlePlugin = "7.4.1"
barista = "3.9.0"
countlySdk = "21.11.0"
faker = "1.2.8"
mockitoCore = "4.6.1"
robolectric = "4.5.1"
fastlaneScreengrab = "2.0.0"
sentryAndroid = "6.3.0"
xanscaleLocalhostToolkit = "19.05.01"
commonsIo = "2.6"
jacoco = "0.8.5"
kotlin = "1.6.21"

# Android X
androidxCore = "1.4.0"
androidxAppCompat = "1.6.1"
androidxConstraintlayout = "2.1.4"
androidxLifecycleProcess = "2.5.1"
androidxPreference = "1.2.0"
androidxLocalbroadcastmanager = "1.1.0"
androidxLegacySupportV4 = "1.0.0"
androidxJunit = "1.1.3"
androidxEspressoCore = "3.4.0"

# Google
googleGson = "2.8.9"
googleGuava = "30.1.1-android"
googleMaterial = "1.6.1"
googleDagger = "2.36"
googleFirebaseBon = "26.3.0"
googlePlaycore = "1.10.3"

# OONI
compileSdk = "34"
lottie = "3.0.7"
markwon = "2.0.1"
shapeofview = "1.3.2"
targetSdk = "34"
minSdk = "21"
oonimkall = "2023.07.18-162729"

junit = "4.13.2"
dbflow = "4.2.4"
retrofitCore = "2.9.0"
retrofitLoggingInterceptor = "4.9.1"
butterknifeCore = "10.2.3"

# Firebase Services
# https://firebase.google.com/support/release-notes/android
gms-googleServices = "4.3.15"

[libraries]
# Dependencies of the included build-logic
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
barista = { module = "com.schibsted.spain:barista", version.ref = "barista" }
countly-sdk = { module = "ly.count.android:sdk", version.ref = "countlySdk" }
faker = { module = "com.github.blocoio:faker", version.ref = "faker" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
fastlane-screengrab = { module = "tools.fastlane:screengrab", version.ref = "fastlaneScreengrab" }
sentry-android = { module = "io.sentry:sentry-android", version.ref = "sentryAndroid" }
xanscale-localhost-toolkit = { module = "com.github.xanscale.LocalhostToolkit:app", version.ref = "xanscaleLocalhostToolkit" }
commons-io = { module = "commons-io:commons-io", version.ref = "commonsIo" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }

mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" }
mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockitoCore" }

butterknife-core = { module = "com.jakewharton:butterknife", version.ref = "butterknifeCore" }
butterknife-compiler = { module = "com.jakewharton:butterknife-compiler", version.ref = "butterknifeCore" }

lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" }
markwon = { module = "ru.noties:markwon", version.ref = "markwon" }
retrofit-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofitCore" }
retrofit-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "retrofitLoggingInterceptor" }
retrofit-lib = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofitCore" }

dbflow-lib = { module = "com.github.Raizlabs.DBFlow:dbflow", version.ref = "dbflow" }
dbflow-core = { module = "com.github.Raizlabs.DBFlow:dbflow-core", version.ref = "dbflow" }
dbflow-processor = { module = "com.github.Raizlabs.DBFlow:dbflow-processor", version.ref = "dbflow" }

androidx-core = { module = "androidx.test:core", version.ref = "androidxCore" }
androidx-rules = { module = "androidx.test:rules", version.ref = "androidxCore" }
androidx-runner = { module = "androidx.test:runner", version.ref = "androidxCore" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppCompat" }
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidxConstraintlayout" }
androidx-legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidxLegacySupportV4" }
androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "androidxLifecycleProcess" }
androidx-localbroadcastmanager = { module = "androidx.localbroadcastmanager:localbroadcastmanager", version.ref = "androidxLocalbroadcastmanager" }
androidx-preference = { module = "androidx.preference:preference", version.ref = "androidxPreference" }
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "androidxJunit" }
androidx-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidxEspressoCore" }
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidxEspressoCore" }
androidx-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidxEspressoCore" }

google-play-core = { module = "com.google.android.play:core", version.ref = "googlePlaycore" }
google-gson = { module = "com.google.code.gson:gson", version.ref = "googleGson" }
google-guava = { module = "com.google.guava:guava", version.ref = "googleGuava" }
google-material = { module = "com.google.android.material:material", version.ref = "googleMaterial" }
google-dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "googleDagger" }
google-dagger = { module = "com.google.dagger:dagger", version.ref = "googleDagger" }
google-firebase-messaging = { module = "com.google.firebase:firebase-messaging"}
google-firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "googleFirebaseBon" }

junit4 = { module = "junit:junit", version.ref = "junit" }
gms-googleServices = { module = "com.google.gms:google-services", version.ref = "gms-googleServices" }
ooni-oonimkall = { module = "org.ooni:oonimkall", version.ref = "oonimkall" }
shapeofview = { module = "com.github.florent37:shapeofview", version.ref = "shapeofview" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }

kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }

gms-googleServices = { id = "com.google.gms.google-services", version.ref = "gms-googleServices"}

0 comments on commit 6aa9fb2

Please sign in to comment.