Skip to content

Commit

Permalink
Merge submodule (#4183)
Browse files Browse the repository at this point in the history
* Bump gradle version to 7.3

* Bump robolectric from 4.5.1 to 4.7.3

Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.5.1 to 4.7.3.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.5.1...robolectric-4.7.3)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump moshiVersion from 1.12.0 to 1.13.0

Bumps `moshiVersion` from 1.12.0 to 1.13.0.

Updates `moshi-kotlin` from 1.12.0 to 1.13.0
- [Release notes](https://github.com/square/moshi/releases)
- [Changelog](https://github.com/square/moshi/blob/master/CHANGELOG.md)
- [Commits](square/moshi@moshi-parent-1.12.0...moshi-parent-1.13.0)

Updates `moshi-kotlin-codegen` from 1.12.0 to 1.13.0
- [Release notes](https://github.com/square/moshi/releases)
- [Changelog](https://github.com/square/moshi/blob/master/CHANGELOG.md)
- [Commits](square/moshi@moshi-parent-1.12.0...moshi-parent-1.13.0)

---
updated-dependencies:
- dependency-name: com.squareup.moshi:moshi-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.squareup.moshi:moshi-kotlin-codegen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Retrieve new capability to user's avatar.

* Ktlint fixes.

* Bump Gradle for Log4j

https://github.com/gradle/gradle/releases/tag/v7.3.3

* Bump kotlin version to 1.6.10

* Bump ktlint-gradle from 10.2.0 to 10.2.1

Bumps ktlint-gradle from 10.2.0 to 10.2.1.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix lint warnings

* Upgraded versionName and versionNumber

* Bump actions/checkout from 2 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* remove sample client

* add debug interceptor

* fix usage of debug interceptor

* apply code cleanup according to review

* add check_script

* add mit license header to where it was missing

* fix wrongly licensed source files

* Rename the script and function to clarify their purpose

* Bump stetho-okhttp3 from 1.5.1 to 1.6.0

Bumps [stetho-okhttp3](https://github.com/facebook/stetho) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/facebook/stetho/releases)
- [Changelog](https://github.com/facebook/stetho/blob/main/CHANGELOG.md)
- [Commits](facebook/stetho@v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: com.facebook.stetho:stetho-okhttp3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* init connectionvalidator

* debug and add mutex for halding requiests

* remove retrive cookies from middleware

* remove OwnCloudClient factory

* prepare code for the inclusion of connection validator

* create logic scaffold for connection validator get status.php with it

* set max redirect count for owncloud client to 5

* try shifting over to connection validator for updating credentials

intermediate commit

* make initial connection using connection validator work

* make oidc discovery work again

* stop validation process if failing

* make initial check with apm work though connection validator

* update session from APM while running the app

* add update authToken code to connectionValidator

* get access token to update through connection validator

update token

* clean up credentials stuff from owncloudclient

* remove redirect code from owncloudclient use okhttp instead

* update base url in active client after 301 redirect

reduce validation retry count

* remove debug statements

* fix spelling mistakes

* add GetBaseUrlRemoteOperation

* fix lint and compile issues

* apply changes according to review

* Bump target sdk to api 31

* Bump kotlin to 1.6.20

* rename verify_licnese_script to check_code_script

* get okhttp singleton removal changes to compile

* clean up http client

* apply required fixes

* remove redundant intercept of httpclient with httpmethod

* rebase okhttp_signleton fix on top of connection validator

fix token oauth token refresh error

pleasure the linter

* apply requested changes

* remove sample client yet again

* apply requested changes

* Reformat some code

* Bump robolectric from 4.7.3 to 4.8

Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.7.3 to 4.8.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.7.3...robolectric-4.8)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump robolectric from 4.8 to 4.8.1

Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.8 to 4.8.1.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.8...robolectric-4.8.1)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ktlint-gradle from 10.2.1 to 10.3.0

Bumps ktlint-gradle from 10.2.1 to 10.3.0.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump kotlin version to 1.6.21

* Updated versionCode and versionName

* Java 8 is by default

* Android Arctic Fox

* Fix unexpected end of stream when connecting with server

* Added a new property, so that, we can retrieve the shares within the propfind

* Retrieve the app providers from the capabilities

* Add a new remote operation to retrieve the url to open a file with ocis provider

* Add the open in web to the service facade

* Add a new capability to allow/disallow private links

* Set private link capability to unknown type when it is not retrieved

The CapabilityBooleanType.fromBooleanValue set it to FALSE when the capability is not retrieved. We don't want this for this case. Probably neither for the rest, but changing that now would need deeper testing

* Bump robolectric from 4.8.1 to 4.9

Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.8.1 to 4.9.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.8.1...robolectric-4.9)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add moshi classes for webfinger responses

* create scaffold for webfinger request operation

* Add webfinger service and update the remote operation

* Remove unused imports

* Reformat some webfinger classes

* Handle 425 TOO EARLY propfind responses

* Handle 425 when trying to open in web

* Migrate ReadRemoteFolderOperation to kotlin and add it to FileService

* Add owner field to remote file

* Apply CR suggestions

* Migrate CreateRemoteFolderOperation to kotlin

* Include createFolder as file service operation

* Apply code review suggestions

* Transform RemoteFile to kotlin and apply necessary changes

* Map size or length property depending on mimetype

* Apply CR changes

* Migrate DownloadRemoteFileOperation to kotlin

* Add download file to file service

* Create parent folder when downloading a file if possible

* Download file operation will return unit instead of Any

* Apply code review suggestions

* Replace kotlin android extensions with kotlin-parcelize

* Converting RemoveRemoteFileOperation from java to kotlin. Intermediate step to preserve git history.

* Converting RemoveRemoteFileOperation from java to kotlin. Final step.

* Add removeFile to FileService

* Apply code review suggestions

* Migrate MoveRemoteFileOperation to kotlin. First step to keep git history

* Migrate MoveRemoteFileOperation to kotlin. Second step to keep git history

* Add move operation to chunk service

* Add move operation to file service

* Make overwrite option disabled by default for move operations

* Migrate RenameRemoteFileOperation to kotlin. First step to keep git history

* Migrate RenameRemoteFileOperation to kotlin. Second step to keep git history

* Add rename file to FileService

* Remove nullability from a variable

* Apply code review suggestions

* Migrate CopyRemoteFileOperation to kotlin. First step to keep git history

* Migrate CopyRemoteFileOperation to kotlin. Second step to keep git history

* Refactor copy remote file operation. Make overwrite false as default to avoid some potential errors

* Add copy operation to the file service

* Migrate remote upload operation to kotlin

* Use extension to simplify a little bit the code

* Migrate remote chunk upload operation to kotlin

* Delete old java operations. Use the kotlin ones from now on

* Move content uri request body to a new file

* Migrate old request bodies from java to kotlin

* Make requireEtag nullable

* Pleasure the ktlint

* Add transfer listeners to content uri worker

* Return Unit when the upload operation succeeds

* Polish a little bit the code

* Fix an error after rebasing with latest version

* Migrate ReadRemoteFileOperation to kotlin. First step to keep git history

* Migrate ReadRemoteFileOperation to kotlin. Second step to keep git history

* Read remote file function added to the file service

* Retrieve Etag from successful upload

* Increased the chunk size to 10 MB

* Remove legacy owncloud version from the client.

* Remove legacy KEY_OC_VERSION constant

* Fix lint reports

* Do data field not mandatory on ocs response

* Bump several dependencies at the same time

* Bump gradle plugin to 7.3.1 and move package name fro manifest to gradle namespace

* Unsharing wont return anything anymore since result object was not used

* Bump robolectric from 4.9 to 4.9.1

Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.9 to 4.9.1.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.9...robolectric-4.9.1)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add several logs to try to debug potential errors related to oAuth

* Bump robolectric from 4.9.1 to 4.9.2

Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.9.1 to 4.9.2.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.9.1...robolectric-4.9.2)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Potential fix to oauth error after logging in for first time that makes user to reauthenticate

* Bump ktlint-gradle from 11.0.0 to 11.1.0

Bumps ktlint-gradle from 11.0.0 to 11.1.0.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump kotlin version to 1.8.10

* Bump com.android.tools.build:gradle from 7.4.1 to 7.4.2

Bumps com.android.tools.build:gradle from 7.4.1 to 7.4.2.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Show the url in the response http log too

* Save spaces-related capabilities in database

* Added trailing comma

* Create spaces fetch operation and spaces service

* Make quota attribute nullable. Its not mandatory

* Some type changes and renamings

* Fix parsing when space is disabled

* Support shares space

* Update permissions parsing to latest api changes

Supports api renaming from grantedTo to grantedToIdentities on v1.0.1
https://github.com/owncloud/libre-graph-api/releases/tag/v1.0.1

* Adapt the propfind to work with specific webdavurl from the space

* Fix remote path retrieval. Now it depends on webdav url to support spaces

* Allow support to read specific file from a space

* Added create folder operation support for specific space

* Support removal of files from specific space

* Add support for spaces web dav specific urls to the rename operation

* Allow downloads from specific WebDav urls

* Move network operation adapted to spaces

* Adapted copy operation for spaces

* Upload workers and network operations adapted to spaces

* Fix to KtLint report

* Allow retrieval of several instances from webfinger

* Rename WebFinger classes to make them consistent

* Rename files to be the same as the classes they contain

* Rename file to be the same as the class it contains

* Replace kapt with ksp

* Removing quotas from webdav properties in regular propfinds

* Bump target sdk to 33

* Remove permission parsing from spaces. Will be done via WebDav permissions

* Add accept language header to all requests

* Webfinger calls won't follow redirections. Only working with 2XX

* Fix WebfingerResponse tests

* Retrieve the list of available apps to open in web

* Move open in web operations to their proper location

* Pleasure the lint

* Open file in web with a specific app

* Bump org.robolectric:robolectric from 4.9.2 to 4.10

Bumps [org.robolectric:robolectric](https://github.com/robolectric/robolectric) from 4.9.2 to 4.10.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.9.2...robolectric-4.10)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Introduce new error message for ProtocolException

* Create network call to create file via app provider

* Removed publicUpload parameter from public shares creation and update requests

* Update minSdkVersion to 23 (Android 6)

* Remove unnecessary code after upgrading to min SDK 23

* Showing decision dialog when copying file conflict.

* Showing decision dialog when moving file conflict.
Solving errors when copying, replace and keep both.

* Solving CR changes.

* Added variable from local data source

* Removing extra path on check path existence.

* Solving bug when copyin or moving

* Solving bugs when getting file existence.

* Solving bugs when getting file existence in OC10

* New fix for snackbar when copy without server on

* Use new file location

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Abel García de Prada <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fernando Sanz <[email protected]>
Co-authored-by: Christian Schabesberger <[email protected]>
Co-authored-by: Jesús Recio <[email protected]>
Co-authored-by: Jesús Recio <[email protected]>
Co-authored-by: Juan Carlos Garrote <[email protected]>
Co-authored-by: agarcia <[email protected]>
Co-authored-by: Juan Carlos Garrote <[email protected]>
Co-authored-by: Manuel Plazas Palacio <[email protected]>
Co-authored-by: Manuel Plazas Palacio <[email protected]>
Co-authored-by: Aitorbp <[email protected]>
Co-authored-by: Aitorbp <[email protected]>
  • Loading branch information
14 people authored Oct 10, 2023
1 parent 068c953 commit 28a63bd
Show file tree
Hide file tree
Showing 158 changed files with 13,360 additions and 29 deletions.
5 changes: 0 additions & 5 deletions .gitmodules

This file was deleted.

78 changes: 63 additions & 15 deletions .idea/codeStyles/Project.xml

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

2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

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

4 changes: 0 additions & 4 deletions check_code_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ do
done

./gradlew ktlintFormat

echo "========= Check Library =========="
cd owncloud-android-library
./check_code_script.sh
1 change: 0 additions & 1 deletion owncloud-android-library
Submodule owncloud-android-library deleted from c82d75
43 changes: 43 additions & 0 deletions owncloudComLibrary/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.devtools.ksp'
apply plugin: 'kotlin-parcelize'

dependencies {
api 'com.squareup.okhttp3:okhttp:4.6.0'
implementation libs.kotlin.stdlib
api 'com.gitlab.ownclouders:dav4android:oc_support_2.1.5'
api 'com.github.AppDevNext.Logcat:LogcatCore:2.2.2'

// Moshi
implementation(libs.moshi.kotlin) {
exclude module: "kotlin-reflect"
}
implementation 'org.apache.commons:commons-lang3:3.12.0'
ksp libs.moshi.kotlin.codegen

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.10'
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.6.0'
}

android {
compileSdkVersion 33

defaultConfig {
minSdkVersion 23
targetSdkVersion 33
}

lint {
abortOnError false
ignoreWarnings true
}

testOptions {
unitTests {
includeAndroidResources = true
}
}
namespace 'com.owncloud.android.lib'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* ownCloud Android Library is available under MIT license
* Copyright (C) 2020 ownCloud GmbH.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package com.owncloud.android.lib.common.http

import com.facebook.stetho.okhttp3.StethoInterceptor

object DebugInterceptorFactory {
fun getInterceptor() = StethoInterceptor()
}
31 changes: 31 additions & 0 deletions owncloudComLibrary/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- ownCloud Android Library is available under MIT license
Copyright (C) 2023 ownCloud GmbH.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

</manifest>

Loading

0 comments on commit 28a63bd

Please sign in to comment.