Skip to content

Commit

Permalink
Update dependencies and perform a little cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
abelgardep committed Oct 13, 2020
1 parent 1d25f64 commit fc50541
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 97 deletions.
31 changes: 11 additions & 20 deletions build.gradle
Expand Up @@ -8,25 +8,24 @@ buildscript {
// Android jetpack
archLifecycleVersion = "2.1.0"
roomVersion = "2.2.5"
appCompat = "1.1.0"
appCompat = "1.2.0"
sqliteVersion = "2.1.0"
lifecycleLiveData = "2.2.0"
biometricVersion="1.0.1"

// Kotlin
kotlinVersion = "1.3.72"
coroutinesVersion = "1.3.2"
kotlinVersion = "1.4.10"
coroutinesVersion = "1.3.5"

// Koin
koinVersion = "2.0.1"
mockkVersion = "1.9.3"
koinVersion = "2.1.5"
mockkVersion = '1.10.2'

// Testing
junitVersion = "4.12"
extJunitVersion = "1.1.1"
androidTestVersion = "1.2.0"
mockitoVersion = "2.24.0"
espressoTestVersion = "3.2.0"
junitVersion = "4.13"
extJunitVersion = '1.1.2'
androidTestVersion = '1.3.0'
espressoTestVersion = '3.3.0'
fragmentTestVersion = "1.1.0"
uiAutomatorTestVersion = "2.2.0"
annotationTestVersion = "1.1.0"
Expand All @@ -35,9 +34,9 @@ buildscript {
ktxVersion = "1.1.0"

// KTX extensions
ktxCoreVersion = "1.3.0"
ktxCoreVersion = "1.3.1"
ktxViewModelVersion = "2.2.0"
ktxFragmentVersion = "1.2.4"
ktxFragmentVersion = "1.2.5"
ktxLiveData = "2.1.0"
}

Expand All @@ -49,7 +48,6 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
}

Expand All @@ -66,10 +64,3 @@ allprojects {
}
}
}

tasks.withType(Test) {
/// increased logging for tests
testLogging {
events "passed", "skipped", "failed"
}
}
29 changes: 5 additions & 24 deletions owncloudApp/build.gradle
@@ -1,7 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-allopen'
apply plugin: 'kotlin-android-extensions'

def commitSHA1 = 'COMMIT_SHA1'
Expand All @@ -15,15 +14,15 @@ dependencies {
// Dependencies for app building
implementation "androidx.legacy:legacy-support-v4:$androidX"
implementation "androidx.annotation:annotation:1.1.0"
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation 'com.google.android.exoplayer:exoplayer:r2.2.0'
implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'
implementation "androidx.appcompat:appcompat:$appCompat"
implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation "androidx.browser:browser:1.2.0"
implementation 'commons-io:commons-io:2.6'
implementation 'commons-io:commons-io:2.7'
implementation "androidx.sqlite:sqlite:$sqliteVersion"
implementation "androidx.biometric:biometric:$biometricVersion"

Expand Down Expand Up @@ -53,15 +52,15 @@ dependencies {
exclude module: 'objenesis'
}
androidTestImplementation 'com.github.tmurakami:dexopener:2.0.4'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:runner:1.3.0'

// Image loading
implementation('com.github.bumptech.glide:glide:4.6.1') {
exclude group: "com.android.support"
}

//Zooming Android ImageView.
implementation 'com.github.chrisbanes:PhotoView:2.1.4'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'

implementation "androidx.multidex:multidex:2.0.1"

Expand All @@ -86,18 +85,6 @@ dependencies {
implementation "androidx.fragment:fragment-ktx:$ktxFragmentVersion"
}

tasks.withType(Test) {
/// increased logging for tests
testLogging {
events "passed", "skipped", "failed"
}
}

allOpen {
// allows mocking for classes w/o directly opening them for release builds
annotation 'com.owncloud.android.testing.OpenClass'
}

android {
compileSdkVersion sdkCompileVersion

Expand All @@ -115,12 +102,6 @@ android {

multiDexEnabled true

javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}

manifestPlaceholders = [appAuthRedirectScheme: 'oc']
}

Expand Down

This file was deleted.

20 changes: 2 additions & 18 deletions owncloudData/build.gradle
@@ -1,21 +1,13 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-allopen'

allOpen {
// allows mocking for classes w/o directly opening them for release builds
annotation 'com.owncloud.android.testing.OpenClass'
}

android {
compileSdkVersion sdkCompileVersion

defaultConfig {
minSdkVersion sdkMinVersion
targetSdkVersion sdkTargetVersion
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -54,8 +46,6 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':owncloudDomain')
testImplementation project(':owncloudTestUtil')
androidTestImplementation project(':owncloudTestUtil')

// Owncloud Android Library
api project(':owncloud-android-library:owncloudComLibrary')
Expand All @@ -68,11 +58,13 @@ dependencies {
kapt "androidx.room:room-compiler:$roomVersion"

// Dependencies for unit tests
testImplementation project(':owncloudTestUtil')
testImplementation "junit:junit:$junitVersion"
testImplementation "androidx.arch.core:core-testing:$archLifecycleVersion"
testImplementation "io.mockk:mockk:$mockkVersion"

// Dependencies for instrumented tests
androidTestImplementation project(':owncloudTestUtil')
androidTestImplementation "androidx.test:runner:$androidTestVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoTestVersion"
androidTestImplementation "androidx.test.ext:junit:$extJunitVersion"
Expand All @@ -82,11 +74,3 @@ dependencies {
exclude module: 'objenesis'
}
}

configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.arch.core' && !details.requested.name.contains('core-runtime')) {
details.useVersion "2.0.1"
}
}
}
35 changes: 1 addition & 34 deletions owncloudDomain/build.gradle
Expand Up @@ -2,24 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-allopen'

allOpen {
// allows mocking for classes w/o directly opening them for release builds
annotation 'com.owncloud.android.testing.OpenClass'
}

android {
compileSdkVersion sdkCompileVersion

defaultConfig {
minSdkVersion sdkMinVersion
targetSdkVersion sdkTargetVersion
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}

buildTypes {
Expand All @@ -35,43 +24,21 @@ android {
}

sourceSets {
androidTest.java.srcDirs += "src/test-common/java"
test.java.srcDirs += "src/test-common/java"
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation project(':owncloudTestUtil')

implementation "androidx.appcompat:appcompat:$appCompat"

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"

// Dependencies for unit tests
testImplementation project(':owncloudTestUtil')
testImplementation "junit:junit:$junitVersion"
testImplementation "androidx.arch.core:core-testing:$archLifecycleVersion"
testImplementation "io.mockk:mockk:$mockkVersion"

// Dependencies for instrumented tests
androidTestImplementation "androidx.arch.core:core-testing:$archLifecycleVersion"
androidTestImplementation "androidx.test:runner:$androidTestVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoTestVersion"
androidTestImplementation ("io.mockk:mockk-android:$mockkVersion") {
exclude module: 'objenesis'
}
}

allOpen {
// allows mocking for classes w/o directly opening them for release builds
annotation 'com.owncloud.android.testing.OpenClass'
}

configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.arch.core' && !details.requested.name.contains('core-runtime')) {
details.useVersion "2.0.0"
}
}
}
2 changes: 2 additions & 0 deletions owncloudTestUtil/build.gradle
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion sdkCompileVersion

Expand All @@ -20,6 +21,7 @@ android {
dependencies {
implementation project(':owncloudDomain')
implementation project(':owncloud-android-library:owncloudComLibrary')

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycleLiveData"
}

0 comments on commit fc50541

Please sign in to comment.