Skip to content

Commit

Permalink
[feature] 1.新架构
Browse files Browse the repository at this point in the history
  • Loading branch information
heyanLE committed Dec 26, 2023
1 parent b01f70c commit 7675976
Show file tree
Hide file tree
Showing 245 changed files with 29,082 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app-old/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/release
177 changes: 177 additions & 0 deletions app-old/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@

import com.heyanle.buildsrc.Android
import com.heyanle.buildsrc.Config
import com.heyanle.buildsrc.RoomSchemaArgProvider
import com.heyanle.buildsrc.project

plugins {
alias(build.plugins.android.application)
alias(build.plugins.kotlin.android)
alias(build.plugins.ksp)
}

android {
namespace = "com.heyanle.easybangumi4"
compileSdk = Android.compileSdk

defaultConfig {
applicationId = "com.heyanle.easybangumi4"
minSdk = Android.minSdk
targetSdk = Android.targetSdk
versionCode = Android.versionCode
versionName = Android.versionName

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

vectorDrawables {
useSupportLibrary = true
}

buildConfigField(
"String",
Config.APP_CENTER_SECRET,
"\"${Config.getPrivateValue(Config.APP_CENTER_SECRET)}\""
)

ksp {
arg("room.generateKotlin", "true")
arg(RoomSchemaArgProvider(File(projectDir, "schemas")))
}

ndk{
// 打包生成的 APK 文件指挥包含 ARM 指令集的动态库
// abiFilters += "arm64-v8a"
// abiFilters += "armeabi-v7a"
abiFilters.addAll(arrayOf("armeabi", "armeabi-v7a" , "arm64-v8a", "x86", "x86_64"))
}

}

sourceSets {
// Adds exported schema location as test app assets.
getByName("androidTest").assets.srcDir("$projectDir/schemas")
}


packaging {
resources.excludes.add("META-INF/beans.xml")
}

buildTypes {
// debug {
// isMinifyEnabled = true
// isShrinkResources = false
// proguardFiles("proguard-rules.pro")
// }
release {
isMinifyEnabled = true
isShrinkResources = false
proguardFiles("proguard-rules.pro")

}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all"
}
buildFeatures {
compose = true
viewBinding = true
}
composeOptions {
kotlinCompilerExtensionVersion = build.versions.compose.compiler.get()
}

}



dependencies {

implementation(androidx.bundles.core)
implementation(files("../libs/bcprov-jdk16-139.jar"))
androidTestImplementation (androidx.bundles.test.core)

implementation(androidx.bundles.room.impl)
implementation(androidx.room.paging)
annotationProcessor(androidx.room.compiler)
ksp(androidx.room.compiler)
testImplementation(androidx.room.testing)
androidTestImplementation(androidx.room.testing)

implementation(androidx.preference.ktx)

implementation(androidx.medie)

implementation(androidx.google.material)

implementation(androidx.webkit)

implementation(androidx.window)

implementation(androidx.paging.common)
implementation(androidx.paging.compose)
implementation(androidx.paging.runtime.ktx)

implementation(compose.bundles.ui)
implementation(compose.bundles.runtime)
implementation(compose.bundles.animation)
implementation(compose.bundles.foundation)
implementation(compose.bundles.material)
implementation(compose.bundles.material3)

implementation(libs.bundles.okhttp3)
implementation(libs.bundles.cling)
implementation(libs.bundles.appcenter)

implementation(libs.jsoup)
implementation(libs.gson)
implementation(libs.moshi)

//debugImplementation(libs.leakcanary)

implementation(libs.glide)
implementation(libs.okkv2)

testImplementation(libs.junit)

implementation(libs.easyplayer2)
implementation(libs.accompanist.systemuicontroller)
implementation(libs.accompanist.swiperefresh)
implementation(libs.accompanist.permissions)
implementation(libs.navigtion.compose)
implementation(libs.coil.compose)
implementation(libs.coil.gif)
implementation(libs.commons.text)
implementation(libs.bundles.cling)
implementation(libs.compose.reorderable)

ksp(libs.aria.compiler)
//annotationProcessor(libs.aria.compiler)
implementation(libs.aria)
implementation(libs.aria.m3u8)

implementation(libs.jeff.m3u8)

implementation(libs.koin.core)
implementation(libs.koin.android)

implementation(project(":easy-dlna"))
implementation(project(":easy-crasher"))
implementation(project(":easy-i18n"))
implementation(project(":injekt"))


implementation(extension.extension.api)




}
154 changes: 154 additions & 0 deletions app-old/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# 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 *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# 本体
-keep class com.heyanle.**{*;}
-keep interface com.heyanle.**{*;}

# 协程

-keep class kotlin.** { *; }
-keep class kotlin.Metadata { *; }
-dontwarn kotlin.**
-keepclassmembers class **$WhenMappings {
<fields>;
}
-keepclassmembers class kotlin.Metadata {
public <methods>;
}
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
}
-keep class kotlinx.coroutines.** {*;}
# ServiceLoader support
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}

# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
volatile <fields>;
}

-keep class com.tencent.mmkv.** {*;}

-keep class org.apache.commons.** {*;}

# okhttp
-keep class okhttp3.** {*;}

# jsoup
-keep class org.jsoup.** {*;}

# jsoup
-keep class com.google.gson.** {*;}

# aria
-dontwarn com.arialyy.aria.**
-keep class com.arialyy.aria.**{*;}
-keep class **$$DownloadListenerProxy{ *; }
-keep class **$$UploadListenerProxy{ *; }
-keep class **$$DownloadGroupListenerProxy{ *; }
-keep class **$$DGSubListenerProxy{ *; }
-keepclasseswithmembernames class * {
@Download.* <methods>;
@Upload.* <methods>;
@DownloadGroup.* <methods>;
}

# m3u8 ffmepg lib
-keep class com.jeffmony.** {*;}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

#保持 Serializable 不被混淆
-keepnames class * implements java.io.Serializable

#保持 Serializable 不被混淆并且enum 类也不被混淆
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
!private <fields>;
!private <methods>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}

#保持枚举 enum 类不被混淆
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keepclassmembers class * {
public void *ButtonClicked(android.view.View);
}

#优化 不优化输入的类文件
-dontoptimize

#避免混淆泛型
-keepattributes Singature

#保护注解
-keepattributes *Annotation

-keepattributes *Annotation*
-keep class com.lidroid.** { *; }
-keep class * extends java.lang.annotation.Annotation { *; }

#保持 Parcelable 不被混淆
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

#保持 Serializable 不被混淆
-keepnames class * implements java.io.Serializable

#不混淆资源类
-keepclassmembers class **.R$* {
public static <fields>;
}

-dontwarn javax.script.ScriptEngine
-dontwarn javax.script.ScriptEngineManager
-dontwarn javax.inject.Qualifier
-dontwarn javax.enterprise.context.ApplicationScoped
-dontwarn javax.enterprise.inject.Alternative
-dontwarn javax.inject.Inject
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE

-dontwarn androidx.window.extensions.area.ExtensionWindowAreaPresentation
Loading

0 comments on commit 7675976

Please sign in to comment.