0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-12-05 01:07:25 +00:00
VancedManager/app/build.gradle.kts

138 lines
4.6 KiB
Text
Raw Normal View History

2021-01-10 10:11:04 +00:00
plugins {
id("com.android.application")
kotlin("android")
2021-10-31 08:52:51 +00:00
id("kotlin-parcelize")
2021-01-10 10:11:04 +00:00
}
2021-12-02 11:39:54 +00:00
val composeVersion = "1.1.0-beta04"
2021-01-10 10:11:04 +00:00
android {
2021-08-20 07:32:09 +00:00
compileSdk = 31
2021-01-10 10:11:04 +00:00
defaultConfig {
2021-05-30 16:21:05 +00:00
minSdk = 21
2021-08-20 07:32:09 +00:00
targetSdk = 31
2021-05-30 16:21:05 +00:00
2021-01-10 10:11:04 +00:00
applicationId = "com.vanced.manager"
2021-05-30 16:21:05 +00:00
versionCode = 3000
versionName = "3.0.0 (Re@Composed)"
2021-01-10 10:11:04 +00:00
vectorDrawables.useSupportLibrary = true
buildConfigField("String[]", "MANAGER_LANGUAGES", "{$languages}")
2021-01-10 10:11:04 +00:00
}
2021-05-30 16:21:05 +00:00
lint {
2021-01-10 10:11:04 +00:00
disable("MissingTranslation", "ExtraTranslation")
}
buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
buildFeatures {
2021-05-30 16:21:05 +00:00
compose = true
2021-01-10 10:11:04 +00:00
}
packagingOptions {
2021-05-30 16:21:05 +00:00
resources.excludes.add("META-INF/DEPENDENCIES")
resources.excludes.add("META-INF/*.kotlin_module")
2021-01-10 10:11:04 +00:00
}
2021-05-30 16:21:05 +00:00
// To inline the bytecode built with JVM target 1.8 into
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
2021-01-10 10:11:04 +00:00
compileOptions {
2021-09-24 15:27:56 +00:00
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
2021-01-10 10:11:04 +00:00
}
2021-06-26 17:09:39 +00:00
composeOptions {
2021-12-02 11:39:54 +00:00
kotlinCompilerExtensionVersion = composeVersion
2021-06-26 17:09:39 +00:00
}
2021-05-30 16:21:05 +00:00
}
2021-01-10 10:11:04 +00:00
2021-05-30 16:21:05 +00:00
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
2021-09-24 15:27:56 +00:00
jvmTarget = "11"
2021-10-17 07:30:15 +00:00
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
2021-05-30 16:21:05 +00:00
}
2021-01-10 10:11:04 +00:00
}
val languages: String get() {
2021-01-15 19:08:19 +00:00
val langs = arrayListOf("en", "bn_BD", "bn_IN", "pa_IN", "pa_PK", "pt_BR", "pt_PT", "zh_CN", "zh_TW")
val exceptions = arrayOf("bn", "pa", "pt", "zh")
2021-01-10 10:11:04 +00:00
File("$projectDir/src/main/res").listFiles()?.filter {
val name = it.name
2021-05-30 16:21:05 +00:00
name.startsWith("values") && !name.contains("v23") && !name.contains("night")
}?.forEach { dir ->
val dirname = dir.name.substringAfter("-").substringBefore("-")
2021-02-23 15:34:48 +00:00
if (!exceptions.contains(dirname)) {
langs.add(dirname)
2021-01-10 10:11:04 +00:00
}
}
2021-01-10 12:11:29 +00:00
return langs.joinToString(", ") { "\"$it\"" }
2021-01-10 10:11:04 +00:00
}
dependencies {
implementation(kotlin("reflect"))
2021-11-22 11:54:56 +00:00
// AndroidX
2021-11-02 20:35:12 +00:00
implementation("androidx.core:core-ktx:1.7.0")
2021-12-02 11:39:54 +00:00
implementation("androidx.appcompat:appcompat:1.4.0")
2021-11-22 11:54:56 +00:00
implementation("androidx.browser:browser:1.4.0")
implementation("androidx.preference:preference-ktx:1.1.1")
implementation("androidx.activity:activity-compose:1.4.0")
val lifecycleVersion = "2.4.0"
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion")
2021-01-10 10:11:04 +00:00
2021-11-22 11:54:56 +00:00
// Compose
2021-06-26 17:09:39 +00:00
implementation("androidx.compose.compiler:compiler:$composeVersion")
2021-05-30 16:21:05 +00:00
implementation("androidx.compose.foundation:foundation:$composeVersion")
implementation("androidx.compose.material:material-icons-core:$composeVersion")
implementation("androidx.compose.material:material-icons-extended:$composeVersion")
2021-06-26 17:09:39 +00:00
implementation("androidx.compose.material:material:$composeVersion")
2021-12-02 11:39:54 +00:00
implementation("androidx.compose.material3:material3:1.0.0-alpha02")
2021-05-30 16:21:05 +00:00
implementation("androidx.compose.runtime:runtime-livedata:$composeVersion")
2021-06-26 17:09:39 +00:00
implementation("androidx.compose.ui:ui-tooling:$composeVersion")
implementation("androidx.compose.ui:ui-util:$composeVersion")
implementation("androidx.compose.ui:ui:$composeVersion")
2021-05-30 16:21:05 +00:00
2021-06-27 09:28:18 +00:00
2021-11-22 11:54:56 +00:00
// Google
implementation("com.google.android.material:material:1.4.0")
2021-09-24 15:27:56 +00:00
2021-10-17 07:30:15 +00:00
val accompanistVersion = "0.20.0"
2021-08-20 08:17:47 +00:00
implementation("com.google.accompanist:accompanist-navigation-animation:$accompanistVersion")
implementation("com.google.accompanist:accompanist-placeholder-material:$accompanistVersion")
2021-05-30 16:21:05 +00:00
implementation("com.google.accompanist:accompanist-swiperefresh:$accompanistVersion")
implementation("com.google.accompanist:accompanist-systemuicontroller:$accompanistVersion")
2021-06-26 17:09:39 +00:00
2021-11-22 11:54:56 +00:00
// Other
implementation("com.github.zsoltk:compose-router:0.28.0")
2021-10-17 07:30:15 +00:00
implementation("io.coil-kt:coil-compose:1.4.0")
2021-07-15 20:45:52 +00:00
2021-09-24 15:27:56 +00:00
implementation("com.github.skydoves:orchestra-colorpicker:1.1.0")
2021-11-22 11:54:56 +00:00
val koinVersion = "3.1.3"
2021-05-30 16:21:05 +00:00
implementation("io.insert-koin:koin-android:$koinVersion")
implementation("io.insert-koin:koin-androidx-compose:$koinVersion")
2021-01-10 10:11:04 +00:00
2021-08-20 07:30:34 +00:00
val retrofitVersion = "2.9.0"
2021-05-30 16:21:05 +00:00
implementation("com.squareup.retrofit2:retrofit:$retrofitVersion")
implementation("com.squareup.retrofit2:converter-gson:$retrofitVersion")
2021-01-10 10:11:04 +00:00
2021-05-30 16:21:05 +00:00
testImplementation("junit:junit:4.13.2")
2021-07-12 14:04:43 +00:00
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
2021-01-10 10:11:04 +00:00
}