mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-10-22 20:55:44 +03:00
Move Glide-SSO integration into a separate module
This commit is contained in:
parent
e8c744477e
commit
8f746f9e97
14 changed files with 68 additions and 9 deletions
|
@ -65,6 +65,7 @@ dependencies {
|
|||
// Glide
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
implementation project(path: ':glide-sso-integration')
|
||||
|
||||
// Android X
|
||||
implementation "androidx.appcompat:appcompat:1.1.0"
|
||||
|
|
|
@ -10,9 +10,9 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
|
||||
import it.niedermann.android.glidesso.SingleSignOnUrl;
|
||||
import it.niedermann.owncloud.notes.R;
|
||||
import it.niedermann.owncloud.notes.databinding.ItemAccountChooseBinding;
|
||||
import it.niedermann.owncloud.notes.glide.SingleSignOnUrl;
|
||||
import it.niedermann.owncloud.notes.model.LocalAccount;
|
||||
|
||||
public class AccountSwitcherViewHolder extends RecyclerView.ViewHolder {
|
||||
|
|
|
@ -13,9 +13,9 @@ import com.bumptech.glide.request.RequestOptions;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import it.niedermann.android.glidesso.SingleSignOnUrl;
|
||||
import it.niedermann.owncloud.notes.R;
|
||||
import it.niedermann.owncloud.notes.databinding.ItemAccountChooseBinding;
|
||||
import it.niedermann.owncloud.notes.glide.SingleSignOnUrl;
|
||||
import it.niedermann.owncloud.notes.model.LocalAccount;
|
||||
|
||||
import static it.niedermann.owncloud.notes.android.fragment.AccountChooserAdapter.AccountChooserViewHolder;
|
||||
|
|
|
@ -12,9 +12,9 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
|
||||
import it.niedermann.android.glidesso.SingleSignOnUrl;
|
||||
import it.niedermann.owncloud.notes.R;
|
||||
import it.niedermann.owncloud.notes.databinding.ItemAccountChooseBinding;
|
||||
import it.niedermann.owncloud.notes.glide.SingleSignOnUrl;
|
||||
import it.niedermann.owncloud.notes.model.LocalAccount;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
|
|
1
glide-sso-integration/.gitignore
vendored
Normal file
1
glide-sso-integration/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build
|
34
glide-sso-integration/build.gradle
Normal file
34
glide-sso-integration/build.gradle
Normal file
|
@ -0,0 +1,34 @@
|
|||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Nextcloud SSO
|
||||
implementation "com.github.nextcloud:Android-SingleSignOn:0.5.1"
|
||||
|
||||
// Glide
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
}
|
0
glide-sso-integration/consumer-rules.pro
Normal file
0
glide-sso-integration/consumer-rules.pro
Normal file
21
glide-sso-integration/proguard-rules.pro
vendored
Normal file
21
glide-sso-integration/proguard-rules.pro
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
1
glide-sso-integration/src/main/AndroidManifest.xml
Normal file
1
glide-sso-integration/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1 @@
|
|||
<manifest package="it.niedermann.android.glidesso" />
|
|
@ -1,4 +1,4 @@
|
|||
package it.niedermann.owncloud.notes.glide;
|
||||
package it.niedermann.android.glidesso;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
|
@ -1,4 +1,4 @@
|
|||
package it.niedermann.owncloud.notes.glide;
|
||||
package it.niedermann.android.glidesso;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
|
@ -1,4 +1,4 @@
|
|||
package it.niedermann.owncloud.notes.glide;
|
||||
package it.niedermann.android.glidesso;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import com.nextcloud.android.sso.model.SingleSignOnAccount;
|
|||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
import static it.niedermann.owncloud.notes.glide.SingleSignOnStreamFetcher.X_HEADER_SSO_ACCOUNT_NAME;
|
||||
import static it.niedermann.android.glidesso.SingleSignOnStreamFetcher.X_HEADER_SSO_ACCOUNT_NAME;
|
||||
|
||||
/**
|
||||
* Use this as kind of {@link GlideUrl} if you want to do a {@link Glide} request from a {@link SingleSignOnAccount} which is not set by {@link SingleAccountHelper#setCurrentAccount(Context, String)}.
|
|
@ -1,4 +1,4 @@
|
|||
package it.niedermann.owncloud.notes.glide;
|
||||
package it.niedermann.android.glidesso;
|
||||
|
||||
import android.content.Context;
|
||||
|
|
@ -1 +1,2 @@
|
|||
include ':app'
|
||||
include ':glide-sso-integration'
|
||||
|
|
Loading…
Reference in a new issue