1- // Top-level build file where you can add configuration options common to all sub-projects/modules.
1+ import com.android.build.gradle.internal.api.BaseVariantOutputImpl
2+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3+
24plugins {
3- id(" com.android.application" ) version " 8.10.1" apply false
4- id(" org.jetbrains.kotlin.android" ) version " 2.2.0" apply false
5- id(" org.jetbrains.kotlin.plugin.compose" ) version " 2.2.0" apply false
5+ id(" com.android.application" ) version " 8.10.1"
6+ id(" org.jetbrains.kotlin.android" ) version " 2.2.0"
7+ id(" org.jetbrains.kotlin.plugin.compose" ) version " 2.2.0"
8+ id(" com.google.gms.google-services" )
9+ id(" kotlin-parcelize" )
10+ kotlin(" plugin.serialization" ) version " 2.2.0"
611}
7- buildscript {
8- repositories {
9- // Check that you have the following line (if not, add it):
1012
11- google() // Google's Maven repository
12- maven(" https://jitpack.io" )
13+ android {
14+ namespace = " com.donut.mixfile"
15+ compileSdk = 36
16+ defaultConfig {
17+ applicationId = " com.donut.mixfile"
18+ minSdk = 26
19+ targetSdk = 36
20+ versionCode = 160
21+ versionName = " 2.0.11.1"
22+
23+ testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
24+ vectorDrawables {
25+ useSupportLibrary = true
26+ }
27+ }
1328
29+ buildTypes {
30+ release {
31+ isMinifyEnabled = true
32+ isShrinkResources = true
33+ proguardFiles(
34+ getDefaultProguardFile(" proguard-android-optimize.txt" ),
35+ " proguard-rules.pro"
36+ )
37+ signingConfig = signingConfigs.getByName(" debug" )
38+ }
39+ }
40+ applicationVariants.all {
41+ val variant = this
42+ variant.outputs
43+ .map { it as BaseVariantOutputImpl }
44+ .forEach { output ->
45+ val outputFileName =
46+ " MixFile-${variant.baseName} -${variant.versionName} .apk"
47+ output.outputFileName = outputFileName
48+ }
49+ }
50+ compileOptions {
51+ sourceCompatibility = JavaVersion .VERSION_1_8
52+ targetCompatibility = JavaVersion .VERSION_1_8
53+ }
54+ tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > ().configureEach {
55+ compilerOptions {
56+ jvmTarget.set(JvmTarget .JVM_1_8 )
57+ }
58+ }
59+ buildFeatures {
60+ compose = true
1461 }
15- dependencies {
1662
17- classpath(" com.google.gms:google-services:4.4.3" )
63+ packaging {
64+ resources {
65+ excludes + = " /META-INF/*"
66+ }
1867 }
68+ }
69+
70+
71+ dependencies {
72+ // 引用 libs 目录下的所有 aar
73+ implementation(fileTree(mapOf (" dir" to " libs" , " include" to listOf (" *.aar" ))))
74+ implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0" )
75+ implementation(" com.github.InvertGeek:mixfile-core:2.0.11" )
76+ implementation(" androidx.compose.material:material-icons-extended:1.7.8" )
77+ implementation(" com.tencent:mmkv:1.3.14" )
78+ implementation(" net.engawapg.lib:zoomable:1.6.1" )
79+ implementation(" io.coil-kt:coil:2.6.0" )
80+ implementation(" io.coil-kt:coil-compose:2.6.0" )
81+ implementation(" io.coil-kt:coil-gif:2.6.0" )
82+ implementation(" io.coil-kt:coil-svg:2.6.0" )
83+ implementation(" io.coil-kt:coil-video:2.6.0" )
84+
85+ implementation(" androidx.media3:media3-exoplayer:1.10.0" ) // [Required] androidx.media3 ExoPlayer dependency
86+ implementation(" androidx.media3:media3-session:1.10.0" ) // [Required] MediaSession Extension dependency
87+ implementation(" androidx.media3:media3-ui:1.10.0" ) // [Required] Base Player UI
88+ implementation(" androidx.navigation:navigation-compose:2.9.3" )
89+ implementation(" com.google.firebase:firebase-analytics:23.0.0" )
90+ implementation(" androidx.core:core-ktx:1.17.0" )
91+ implementation(" androidx.lifecycle:lifecycle-runtime-ktx:2.9.2" )
92+ implementation(" androidx.activity:activity-compose:1.10.1" )
93+ implementation(" androidx.appcompat:appcompat:1.7.1" )
94+ implementation(platform(" androidx.compose:compose-bom:2024.08.00" ))
95+ implementation(" androidx.compose.ui:ui" )
96+ implementation(" androidx.compose.ui:ui-graphics" )
97+ implementation(" androidx.compose.ui:ui-tooling-preview" )
98+ implementation(" androidx.compose.material3:material3" )
99+
100+ testImplementation(" junit:junit:4.13.2" )
101+
102+ androidTestImplementation(" androidx.test.ext:junit:1.3.0" )
103+ androidTestImplementation(" androidx.test.espresso:espresso-core:3.7.0" )
104+ androidTestImplementation(platform(" androidx.compose:compose-bom:2024.08.00" ))
105+ androidTestImplementation(" androidx.compose.ui:ui-test-junit4" )
106+
107+ debugImplementation(" androidx.compose.ui:ui-tooling" )
108+ debugImplementation(" androidx.compose.ui:ui-test-manifest" )
19109}
0 commit comments