2021-06-26 17:09:39 +00:00
|
|
|
import Dependencies.accompanistVersion
|
|
|
|
import Dependencies.composeVersion
|
|
|
|
import Dependencies.koinVersion
|
|
|
|
import Dependencies.orchestraVersion
|
|
|
|
import Dependencies.retrofitVersion
|
|
|
|
|
2021-01-10 10:11:04 +00:00
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
kotlin("android")
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2021-05-30 16:21:05 +00:00
|
|
|
compileSdk = 30
|
2021-01-10 10:11:04 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
2021-05-30 16:21:05 +00:00
|
|
|
minSdk = 21
|
|
|
|
targetSdk = 30
|
|
|
|
|
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
|
|
|
|
|
2021-02-23 15:33:23 +00:00
|
|
|
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 {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
2021-06-26 17:09:39 +00:00
|
|
|
composeOptions {
|
|
|
|
kotlinCompilerExtensionVersion = composeVersion
|
|
|
|
}
|
|
|
|
|
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 {
|
|
|
|
jvmTarget = "1.8"
|
2021-06-26 17:09:39 +00:00
|
|
|
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
|
2021-05-30 16:21:05 +00:00
|
|
|
}
|
2021-01-10 10:11:04 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 15:33:23 +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
|
|
|
|
2021-02-23 15:33:23 +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")
|
2021-02-23 15:33:23 +00:00
|
|
|
}?.forEach { dir ->
|
|
|
|
val dirname = dir.name.substringAfter("-").substringBefore("-")
|
2021-02-23 15:34:48 +00:00
|
|
|
if (!exceptions.contains(dirname)) {
|
2021-02-23 15:33:23 +00:00
|
|
|
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-05-30 16:21:05 +00:00
|
|
|
implementation("androidx.core:core-ktx:1.5.0")
|
|
|
|
implementation("androidx.appcompat:appcompat:1.3.0")
|
|
|
|
implementation("com.google.android.material:material:1.3.0")
|
2021-01-10 10:11:04 +00:00
|
|
|
implementation("androidx.browser:browser:1.3.0")
|
|
|
|
|
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")
|
|
|
|
implementation("androidx.compose.material:material:$composeVersion")
|
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-26 17:09:39 +00:00
|
|
|
implementation("androidx.activity:activity-compose:1.3.0-beta02")
|
|
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.0-alpha02")
|
|
|
|
implementation("androidx.navigation:navigation-compose:2.4.0-alpha03")
|
2021-02-19 13:51:34 +00:00
|
|
|
|
2021-05-30 16:21:05 +00:00
|
|
|
implementation("com.google.accompanist:accompanist-glide:$accompanistVersion")
|
|
|
|
implementation("com.google.accompanist:accompanist-swiperefresh:$accompanistVersion")
|
|
|
|
implementation("com.google.accompanist:accompanist-systemuicontroller:$accompanistVersion")
|
2021-06-26 17:09:39 +00:00
|
|
|
implementation("com.google.accompanist:accompanist-placeholder-material:$accompanistVersion")
|
|
|
|
|
|
|
|
implementation("com.github.skydoves:orchestra-colorpicker:$orchestraVersion")
|
2021-02-19 13:51:34 +00:00
|
|
|
|
2021-06-26 17:09:39 +00:00
|
|
|
implementation("androidx.datastore:datastore-preferences:1.0.0-beta02")
|
2021-01-10 10:11:04 +00:00
|
|
|
|
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-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
|
|
|
implementation("com.github.x1nto:apkhelper:1.1.0")
|
2021-01-10 10:11:04 +00:00
|
|
|
|
2021-05-30 16:21:05 +00:00
|
|
|
testImplementation("junit:junit:4.13.2")
|
|
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.2")
|
|
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
|
2021-01-10 10:11:04 +00:00
|
|
|
}
|