Skip to content

Commit

Permalink
Merge branch 'zhwanng-feat-MAD-Stage1'
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/src/main/java/com/seafile/seadroid2/framework/util/Utils.java
  • Loading branch information
zhwanng committed May 1, 2024
2 parents ac28b05 + ffdcd19 commit 2f710e2
Show file tree
Hide file tree
Showing 1,082 changed files with 44,032 additions and 44,391 deletions.
171 changes: 136 additions & 35 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion

defaultConfig {
applicationId 'com.seafile.seadroid2'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 139
versionName "2.3.6"
compileSdk rootProject.ext.compileSdkVersion

versionCode 150
versionName "3.0.0"
multiDexEnabled true
resValue "string", "authorities", applicationId + '.cameraupload.provider'
resValue "string", "account_type", "com.seafile.seadroid2.account.api2"
buildConfigField "String", "ACCOUNT_TYPE", '"com.seafile.seadroid2.account.api2"'

resValue "string", "authorities", defaultConfig.applicationId + '.debug.cameraupload.provider'
resValue "string", "account_type", defaultConfig.applicationId + ".debug.account.api2"

buildConfigField "String", "ACCOUNT_TYPE", '"' + defaultConfig.applicationId + '.debug.account.api2"'
buildConfigField "String", "FILE_PROVIDER_AUTHORITIES", '"' + defaultConfig.applicationId + '.debug.fileprovider"'

javaCompileOptions {
annotationProcessorOptions {
arguments["room.incremental"] = "true"
arguments["workmanager.inline"] = "false" // 禁用 WorkManager 的自动初始化
}
}
}

