Skip to content

Commit

Permalink
Merge pull request #2 from ivanalvarado/version-catalogs
Browse files Browse the repository at this point in the history
Migrate to Version Catalogs
  • Loading branch information
ivanalvarado authored Oct 26, 2024
2 parents 80aefa2 + a83a59b commit 3fcb847
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 60 deletions.
99 changes: 39 additions & 60 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,9 @@ android {
}
}

ext {
androidSupportVersion = '28.0.0'
constraintLayoutVersion = '1.1.3'
cardViewVersion = '28.0.0'
daggerVersion = '2.24'
daggerAndroidVersion = '2.23'
daggerAssistedInjectVersion = '0.5.0'
epoxyVersion = '3.8.0'
espressoVersion = '3.0.2'
jUnitVersion = '4.12'
lifecycleVersion = '2.1.0'
lottieVersion = '3.2.2'
mockitoVersion = '3.1.0'
mvrxVersion = '1.3.0'
okHttpVersion = '4.2.1'
picassoVersion = '2.71828'
retrofitVersion = '2.6.1'
roomVersion = '2.2.3'
rxBindingVersion = '3.0.0'
rxJavaVersion = '2.2.12'
rxKotlin = '2.4.0'
}

repositories {
mavenCentral()
google()
jcenter()
}

Expand All @@ -61,74 +40,74 @@ kapt {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation libs.appcompat
implementation libs.core.ktx
implementation libs.constraintlayout
testImplementation libs.junit
androidTestImplementation libs.runner
androidTestImplementation libs.espresso.core

// CardView
implementation "com.android.support:cardview-v7:$cardViewVersion"
implementation libs.cardview

// Dagger - https://github.com/google/dagger
implementation "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
implementation libs.dagger
kapt libs.dagger.compiler

// Dagger Android - https://developer.android.com/training/dependency-injection/dagger-android
implementation "com.google.dagger:dagger-android:$daggerAndroidVersion"
implementation "com.google.dagger:dagger-android-support:$daggerAndroidVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerAndroidVersion"
implementation libs.dagger.android
implementation libs.dagger.android.support
kapt libs.dagger.android.processor

// Dagger AssistedInject - https://github.com/square/AssistedInject
compileOnly "com.squareup.inject:assisted-inject-annotations-dagger2:$daggerAssistedInjectVersion"
kapt "com.squareup.inject:assisted-inject-processor-dagger2:$daggerAssistedInjectVersion"
compileOnly libs.assisted.inject.annotations.dagger2
kapt libs.assisted.inject.processor.dagger2

// Epoxy - https://github.com/airbnb/epoxy
implementation "com.airbnb.android:epoxy:$epoxyVersion"
kapt "com.airbnb.android:epoxy-processor:$epoxyVersion"
implementation libs.airbnb.epoxy
kapt libs.airbnb.epoxy.processor

// Lottie - https://airbnb.io/lottie/#/README
implementation "com.airbnb.android:lottie:$lottieVersion"
implementation libs.airbnb.lottie

// Mockito
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation libs.mockito.core

// MockWebServer
testImplementation "com.squareup.okhttp3:mockwebserver:$okHttpVersion"
testImplementation libs.okhttp3.mockwebserver

// MvRx
implementation "com.airbnb.android:mvrx:$mvrxVersion"
implementation libs.airbnb.mvrx

// OkHttp - https://square.github.io/okhttp/
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
implementation 'org.conscrypt:conscrypt-android:2.2.1'
implementation libs.okhttp3.okhttp
implementation libs.okhttp3.logging.interceptor
implementation libs.conscrypt.android

// Picasso - https://square.github.io/picasso/
implementation "com.squareup.picasso:picasso:$picassoVersion"
implementation libs.picasso

// Retrofit - https://square.github.io/retrofit/
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation libs.retrofit
implementation libs.retrofit.adapter.rxjava2
implementation libs.retrofit.converter.gson

// Room - https://developer.android.com/training/data-storage/room/index.html
implementation "androidx.room:room-runtime:$roomVersion"
implementation "androidx.room:room-rxjava2:$roomVersion"
kapt "androidx.room:room-compiler:$roomVersion"
implementation libs.androidx.room.runtime
implementation libs.androidx.room.rxjava2
kapt libs.androidx.room.compiler

// RxBinding - https://github.com/JakeWharton/RxBinding
implementation "com.jakewharton.rxbinding3:rxbinding:$rxBindingVersion"
implementation "com.jakewharton.rxbinding3:rxbinding-core:$rxBindingVersion"
implementation "com.jakewharton.rxbinding3:rxbinding-appcompat:$rxBindingVersion"
implementation libs.rxbinding
implementation libs.rxbinding.appcompat
implementation libs.rxbinding.core

// RxJava - https://github.com/ReactiveX/RxJava
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation libs.rxjava

// RxKotlin - https://github.com/ReactiveX/RxKotlin
implementation "io.reactivex.rxjava2:rxkotlin:$rxKotlin"
implementation libs.rxkotlin

implementation "androidx.activity:activity-ktx:1.0.0-alpha06"
implementation "androidx.fragment:fragment-ktx:1.1.0-alpha06"
implementation libs.androidx.activity.ktx
implementation libs.androidx.fragment.ktx
}
64 changes: 64 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[versions]
airbnb-epoxy = "3.8.0"
airbnb-lottie = "3.2.2"
airbnb-mvrx = "1.3.0"
androidx-appcompat = "1.1.0"
androidx-core = "1.1.0"
androidx-constraintlayout = "1.1.3"
androidx-activity-ktx = "1.0.0-alpha06"
androidx-fragment-ktx = "1.0.0-alpha06"
junit = "4.12"
androidx-test-runner = "1.2.0"
androidx-test-espresso = "3.2.0"
cardview = "28.0.0"
conscrypt-android = "2.2.1"
dagger = "2.24"
dagger-android = "2.23"
dagger-assisted-inject = "0.5.0"
mockito-core = "3.1.0"
okhttp = "4.2.1"
picasso = "2.71828"
retrofit = "2.6.1"
room = "2.2.3"
rxbinding = "3.0.0"
rxjava = "2.2.12"
rxkotlin = "2.4.0"

