Skip to content

Commit

Permalink
v3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
zhwanng committed Sep 5, 2024
1 parent 4cb412d commit 5d8216a
Show file tree
Hide file tree
Showing 223 changed files with 7,218 additions and 2,651 deletions.
71 changes: 42 additions & 29 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
id 'org.jetbrains.kotlin.android'
}
def pid = 'com.seafile.seadroid2'

android {
namespace 'com.seafile.seadroid2'

defaultConfig {
applicationId pid
applicationId namespace
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
compileSdk rootProject.ext.compileSdkVersion

versionCode 152
versionName "3.0.2-pre"
versionCode 153
versionName "3.0.3"
multiDexEnabled true

resValue "string", "authorities", defaultConfig.applicationId + '.debug.cameraupload.provider'
Expand All @@ -38,10 +39,12 @@ android {


compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}

sourceSets {
main {
jniLibs.srcDirs = ['libs']
Expand Down Expand Up @@ -182,38 +185,33 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation 'com.blankj:utilcode:1.30.7'
//https://github.com/CymChad/BaseRecyclerViewAdapterHelper
implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.2"
//https://github.com/panpf/stickyitemdecoration
implementation "io.github.panpf.stickyitemdecoration:stickyitemdecoration:1.0.2"
//https://github.com/timusus/RecyclerView-FastScroll
implementation "com.simplecityapps:recyclerview-fastscroll:2.0.1"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// Firebase
implementation platform('com.google.firebase:firebase-bom:33.1.1')
implementation platform('com.google.firebase:firebase-bom:33.2.0')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'

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

implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.activity:activity:1.8.2"
implementation "androidx.appcompat:appcompat:1.7.0"
implementation "androidx.activity:activity:1.9.1"
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"
implementation "androidx.webkit:webkit:1.11.0"

//https://github.com/material-components/material-components-android
implementation "com.google.android.material:material:1.12.0"

def lifecycle_version = "2.7.0"
def lifecycle_version = "2.8.4"
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
//ProcessLifecycleOwner provides a lifecycle for the whole application process
Expand All @@ -223,9 +221,8 @@ android {
// optional - ReactiveStreams support for LiveData
//implementation "androidx.lifecycle:lifecycle-reactivestreams:$lifecycle_version"

def work_version = "2.9.0"
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.work:work-rxjava2:$work_version"
implementation "androidx.work:work-runtime:2.9.1"
// implementation "androidx.work:work-rxjava2:$work_version"

//squareup
def retrofit_version = "2.9.0"
Expand All @@ -241,6 +238,24 @@ android {
implementation "androidx.room:room-rxjava2:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"

//https://github.com/KunMinX/UnPeek-LiveData
implementation 'com.kunminx.arch:unpeek-livedata:7.8.0'

//
implementation 'com.blankj:utilcode:1.30.7'

//https://github.com/CymChad/BaseRecyclerViewAdapterHelper
implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.2"

//https://github.com/panpf/stickyitemdecoration
implementation "io.github.panpf.stickyitemdecoration:stickyitemdecoration:1.0.2"

//preference
implementation 'dev.rikka.rikkax.preference:simplemenu-preference:1.0.3'

//https://github.com/michaellee123/LiveEventBus
implementation 'com.github.michaellee123:LiveEventBus:1.8.14'

//https://github.com/google/guava
implementation "com.google.guava:guava:33.0.0-android"
//gson
Expand All @@ -257,9 +272,6 @@ android {
//https://github.com/elvishew/xLog
implementation 'com.elvishew:xlog:1.10.1'

//https://github.com/zhanghai/AndroidFastScroll
implementation 'me.zhanghai.android.fastscroll:library:1.3.0'

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

Expand Down Expand Up @@ -298,7 +310,7 @@ android {
implementation 'com.madgag.spongycastle:core:1.54.0.0'
implementation 'com.madgag.spongycastle:prov:1.54.0.0'

implementation 'org.greenrobot:eventbus:3.3.1'
// implementation 'org.greenrobot:eventbus:3.3.1'

def glide_version = "4.16.0"
implementation "com.github.bumptech.glide:glide:$glide_version"
Expand All @@ -307,10 +319,11 @@ android {


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


}

}
6 changes: 5 additions & 1 deletion app/proguard-project.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,13 @@
-keep class com.seafile.seadroid2.**
-keepclassmembers class com.seafile.seadroid2.** { *; }
-keepclassmembers class com.seafile.seadroid2.** { public <init>(...); }
-keepclassmembers class * extends com.actionbarsherlock.ActionBarSherlock { public <init>(...); }

-keep class tv.danmaku.ijk.** { *; }
-dontwarn tv.danmaku.ijk.**
-keep class com.shuyu.gsyvideoplayer.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.**

-dontwarn com.jeremyliao.liveeventbus.**
-keep class com.jeremyliao.liveeventbus.** { *; }
-keep class androidx.lifecycle.** { *; }
-keep class androidx.arch.core.** { *; }
8 changes: 5 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.seafile.seadroid2">
xmlns:tools="http://schemas.android.com/tools">

<uses-sdk tools:overrideLibrary="us.feras.mdv" />

Expand Down Expand Up @@ -97,7 +96,8 @@

<activity
android:name=".ui.SplashActivity"
android:exported="true">
android:exported="true"
android:theme="@style/AppTheme.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down Expand Up @@ -206,6 +206,8 @@
<activity android:name=".ui.media.image_preview.ImagePreviewActivity" />
<activity android:name=".ui.transfer_list.TransferActivity" />
<activity android:name=".ui.BugHandlerActivity" />
<activity android:name=".ui.settings.SettingsAlbumBackupAdvancedActivity" />
<activity android:name=".ui.data_migrate.DataMigrationV303Activity" />

<provider
android:name=".provider.SeafileProvider"
Expand Down
19 changes: 0 additions & 19 deletions app/src/main/java/com/seafile/seadroid2/App.java

This file was deleted.

30 changes: 29 additions & 1 deletion app/src/main/java/com/seafile/seadroid2/SeadroidApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
import android.app.Application;
import android.content.Context;

import androidx.appcompat.app.AppCompatDelegate;

import com.jeremyliao.liveeventbus.LiveEventBus;
import com.seafile.seadroid2.enums.NightMode;
import com.seafile.seadroid2.framework.datastore.sp.Sorts;
import com.seafile.seadroid2.framework.util.SLogs;
import com.seafile.seadroid2.gesturelock.AppLockManager;
import com.seafile.seadroid2.framework.monitor.ActivityMonitor;
import com.seafile.seadroid2.framework.notification.base.NotificationUtils;
import com.seafile.seadroid2.framework.util.CrashHandler;
import com.seafile.seadroid2.preferences.Settings;


public class SeadroidApplication extends Application {
Expand All @@ -20,11 +27,32 @@ public void onCreate() {
instance = this;

//
App.init();
Sorts.init();

//init slogs
SLogs.init();

//print current app env info
SLogs.printAppEnvInfo();

//
Settings.initUserSettings();
if (Settings.APP_NIGHT_MODE != null) {
NightMode nightMode = Settings.APP_NIGHT_MODE.queryValue();
AppCompatDelegate.setDefaultNightMode(nightMode.ordinal());
} else {
AppCompatDelegate.setDefaultNightMode(NightMode.FOLLOW_SYSTEM.ordinal());
}


// set gesture lock if available
AppLockManager.getInstance().enableDefaultAppLockIfAvailable(this);

LiveEventBus.config()
.autoClear(true)
.enableLogger(BuildConfig.DEBUG)
.setContext(this)
.lifecycleObserverAlwaysActive(true);

//
NotificationUtils.initNotificationChannels(this);
Expand Down
Loading

0 comments on commit 5d8216a

Please sign in to comment.