lintOptions {
Expand Down Expand Up @@ -61,11 +76,15 @@ android {
debug {
debuggable true
applicationIdSuffix ".debug"
resValue "string", "authorities", defaultConfig.applicationId + '.debug.cameraupload.provider'
resValue "string", "account_type", "com.seafile.seadroid2.debug.account.api2"
buildConfigField "String", "ACCOUNT_TYPE", '"com.seafile.seadroid2.debug.account.api2"'
signingConfig signingConfigs.debug
minifyEnabled false

resValue "string", "authorities", defaultConfig.applicationId + '.debug.cameraupload.provider'
resValue "string", "account_type", defaultConfig.applicationId + ".debug.account.api2"

buildConfigField "String", "ACCOUNT_TYPE", '"' + defaultConfig.applicationId + '.debug.account.api2"'
buildConfigField "String", "FILE_PROVIDER_AUTHORITIES", '"' + defaultConfig.applicationId + '.debug.fileprovider"'

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
applicationVariants.all { variant ->
variant.outputs.all { output ->
Expand All @@ -80,6 +99,14 @@ android {
release {
signingConfig signingConfigs.release
minifyEnabled true

resValue "string", "authorities", defaultConfig.applicationId + '.cameraupload.provider'
resValue "string", "account_type", defaultConfig.applicationId + ".account.api2"

buildConfigField "String", "ACCOUNT_TYPE", '"' + defaultConfig.applicationId + '.account.api2"'
buildConfigField "String", "FILE_PROVIDER_AUTHORITIES", '"' + defaultConfig.applicationId + '.fileprovider"'


proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
applicationVariants.all { variant ->
variant.outputs.all { output ->
Expand All @@ -104,71 +131,145 @@ android {
}
}

buildFeatures {
viewBinding true
}

allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}

// configurations {
// implementation.exclude group: 'org.jetbrains' , module:'annotations'
// }

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

implementation 'com.blankj:utilcode:1.30.7'
implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper:4.0.0-beta14"
//https://github.com/CymChad/BaseRecyclerViewAdapterHelper
implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.2"

// Firebase
implementation platform('com.google.firebase:firebase-bom:32.8.1')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'

//media3
final def media3_version = '1.1.0'
final def media3_version = '1.2.1'
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-ui:$media3_version"

final def x_version = '1.5.0'
implementation "androidx.appcompat:appcompat:$x_version"
implementation "androidx.activity:activity:$x_version"
implementation "com.google.android.material:material:$x_version"
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.activity:activity:1.8.2"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation "androidx.preference:preference:1.2.1"
// implementation "androidx.datastore:datastore-preferences:1.0.0"
// implementation "androidx.datastore:datastore-preferences-rxjava2:1.0.0"
implementation "androidx.core:core-splashscreen:1.0.1"

//live event bus
// implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0'
implementation "com.google.android.material:material:1.11.0"

//https://github.com/ongakuer/CircleIndicator
implementation 'me.relex:circleindicator:2.1.6'
def lifecycle_version = "2.7.0"
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
//ProcessLifecycleOwner provides a lifecycle for the whole application process
implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version"
//helpers for implementing LifecycleOwner in a Service
//implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version"
// optional - ReactiveStreams support for LiveData
//implementation "androidx.lifecycle:lifecycle-reactivestreams:$lifecycle_version"

implementation 'com.github.kevinsawicki:http-request:6.0'
implementation 'commons-io:commons-io:2.13.0'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
def work_version = "2.9.0"
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.work:work-rxjava2:$work_version"

//squareup
def retrofit_version = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

//room
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"

//https://github.com/google/guava
implementation "com.google.guava:guava:32.1.2-android"
//gson
implementation 'com.google.code.gson:gson:2.10.1'
//https://github.com/apache/commons-io
implementation 'commons-io:commons-io:2.13.0'
//https://github.com/apache/commons-lang
implementation 'com.github.apache:commons-lang:rel~commons-lang-3.12.0'

//Rxjava
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'

//https://github.com/elvishew/xLog
implementation 'com.elvishew:xlog:1.10.1'

// //https://github.com/wasabeef/recyclerview-animators
// implementation 'jp.wasabeef:recyclerview-animators:4.0.2'

//live event bus
// implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0'

implementation 'com.github.kevinsawicki:http-request:6.0'
// implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'


//https://github.com/Baseflow/PhotoView
implementation 'com.github.Chrisbanes:PhotoView:2.3.0'

//https://jitpack.io
implementation 'com.github.zhwanng:XXPermissions:1.0.2'
implementation 'com.github.zhwanng.android-iconify:android-iconify:3.0.1'
implementation 'com.github.zhwanng.android-iconify:android-iconify-material-community:3.0.1'
implementation 'com.github.zhwanng:BottomSheet:v1.5.2'
// implementation 'com.github.zhwanng:XXPermissions:1.0.2'
implementation 'com.github.haiwen:MarkdownView:v0.19.4'
implementation 'com.github.yydcdut.RxMarkdown:markdown-processor:v0.1.3'

testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.0'

// //markdown
// final def markwon_version = '4.6.2'
// implementation "io.noties.markwon:core:$markwon_version"
// implementation "io.noties.markwon:editor:$markwon_version"
// implementation "io.noties.markwon:ext-latex:$markwon_version"
// implementation "io.noties.markwon:ext-strikethrough:$markwon_version"
// implementation "io.noties.markwon:ext-tables:$markwon_version"
// implementation "io.noties.markwon:ext-tasklist:$markwon_version"
// implementation "io.noties.markwon:html:$markwon_version"
// implementation "io.noties.markwon:image:$markwon_version"
// implementation "io.noties.markwon:image-glide:$markwon_version"
// implementation "io.noties.markwon:inline-parser:$markwon_version"
// implementation "io.noties.markwon:linkify:$markwon_version"
// implementation "io.noties.markwon:syntax-highlight:$markwon_version"



implementation 'com.madgag.spongycastle:core:1.54.0.0'
implementation 'com.madgag.spongycastle:prov:1.54.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
implementation 'io.reactivex.rxjava3:rxjava:3.1.5'
implementation 'io.reactivex.rxjava3:rxandroid:3.0.2'
implementation 'com.google.code.gson:gson:2.10'

implementation 'org.greenrobot:eventbus:3.3.1'

def glide_version = "4.14.2"
def glide_version = "4.16.0"
implementation "com.github.bumptech.glide:glide:$glide_version"
implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version"
annotationProcessor "com.github.bumptech.glide:compiler:$glide_version"


testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
testImplementation 'org.robolectric:robolectric:4.9'


}
}

20 changes: 20 additions & 0 deletions app/debug/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.seafile.seadroid2.debug",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 150,
"versionName": "3.0.0",
"outputFile": "seafile-debug-3.0.0.apk"
}
],
"elementType": "File"
}
48 changes: 48 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"project_info": {
"project_number": "809279966741",
"project_id": "seafile-a94ae",
"storage_bucket": "seafile-a94ae.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:809279966741:android:8b8a60dc762124a06f481c",
"android_client_info": {
"package_name": "com.seafile.seadroid2"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDmpAb00UKGnh3dU_AqL9vLN-8_VTraKNw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:809279966741:android:aa26fbc69907c20c6f481c",
"android_client_info": {
"package_name": "com.seafile.seadroid2.debug"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDmpAb00UKGnh3dU_AqL9vLN-8_VTraKNw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
10 changes: 10 additions & 0 deletions app/src/androidTest/java/ConfirmCredentialsIntegrationTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;

import org.junit.runner.RunWith;

@RunWith(AndroidJUnit4.class)
@LargeTest
public class ConfirmCredentialsIntegrationTest {

}
36 changes: 36 additions & 0 deletions app/src/debug/res/drawable/logo_debug_large.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="256dp"
android:height="256dp"
android:viewportWidth="256"
android:viewportHeight="256">
<path
android:pathData="M128,128m-128,0a128,128 0,1 1,256 0a128,128 0,1 1,-256 0"
android:fillColor="#ffffff"/>
<path
android:strokeWidth="1"
android:pathData="M128.5,128.5m-81,0a81,81 0,1 1,162 0a81,81 0,1 1,-162 0"
android:strokeColor="#A1A1A1">
<aapt:attr name="android:fillColor">
<gradient
android:startX="128.5"
android:startY="48"
android:endX="128.5"
android:endY="209"
android:type="linear">
<item android:offset="0" android:color="#FFCECECE"/>
<item android:offset="1" android:color="#FF9B9B9B"/>
</gradient>
</aapt:attr>
</path>
<group>
<clip-path
android:pathData="M148,73.84l44.37,-4.84l4.84,44.37l-44.37,4.84z"/>
<path
android:pathData="M192.63,103.71L174.88,89.45C176.02,85.26 174.62,80.54 171.03,77.66C167.15,74.54 161.83,74.41 157.85,76.88L166.29,83.66L161.53,89.58L153.1,82.8C151.54,87.22 152.81,92.39 156.69,95.51C160.28,98.39 165.19,98.74 169.04,96.72L186.79,110.98C187.57,111.61 188.7,111.48 189.24,110.71L192.9,106.16C193.53,105.47 193.41,104.33 192.63,103.71Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M75,120.45C75,118.59 76.54,117.1 78.44,117.1C79.35,117.1 80.15,117.45 80.77,118C80.75,117.7 80.73,117.42 80.73,117.11C80.73,110.89 85.87,105.86 92.22,105.86C93.86,105.86 95.41,106.19 96.84,106.81C96.82,106.5 96.8,106.18 96.8,105.88C96.8,96.55 104.5,89 114.01,89C123.46,89 131.13,96.47 131.23,105.71C128.12,108.39 125.63,111.78 124.04,115.61C120.96,113.73 117.34,112.6 113.45,112.6C105.44,112.6 98.53,117.07 95.3,123.81H83.03H78.44C76.54,123.77 75,122.31 75,120.45ZM165.64,110.37C161.38,106.19 155.51,103.61 149.01,103.61C137.15,103.61 127.33,112.22 125.72,123.42C122.79,119.6 118.12,117.11 112.87,117.11C103.99,117.11 96.8,124.18 96.8,132.87C96.8,135.4 97.41,137.78 98.49,139.91C92.92,141.02 88.77,145.26 88.77,150.31C88.77,156.22 94.42,161 101.4,161C104.48,161 107.31,160.06 109.5,158.5L135.32,133.6C138.18,131.04 141.97,129.48 146.15,129.48C154.88,129.48 161.98,136.3 162.22,144.81C162.22,144.81 162.22,144.79 162.2,144.79C162.34,147.31 161,149.84 158.54,151.23C155.1,153.18 150.79,152.14 148.9,148.94C147.01,145.71 148.26,141.54 151.7,139.59C152.5,139.14 153.34,138.85 154.2,138.7C153.46,138.55 152.69,138.49 151.9,138.49C145.57,138.49 140.42,143.52 140.42,149.74C140.42,155.97 145.55,161 151.9,161C152.18,161 152.47,160.98 152.74,160.97L152.72,160.93L153.05,160.9H175.59V160.98C182.48,160.68 189,154.46 189,146.87C189,139.1 182.23,132.76 174.3,132.76C174.29,132.76 174.29,132.76 174.27,132.76C172.98,135.01 171.43,136.32 169.66,137.73C171.51,134.43 172.57,130.67 172.57,126.64C172.54,120.29 169.9,114.55 165.64,110.37Z"
android:fillColor="#ffffff"/>
</vector>
Binary file added app/src/debug/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2f710e2

Please sign in to comment.