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

[New arch] Share modularization #2597

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5a73bd6
Split up code into different modules following a layers approach
davigonz Jul 3, 2019
6a30481
Put tests in corresponding layers
davigonz Jul 3, 2019
7920664
Start to use Mockk instead of Mockito since is better prepared to be …
davigonz Jul 3, 2019
2778d28
Fix tests using mockk instead of mockito, more prepared to work with …
davigonz Jul 4, 2019
f1f4a4d
Transform operations into usecases in domain model. Complete dependen…
davigonz Jul 8, 2019
c358d9a
Complete getPublicShares using different layers
davigonz Jul 11, 2019
123042c
Complete getPrivateShares using different layers and usecases
davigonz Jul 11, 2019
ef60e60
Handle private and public shares wit the same liveData
davigonz Jul 12, 2019
1750bd2
Public share creation using layers and usecases
davigonz Jul 12, 2019
14dde49
Public share edition and removal using layers and usecases
davigonz Jul 15, 2019
352dbc2
Capabilities along with layers and usecases
davigonz Jul 15, 2019
e0e253b
Solve conflicts with new_arch/shares branch and keep working on priva…
davigonz Jul 17, 2019
8ab60cf
Private share edition [WIP]
davigonz Jul 17, 2019
ce5d467
Check this commit
davigonz Jul 18, 2019
7ce59af
Use viewmodel from different fragments since there were many problems…
davigonz Jul 18, 2019
1d46b22
Observe capabilities from ShareActivity to avoid UI glitches when laa…
davigonz Jul 18, 2019
fd91717
Adapt private share edition
davigonz Jul 19, 2019
a13c8a4
Solve some rebase conflicts
davigonz Aug 28, 2019
281bcd3
Start to use Mockk instead of Mockito since is better prepared to be …
davigonz Aug 28, 2019
9594692
Keep removing SAML stuff
davigonz Aug 28, 2019
76a9857
A little more of cleanup
davigonz Aug 28, 2019
1832eec
Apply CR changes
davigonz Aug 29, 2019
eb52e76
Merge pull request #2647 from owncloud/cleanup/remove_saml
davigonz Sep 12, 2019
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
10 changes: 1 addition & 9 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ buildscript {
ext {
// Android jetpack
archLifecycleVersion = '2.0.0'
roomVersion = '2.0.0'
roomVersion = '2.1.0'

// Kotlin
kotlinVersion = '1.3.21'
kotlinVersion = '1.3.40'

// Koin
koinVersion = '2.0.1'
mockkVersion = '1.9.3'

// Testing
junitVersion = "4.12"
mockitoVersion = "2.24.0"

// Extensions
ktxVersion = "1.0.0"
// KTX extensions
ktxCoreVersion = "1.0.2"
ktxViewModelVersion = "2.2.0-alpha01"
}

repositories {
Expand All @@ -24,7 +26,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
Expand Down
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Thu Apr 25 08:58:52 CEST 2019
#Wed Aug 28 08:38:49 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionSha256Sum=53b71812f18cdb2777e9f1b2a0f2038683907c90bdc406bc64d8b400e1fb2c3b
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
2 changes: 1 addition & 1 deletion owncloud-android-library
Submodule owncloud-android-library updated 21 files
+1 −1 build.gradle
+0 −1 owncloudComLibrary/build.gradle
+0 −31 owncloudComLibrary/src/debug/java/com/owncloud/android/lib/testing/OpenForTesting.kt
+2 −2 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/DynamicSessionManager.java
+2 −13 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClient.java
+0 −110 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClientFactory.java
+2 −10 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClientManagerFactory.java
+1 −6 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/SingleSessionManager.java
+1 −6 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/accounts/AccountTypeUtils.java
+3 −24 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/accounts/AccountUtils.java
+0 −4 ...loudComLibrary/src/main/java/com/owncloud/android/lib/common/authentication/OwnCloudCredentialsFactory.java
+0 −70 ...loudComLibrary/src/main/java/com/owncloud/android/lib/common/authentication/OwnCloudSamlSsoCredentials.java
+0 −1 ...ibrary/src/main/java/com/owncloud/android/lib/common/authentication/oauth/OwnCloudOAuth2RequestBuilder.java
+1 −1 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/operations/RemoteOperation.java
+3 −12 owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/operations/RemoteOperationResult.java
+1 −6 owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/shares/GetRemoteShareesOperation.kt
+1 −1 owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/shares/GetRemoteSharesForFileOperation.kt
+0 −1 owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/shares/ShareType.kt
+0 −1 owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/shares/UpdateRemoteShareOperation.kt
+0 −2 owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/OwnCloudVersion.kt
+0 −31 owncloudComLibrary/src/release/java/com/owncloud/android/lib/testing/OpenForTesting.kt
42 changes: 26 additions & 16 deletions owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ def commitSHA1 = 'COMMIT_SHA1'
def gitRemote = 'GIT_REMOTE'

dependencies {
/// data and domain modules
implementation project(':owncloudDomain')
implementation project(':owncloudData')

/// dependencies for app building
implementation project(':owncloud-android-library:owncloudComLibrary')
implementation "androidx.legacy:legacy-support-v4:$androidX"
implementation "androidx.annotation:annotation:1.0.1"
implementation "androidx.annotation:annotation:1.1.0"
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation 'com.google.android.exoplayer:exoplayer:r2.2.0'
Expand All @@ -25,31 +28,31 @@ dependencies {
// Dependencies for unit tests
testImplementation "junit:junit:$junitVersion"
testImplementation "androidx.arch.core:core-testing:$archLifecycleVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "io.mockk:mockk:$mockkVersion"

// Dependencies for instrumented tests
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
// JUnit4 Rules
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
// Android JUnit Runner
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
// Espresso core
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// Espresso contrib
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
// Espresso intents
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
// Espresso web
androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0'
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
androidTestImplementation 'androidx.annotation:annotation:1.0.1'
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
androidTestImplementation "androidx.room:room-testing:$roomVersion"
androidTestImplementation "androidx.arch.core:core-testing:$archLifecycleVersion"
androidTestImplementation "org.mockito:mockito-android:$mockitoVersion"
androidTestImplementation "org.mockito:mockito-core:$mockitoVersion"
androidTestImplementation ("io.mockk:mockk-android:$mockkVersion") {
exclude module: 'objenesis'
}

// Image loading
implementation('com.github.bumptech.glide:glide:4.6.1') {
Expand Down Expand Up @@ -77,8 +80,15 @@ dependencies {
// Koin dependency injector
implementation "org.koin:koin-androidx-viewmodel:$koinVersion"

// Kotlin extensions
implementation "androidx.core:core-ktx:$ktxVersion"
// KTX extensions, see https://developer.android.com/kotlin/ktx.html
implementation "androidx.core:core-ktx:$ktxCoreVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$ktxViewModelVersion"

// Kotlin library to mock
testImplementation "io.mockk:mockk:$mockkVersion"
androidTestImplementation ("io.mockk:mockk-android:$mockkVersion") {
exclude module: 'objenesis'
}
}

tasks.withType(Test) {
Expand Down
Loading