Skip to content

Commit

Permalink
Move dependency list to a single gradle file for easier maintenance. #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor Keszthelyi authored and dmfs committed Sep 24, 2018
1 parent 197db7a commit 9acfa20
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 50 deletions.
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ allprojects {
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
apply from: "dependencies.gradle"
38 changes: 38 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
def support_lib_version = '25.4.0'
def jems_version = '1.15'
def contentpal_version = '9b087b2' // 9b087b2 -> 2017-12-12
def support_test_runner_version = '0.5'

ext.deps = [
// Support & Google libraries
support_appcompat : "com.android.support:appcompat-v7:$support_lib_version",
support_annotations: "com.android.support:support-annotations:$support_lib_version",
support_design : "com.android.support:design:$support_lib_version",
android_dashclock : 'com.google.android.apps.dashclock:dashclock-api:2.0.0',

// dmfs
jems : "org.dmfs:jems:$jems_version",
datetime : 'org.dmfs:rfc5545-datetime:0.2.4',
lib_recur : 'org.dmfs:lib-recur:0.10.1',
xml_magic : 'org.dmfs:android-xml-magic:0.1.1',
color_picker : 'com.github.dmfs.color-picker:colorpicker-activity:1.1',
android_carrot : 'com.github.dmfs.androidcarrot:androidcarrot:13edc04',
bolts_color : 'com.github.dmfs.bolts:color-bolts:27f34f7', // 27f34f7 -> 2017-12-04
contentpal : "com.github.dmfs.contentpal:contentpal:$contentpal_version",

// 3rd party
codeka_carrot : 'au.com.codeka:carrot:2.4.0',

// Testing
junit : 'junit:junit:4.12',
hamcrest : 'org.hamcrest:hamcrest-all:1.3',
mockito : 'org.mockito:mockito-core:2.10.0',
robolectric : 'org.robolectric:robolectric:3.5.1',
support_test_runner: "com.android.support.test:runner:$support_test_runner_version",
support_test_rules : "com.android.support.test:rules:$support_test_runner_version",

// dmfs testing
jems_testing : "org.dmfs:jems-testing:$jems_version",
contenttestpal : "com.github.dmfs.contentpal:contenttestpal:$contentpal_version",
contentpal_testing : "com.github.dmfs.contentpal:contentpal-testing:$contentpal_version"
]
13 changes: 1 addition & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
COMPILE_SDK_VERSION=25
BUILD_TOOLS_VERSION=27.0.1
MIN_SDK_VERSION=15
TARGET_SDK_VERSION=25
# dependency versions
SUPPORT_LIBRARY_VERSION=25.4.0
# contentpal 9b087b2 -> 2017-12-12
CONTENTPAL_VERSION=9b087b2
ROBOLECTRIC_VERSION=3.1.4
JEMS_VERSION=1.15
LIB_RECUR_VERSION=0.10.1
ANDROID_TEST_RUNNER_VERSION=0.5
RFC5545_DATETIME_VERSION=0.2.4
# bolts 27f34f7 -> 2017-12-04
BOLTS_VERSION=27f34f7
TARGET_SDK_VERSION=25
25 changes: 13 additions & 12 deletions opentasks-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,21 @@ android {
dependencies {
api project(':opentasks-contract')

implementation 'org.dmfs:rfc5545-datetime:' + RFC5545_DATETIME_VERSION
implementation 'org.dmfs:lib-recur:' + LIB_RECUR_VERSION
implementation 'org.dmfs:jems:' + JEMS_VERSION
implementation deps.datetime
implementation deps.lib_recur
implementation deps.jems

testImplementation deps.robolectric
testImplementation deps.junit
testImplementation deps.mockito
testImplementation deps.jems_testing
testImplementation deps.hamcrest

androidTestImplementation project(':opentaskspal')
androidTestImplementation('com.github.dmfs.contentpal:contenttestpal:' + CONTENTPAL_VERSION) {
androidTestImplementation(deps.contenttestpal) {
exclude module: 'jems'
}
androidTestImplementation 'com.android.support:support-annotations:' + SUPPORT_LIBRARY_VERSION
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test:rules:0.5'
testImplementation 'org.robolectric:robolectric:' + ROBOLECTRIC_VERSION
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.10.0'
testImplementation 'org.dmfs:jems-testing:' + JEMS_VERSION
testImplementation 'org.hamcrest:hamcrest-all:1.3'
androidTestImplementation deps.support_annotations
androidTestImplementation deps.support_test_runner
androidTestImplementation deps.support_test_rules
}
28 changes: 14 additions & 14 deletions opentasks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,34 @@ android {

dependencies {
implementation project(':opentasks-provider')
implementation 'com.android.support:appcompat-v7:' + SUPPORT_LIBRARY_VERSION
implementation 'com.android.support:design:' + SUPPORT_LIBRARY_VERSION
implementation('org.dmfs:android-xml-magic:0.1.1') {
implementation deps.support_appcompat
implementation deps.support_design
implementation(deps.xml_magic) {
// xmlpull is part of the runtime, so don't pull it in here
exclude group: 'xmlpull', module: 'xmlpull'
}
implementation 'com.google.android.apps.dashclock:dashclock-api:2.0.0'
implementation 'com.github.dmfs.color-picker:colorpicker-activity:1.1'
implementation('au.com.codeka:carrot:2.4.0') {
implementation deps.android_dashclock
implementation deps.color_picker
implementation(deps.codeka_carrot) {
exclude module: 'iterators' // TODO Remove when iterators have been removed from codeka:carrot
}
implementation('com.github.dmfs.androidcarrot:androidcarrot:13edc04') {
implementation(deps.android_carrot) {
exclude module: 'carrot'
exclude group: 'com.android.support'
exclude module: 'iterators'
exclude module: 'jems'
}
implementation 'org.dmfs:jems:' + JEMS_VERSION
implementation 'org.dmfs:rfc5545-datetime:' + RFC5545_DATETIME_VERSION
implementation 'com.github.dmfs.bolts:color-bolts:' + BOLTS_VERSION
implementation deps.jems
implementation deps.datetime
implementation deps.bolts_color

testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.5.1'
testImplementation deps.junit
testImplementation deps.robolectric

androidTestImplementation('com.android.support.test:runner:' + ANDROID_TEST_RUNNER_VERSION) {
androidTestImplementation(deps.support_test_runner) {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation('com.android.support.test:rules:' + ANDROID_TEST_RUNNER_VERSION) {
androidTestImplementation(deps.support_test_rules) {
exclude group: 'com.android.support', module: 'support-annotations'
}
}
18 changes: 9 additions & 9 deletions opentaskspal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ android {

dependencies {
implementation project(':opentasks-contract')
implementation('com.github.dmfs.contentpal:contentpal:' + CONTENTPAL_VERSION) {
implementation(deps.contentpal) {
exclude module: 'jems'
}
implementation 'org.dmfs:rfc5545-datetime:' + RFC5545_DATETIME_VERSION
implementation 'org.dmfs:lib-recur:' + LIB_RECUR_VERSION
implementation 'org.dmfs:jems:' + JEMS_VERSION
implementation 'com.github.dmfs.bolts:color-bolts:' + BOLTS_VERSION
implementation deps.datetime
implementation deps.lib_recur
implementation deps.jems
implementation deps.bolts_color

testImplementation('com.github.dmfs.contentpal:contentpal-testing:' + CONTENTPAL_VERSION) {
testImplementation(deps.contentpal_testing) {
exclude module: 'jems'
}
testImplementation 'org.robolectric:robolectric:' + ROBOLECTRIC_VERSION
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.10.0'
testImplementation deps.robolectric
testImplementation deps.junit
testImplementation deps.mockito
}

0 comments on commit 9acfa20

Please sign in to comment.