[libraries]
airbnb-epoxy = { module = "com.airbnb.android:epoxy", version.ref = "airbnb-epoxy" }
airbnb-epoxy-processor = { module = "com.airbnb.android:epoxy-processor", version.ref = "airbnb-epoxy" }
airbnb-lottie = { module = "com.airbnb.android:lottie", version.ref = "airbnb-lottie" }
airbnb-mvrx = { module = "com.airbnb.android:mvrx", version.ref = "airbnb-mvrx" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-ktx" }
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment-ktx" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
androidx-room-rxjava2 = { module = "androidx.room:room-rxjava2", version.ref = "room" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core" }
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }
junit = { module = "junit:junit", version.ref = "junit" }
runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" }
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidx-test-espresso" }
cardview = { module = "com.android.support:cardview-v7", version.ref = "cardview" }
dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
dagger-android = { module = "com.google.dagger:dagger-android", version.ref = "dagger-android" }
dagger-android-support = { module = "com.google.dagger:dagger-android-support", version.ref = "dagger-android" }
dagger-android-processor = { module = "com.google.dagger:dagger-android-processor", version.ref = "dagger-android" }
assisted-inject-annotations-dagger2 = { module = "com.squareup.inject:assisted-inject-annotations-dagger2", version.ref = "dagger-assisted-inject" }
assisted-inject-processor-dagger2 = { module = "com.squareup.inject:assisted-inject-processor-dagger2", version.ref = "dagger-assisted-inject" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito-core" }
okhttp3-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
okhttp3-okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "conscrypt-android" }
picasso = { module = "com.square.picasso:picasso", version.ref = "picasso" }
rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "rxjava" }
rxkotlin = { module = "io.reactivex.rxjava2:rxkotlin", version.ref = "rxkotlin" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
retrofit-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
retrofit-adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "retrofit" }
rxbinding = { module = "com.jakewharton.rxbinding3:rxbinding", version.ref = "rxbinding" }
rxbinding-core = { module = "com.jakewharton.rxbinding3:rxbinding-core", version.ref = "rxbinding" }
rxbinding-appcompat = { module = "com.jakewharton.rxbinding3:rxbinding-appcompat", version.ref = "rxbinding" }

0 comments on commit 3fcb847

Please sign in to comment.