This repository has been archived by the owner on Mar 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathbuild.gradle.kts
136 lines (106 loc) · 4.56 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
plugins {
id("com.android.application")
kotlin("android")
id("kotlin-parcelize")
}
android {
compileSdk = 31
defaultConfig {
minSdk = 21
targetSdk = 31
applicationId = "com.vanced.manager"
versionCode = 3000
versionName = "3.0.0 (Re@Composed)"
vectorDrawables.useSupportLibrary = true
buildConfigField("String[]", "MANAGER_LANGUAGES", "{$languages}")
}
lint {
disable("MissingTranslation", "ExtraTranslation")
}
buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
buildFeatures {
compose = true
}
packagingOptions {
resources.excludes.add("META-INF/DEPENDENCIES")
resources.excludes.add("META-INF/*.kotlin_module")
}
// To inline the bytecode built with JVM target 1.8 into
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
composeOptions {
kotlinCompilerExtensionVersion = "1.1.0-alpha06"
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
}
}
val languages: String get() {
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")
File("$projectDir/src/main/res").listFiles()?.filter {
val name = it.name
name.startsWith("values") && !name.contains("v23") && !name.contains("night")
}?.forEach { dir ->
val dirname = dir.name.substringAfter("-").substringBefore("-")
if (!exceptions.contains(dirname)) {
langs.add(dirname)
}
}
return langs.joinToString(", ") { "\"$it\"" }
}
dependencies {
implementation(kotlin("reflect"))
// AndroidX
implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.appcompat:appcompat:1.3.1")
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")
// Compose
val composeVersion = "1.1.0-beta03"
implementation("androidx.compose.compiler:compiler:$composeVersion")
implementation("androidx.compose.foundation:foundation:$composeVersion")
implementation("androidx.compose.material:material-icons-core:$composeVersion")
implementation("androidx.compose.material:material-icons-extended:$composeVersion")
implementation("androidx.compose.material:material:$composeVersion")
implementation("androidx.compose.material3:material3:1.0.0-alpha01")
implementation("androidx.compose.runtime:runtime-livedata:$composeVersion")
implementation("androidx.compose.ui:ui-tooling:$composeVersion")
implementation("androidx.compose.ui:ui-util:$composeVersion")
implementation("androidx.compose.ui:ui:$composeVersion")
// Google
implementation("com.google.android.material:material:1.4.0")
val accompanistVersion = "0.20.0"
implementation("com.google.accompanist:accompanist-navigation-animation:$accompanistVersion")
implementation("com.google.accompanist:accompanist-placeholder-material:$accompanistVersion")
implementation("com.google.accompanist:accompanist-swiperefresh:$accompanistVersion")
implementation("com.google.accompanist:accompanist-systemuicontroller:$accompanistVersion")
// Other
implementation("com.github.zsoltk:compose-router:0.28.0")
implementation("io.coil-kt:coil-compose:1.4.0")
implementation("com.github.skydoves:orchestra-colorpicker:1.1.0")
val koinVersion = "3.1.3"
implementation("io.insert-koin:koin-android:$koinVersion")
implementation("io.insert-koin:koin-androidx-compose:$koinVersion")
val retrofitVersion = "2.9.0"
implementation("com.squareup.retrofit2:retrofit:$retrofitVersion")
implementation("com.squareup.retrofit2:converter-gson:$retrofitVersion")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
}