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

Dependencies management by buildSrc and kotlin #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ android {
}

dependencies {
implementation project(":library-Timber")
implementation project(":library-ThreeTenABP")
implementation Deps.timber
implementation Deps.threeTenABP
implementation Deps.threeTenBP

implementation project(":core-domain")
implementation project(":core-infra")
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}
// Required since Gradle 4.10+.
repositories {
jcenter()
}
20 changes: 20 additions & 0 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
object Deps {
object Versions {

}

val androidxActivity = "androidx.activity:activity:1.0.0-alpha05"
val androidxAppCompat = "androidx.appcompat:appcompat:1.1.0-alpha03"
val androidxConstraintLayout = "androidx.constraintlayout:constraintlayout:1.1.3"
val androidxRecyclerView = "androidx.recyclerview:recyclerview:1.1.0-alpha03"

val lifecycleDisposable = "com.github.wada811.LifecycleDisposable:lifecycledisposable:1.0.0"
val rxAndroid = "io.reactivex.rxjava2:rxandroid:2.1.1"
val rxKotlin = "io.reactivex.rxjava2:rxkotlin:2.3.0"
val rxJava = "io.reactivex.rxjava2:rxjava:2.2.6"

val threeTenABP = "com.jakewharton.threetenabp:threetenabp:1.2.0"
val threeTenBP = "org.threeten:threetenbp:1.3.8:no-tzdb"

val timber = "com.jakewharton.timber:timber:4.7.1"
}
4 changes: 2 additions & 2 deletions core-binding/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ apply from: "$rootDir/android-library.gradle"
apply from: "$rootDir/android-databinding.gradle"

dependencies {
implementation project(":library-AndroidX-AppCompat")
implementation project(":library-Timber")
implementation Deps.androidxAppCompat
implementation Deps.timber
}
4 changes: 2 additions & 2 deletions core-domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apply plugin: 'com.android.library'
apply from: "$rootDir/android-library.gradle"

dependencies {
implementation project(":library-Timber")
implementation project(":library-ThreeTenBP")
implementation Deps.timber
implementation Deps.threeTenBP
}
7 changes: 4 additions & 3 deletions core-infra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ apply plugin: 'kotlin-kapt'
dependencies {
implementation project(":core-domain")

implementation project(":library-Timber")
implementation project(":library-ThreeTenBP")
implementation project(":library-RxJava")
implementation Deps.timber
implementation Deps.threeTenBP
implementation Deps.rxKotlin
implementation Deps.rxJava

implementation 'com.squareup.okhttp3:okhttp:3.14.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.0'
Expand Down
5 changes: 3 additions & 2 deletions core-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ apply plugin: 'com.android.library'
apply from: "$rootDir/android-library.gradle"

dependencies {
implementation project(":library-Timber")
implementation project(":library-RxJava")
implementation Deps.timber
implementation Deps.rxKotlin
implementation Deps.rxJava

implementation project(":core-domain")
implementation project(":core-infra")
Expand Down
15 changes: 8 additions & 7 deletions feature-StoryCore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ android {
}

dependencies {
implementation project(":library-AndroidX-Activity")
implementation project(":library-AndroidX-AppCompat")
implementation project(":library-AndroidX-ConstraintLayout")
implementation project(":library-AndroidX-RecyclerView")
implementation Deps.androidxActivity
implementation Deps.androidxAppCompat
implementation Deps.androidxConstraintLayout
implementation Deps.androidxRecyclerView

implementation project(":library-Timber")
implementation Deps.timber
// Rx
implementation project(":library-RxAndroid")
implementation project(":library-RxJava")
implementation Deps.rxAndroid
implementation Deps.rxKotlin
implementation Deps.rxJava

implementation project(":core-domain")
implementation project(":core-infra")
Expand Down
17 changes: 9 additions & 8 deletions feature-StoryDetail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ android {
}

dependencies {
implementation project(":library-AndroidX-Activity")
implementation project(":library-AndroidX-AppCompat")
implementation project(":library-AndroidX-ConstraintLayout")
implementation project(":library-AndroidX-RecyclerView")
implementation Deps.androidxActivity
implementation Deps.androidxAppCompat
implementation Deps.androidxConstraintLayout
implementation Deps.androidxRecyclerView

implementation project(":library-Timber")
implementation Deps.timber
// Rx
implementation project(":library-RxAndroid")
implementation project(":library-RxJava")
implementation project(":library-LifecycleDisposable")
implementation Deps.lifecycleDisposable
implementation Deps.rxAndroid
implementation Deps.rxKotlin
implementation Deps.rxJava

implementation project(":core-domain")
implementation project(":core-infra")
Expand Down
19 changes: 10 additions & 9 deletions feature-StoryList/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ android {
}

dependencies {
implementation project(":library-AndroidX-Activity")
implementation project(":library-AndroidX-AppCompat")
implementation project(":library-AndroidX-ConstraintLayout")
implementation project(":library-AndroidX-RecyclerView")
implementation Deps.androidxActivity
implementation Deps.androidxAppCompat
implementation Deps.androidxConstraintLayout
implementation Deps.androidxRecyclerView

implementation project(":library-Timber")
implementation project(":library-ThreeTenBP")
implementation Deps.timber
implementation Deps.threeTenBP
// Rx
implementation project(":library-RxAndroid")
implementation project(":library-RxJava")
implementation project(":library-LifecycleDisposable")
implementation Deps.lifecycleDisposable
implementation Deps.rxAndroid
implementation Deps.rxKotlin
implementation Deps.rxJava

implementation project(":core-domain")
implementation project(":core-infra")
Expand Down
2 changes: 1 addition & 1 deletion library-ThreeTenBP/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ repositories {
}

dependencies {
api group: 'org.threeten', name: 'threetenbp', version: '1.3.8', classifier: 'no-tzdb'
api 'org.threeten:threetenbp:1.3.8:no-tzdb'
}
20 changes: 10 additions & 10 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ include ':core-service'
include ':feature-StoryCore'
include ':feature-StoryList'
include ':feature-StoryDetail'
include ':library-AndroidX-Activity'
include ':library-AndroidX-AppCompat'
include ':library-AndroidX-ConstraintLayout'
include ':library-AndroidX-RecyclerView'
include ':library-LifecycleDisposable'
include ':library-RxAndroid'
include ':library-RxJava'
include ':library-ThreeTenABP'
include ':library-ThreeTenBP'
include ':library-Timber'
//include ':library-AndroidX-Activity'
//include ':library-AndroidX-AppCompat'
//include ':library-AndroidX-ConstraintLayout'
//include ':library-AndroidX-RecyclerView'
//include ':library-LifecycleDisposable'
//include ':library-RxAndroid'
//include ':library-RxJava'
//include ':library-ThreeTenABP'
//include ':library-ThreeTenBP'
//include ':library-Timber'