mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 15:30:31 +05:30
shrink apk size and enable minify
This commit is contained in:
parent
13d86cce19
commit
6879c91dd2
@ -19,7 +19,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
@ -36,6 +36,18 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include "armeabi-v7a","arm64-v8a","x86","x86_64"
|
||||
universalApk false
|
||||
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'lib/armeabi-v7a/*_neon.so'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
5
app/proguard-rules.pro
vendored
5
app/proguard-rules.pro
vendored
@ -18,4 +18,7 @@
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#-renamesourcefileattribute SourceFile
|
||||
#uncomment for debug
|
||||
#-keepnames class **
|
||||
-keep class com.github.libretube.obj.** { *; }
|
||||
|
@ -8,12 +8,64 @@
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"type": "UNIVERSAL",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 4,
|
||||
"versionName": "0.2.2",
|
||||
"outputFile": "app-release.apk"
|
||||
"outputFile": "app-universal-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "arm64-v8a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 4,
|
||||
"versionName": "0.2.2",
|
||||
"outputFile": "app-arm64-v8a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "armeabi-v7a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 4,
|
||||
"versionName": "0.2.2",
|
||||
"outputFile": "app-armeabi-v7a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86_64"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 4,
|
||||
"versionName": "0.2.2",
|
||||
"outputFile": "app-x86_64-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 4,
|
||||
"versionName": "0.2.2",
|
||||
"outputFile": "app-x86-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
|
@ -5,6 +5,7 @@
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@ -36,8 +37,6 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -396,7 +396,7 @@ class PlayerFragment : Fragment() {
|
||||
)
|
||||
}
|
||||
}
|
||||
FFmpegKit.executeAsync("-i ${response.videoStreams[0].url} -i ${response.audioStreams!![0].url} -c copy ${context?.getExternalFilesDir(DIRECTORY_DOWNLOADS)}${File.separator}output1.mkv",
|
||||
FFmpegKit.executeAsync("-i ${response.videoStreams[0].url} -i ${response.audioStreams!![0].url} -c copy ${context?.getExternalFilesDir(DIRECTORY_DOWNLOADS)}${File.separator}output2.mkv",
|
||||
{ session ->
|
||||
val state = session.state
|
||||
val returnCode = session.returnCode
|
||||
|
@ -50,8 +50,16 @@ class TrendingAdapter(private val videoFeed: List<StreamItem>): RecyclerView.Ada
|
||||
|
||||
}
|
||||
}
|
||||
Picasso.get().load(trending.thumbnail).into(thumbnailImage)
|
||||
Picasso.get().load(trending.uploaderAvatar).into(channelImage)
|
||||
if (trending.thumbnail!!.isEmpty()) {
|
||||
} else{
|
||||
Picasso.get().load(trending.thumbnail).into(thumbnailImage)
|
||||
}
|
||||
if (trending.uploaderAvatar!!.isEmpty()) {
|
||||
} else{
|
||||
Picasso.get().load(trending.uploaderAvatar).into(channelImage)
|
||||
}
|
||||
|
||||
|
||||
holder.v.setOnClickListener{
|
||||
var bundle = Bundle()
|
||||
bundle.putString("videoId",trending.url!!.replace("/watch?v=",""))
|
||||
|
Loading…
x
Reference in New Issue
Block a user