Skip to content

Commit

Permalink
target Android 12 (targetSdkVersion 31) (#971)
Browse files Browse the repository at this point in the history
* update library and error tip

- Repackaged Markdown third-party libraries
- Optimized the error message when getting the sharing link

* update the app build config

* update the third lib and fix a bug

- [optimization] Replace third-party libraries: ViewPagerIndicator, MarkdownView
- [fix] Fix the problem that the dialog box does not disappear when getting Repo shared link fails

* fix some Bugs

- Fixed a crash when targetSdk Android 12 showed notification bar.

- Fixed the error of sharing to WeChat in Chinese environment: When WeChat is not installed on the mobile phone, the Repo page will be displayed by default.
  • Loading branch information
zhwanng authored May 6, 2023
1 parent 2779c82 commit 03e35b1
Show file tree
Hide file tree
Showing 28 changed files with 317 additions and 229 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ seadroid-key

/build
.transifexrc
/app/release
/app/seeds.txt
/app/unused.txt
/app/proguardMapping.txt
35 changes: 30 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId 'com.seafile.seadroid2'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 129
versionName "2.3.2"
versionCode 134
versionName "2.3.3"
multiDexEnabled true
resValue "string", "authorities", applicationId + '.cameraupload.provider'
resValue "string", "account_type", "com.seafile.seadroid2.account.api2"
Expand All @@ -29,6 +29,12 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}

signingConfigs {
debug {
// def props = new Properties()
Expand Down Expand Up @@ -108,15 +114,20 @@ android {
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation files('libs/library-markdown.aar')
implementation files('libs/library-emoji.aar')

//DO NOT upgrade this lib, unless the APP upgrade to AndroidX
implementation 'com.blankj:utilcode:1.30.0'
implementation 'com.jcodecraeer:xrecyclerview:1.6.0'

implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'

// implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
implementation 'me.relex:circleindicator:1.3.2'

implementation 'com.github.kevinsawicki:http-request:6.0'
implementation 'commons-io:commons-io:2.11.0'
implementation 'com.google.guava:guava:18.0'
Expand All @@ -138,11 +149,25 @@ android {

implementation 'com.yydcdut:markdown-processor:0.1.3'
implementation 'ren.qinc.edit:lib:0.0.5'//editor undo redo
implementation 'com.github.tiagohm.MarkdownView:library:0.19.0'
implementation 'org.greenrobot:eventbus:3.3.1'
//glide
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'


// implementation 'com.github.tiagohm.MarkdownView:library:0.19.0'
//Markdown Flexmark
implementation 'com.vladsch.flexmark:flexmark:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-tables:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-autolink:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-abbreviation:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-superscript:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-footnotes:0.28.32'
implementation 'com.vladsch.flexmark:flexmark-ext-attributes:0.28.32'
//Logger
implementation 'com.orhanobut:logger:1.15'
}
}

Binary file added app/libs/library-emoji.aar
Binary file not shown.
Binary file added app/libs/library-markdown.aar
Binary file not shown.
15 changes: 12 additions & 3 deletions app/proguard-project.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,20 @@

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-dontoptimize
-dontpreverify

#
-verbose
-printmapping proguardMapping.txt
#输出apk包内所有的class的内部结构
-dump dump.txt
#未混淆的类和成员
-printseeds seeds.txt
#列出从apk中删除的代码
-printusage unused.txt


-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
Expand Down Expand Up @@ -87,8 +97,7 @@

-keepattributes SourceFile,LineNumberTable,*Annotation*

-printmapping map.txt
-printseeds seed.txt


-keepnames class *

Expand Down
Loading

0 comments on commit 03e35b1

Please sign in to comment.