Release 1.3.4
Bugfix: proguard issues
This commit is contained in:
parent
96947b9fec
commit
688ddf01b7
10 changed files with 77 additions and 23 deletions
|
|
@ -20,8 +20,8 @@ android {
|
|||
applicationId "org.fnives.tiktokdownloader"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 35
|
||||
versionCode 4
|
||||
versionName "1.3.3"
|
||||
versionCode 5
|
||||
versionName "1.3.4"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
|||
69
app/proguard-rules.pro
vendored
69
app/proguard-rules.pro
vendored
|
|
@ -1,21 +1,54 @@
|
|||
# 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
|
||||
# REGION RETROFIT
|
||||
|
||||
# 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 *;
|
||||
#}
|
||||
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
|
||||
# EnclosingMethod is required to use InnerClasses.
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
# Retrofit does reflection on method and parameter annotations.
|
||||
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
# Keep annotation default values (e.g., retrofit2.http.Field.encoded).
|
||||
-keepattributes AnnotationDefault
|
||||
|
||||
# Retain service method parameters when optimizing.
|
||||
-keepclassmembers,allowshrinking,allowobfuscation interface * {
|
||||
@retrofit2.http.* <methods>;
|
||||
}
|
||||
|
||||
# Ignore annotation used for build tooling.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
||||
|
||||
# Ignore JSR 305 annotations for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
|
||||
-dontwarn kotlin.Unit
|
||||
|
||||
# Top-level functions that can only be used by Kotlin.
|
||||
-dontwarn retrofit2.KotlinExtensions
|
||||
-dontwarn retrofit2.KotlinExtensions$*
|
||||
|
||||
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
|
||||
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
|
||||
-if interface * { @retrofit2.http.* <methods>; }
|
||||
-keep,allowobfuscation interface <1>
|
||||
|
||||
# Keep inherited services.
|
||||
-if interface * { @retrofit2.http.* <methods>; }
|
||||
-keep,allowobfuscation interface * extends <1>
|
||||
|
||||
# With R8 full mode generic signatures are stripped for classes that are not
|
||||
# kept. Suspend functions are wrapped in continuations where the type argument
|
||||
# is used.
|
||||
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
|
||||
|
||||
# R8 full mode strips generic signatures from return types if not kept.
|
||||
-if interface * { @retrofit2.http.* public *** *(...); }
|
||||
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
|
||||
|
||||
# With R8 full mode generic signatures are stripped for classes that are not kept.
|
||||
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
||||
|
||||
# ENDREGION
|
||||
|
||||
# REGION
|
||||
|
|
@ -1,12 +1,17 @@
|
|||
package org.fnives.tiktokdownloader
|
||||
|
||||
import com.pierfrancescosoffritti.androidyoutubeplayer.BuildConfig
|
||||
import org.fnives.tiktokdownloader.errortracking.ErrorTracer
|
||||
|
||||
object Logger {
|
||||
|
||||
private const val TAG = "TTDTag"
|
||||
|
||||
fun logMessage(message: String) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
System.err.println("TTDTag $message")
|
||||
System.err.println("$TAG: $message")
|
||||
} else {
|
||||
ErrorTracer.addError("", message = "$TAG: $message", throwable = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class TikTokDownloadRemoteSource(
|
|||
wrapIntoProperException {
|
||||
ErrorTracer.startErrorTransaction(videoInPending.url)
|
||||
delay(delayBeforeRequest) // added just so captcha trigger may not happen
|
||||
Logger.logMessage("starting request")
|
||||
val actualUrl = service.getContentActualUrlAndCookie(videoInPending.url)
|
||||
val videoUrl: VideoFileUrl
|
||||
if (actualUrl.url != null) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import org.fnives.tiktokdownloader.data.network.parsing.converter.VideoResponseC
|
|||
import org.fnives.tiktokdownloader.data.network.parsing.response.ActualVideoPageUrl
|
||||
import org.fnives.tiktokdownloader.data.network.parsing.response.VideoFileUrl
|
||||
import org.fnives.tiktokdownloader.data.network.parsing.response.VideoResponse
|
||||
import org.fnives.tiktokdownloader.errortracking.ErrorTracer
|
||||
import retrofit2.Converter
|
||||
import retrofit2.Retrofit
|
||||
import java.lang.reflect.Type
|
||||
|
|
@ -39,6 +40,13 @@ class TikTokWebPageConverterFactory(
|
|||
)
|
||||
|
||||
VideoResponse::class.java -> VideoResponseConverter()
|
||||
else -> super.responseBodyConverter(type, annotations, retrofit)
|
||||
else -> {
|
||||
ErrorTracer.addError(
|
||||
"",
|
||||
message = "Couldn't find proper Converter for $type with $annotations",
|
||||
throwable = null
|
||||
)
|
||||
super.responseBodyConverter(type, annotations, retrofit)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
package org.fnives.tiktokdownloader.data.network.parsing.response
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
||||
@Keep
|
||||
class ActualVideoPageUrl(val url: String?, val fullResponse: String)
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
package org.fnives.tiktokdownloader.data.network.parsing.response
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
||||
@Keep
|
||||
class VideoFileUrl(val videoFileUrl: String)
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
package org.fnives.tiktokdownloader.data.network.parsing.response
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import okhttp3.MediaType
|
||||
import java.io.InputStream
|
||||
|
||||
@Keep
|
||||
class VideoResponse(val mediaType: MediaType?, val videoInputStream: InputStream)
|
||||
|
|
@ -2,7 +2,6 @@ package org.fnives.tiktokdownloader.errortracking
|
|||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import androidx.core.content.FileProvider
|
||||
import java.io.File
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue