-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle.kts
78 lines (67 loc) · 2.54 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
/*
* Copyright (C) 2019-2024 qwq233 <[email protected]>
* https://github.com/qwq233/Nullgram
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this software.
* If not, see
* <https://www.gnu.org/licenses/>
*/
@file:Suppress("UnstableApiUsage")
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.rust) apply false
}
tasks.register<Delete>("clean").configure {
delete(layout.buildDirectory.asFile.get())
}
val apiCode by extra(93)
val verCode = Common.getBuildVersionCode(rootProject)
val verName = "v" + Version.officialVersionName + "-" + (Common.getGitHeadRefsSuffix(rootProject))
val androidTargetSdkVersion by extra(35)
val androidMinSdkVersion by extra(27)
val androidCompileSdkVersion by extra(35)
val androidBuildToolsVersion = Version.findBuildToolsVersion()
val androidCompileNdkVersion = "27.0.12077973"
fun Project.configureBaseExtension() {
extensions.findByType(com.android.build.gradle.BaseExtension::class)?.run {
compileSdkVersion(androidCompileSdkVersion)
ndkVersion = androidCompileNdkVersion
buildToolsVersion = androidBuildToolsVersion
defaultConfig {
minSdk = androidMinSdkVersion
targetSdk = androidTargetSdkVersion
versionCode = verCode
versionName = verName
}
compileOptions {
sourceCompatibility = Version.java
targetCompatibility = Version.java
}
packagingOptions.jniLibs.useLegacyPackaging = false
}
}
subprojects {
plugins.withId("com.android.application") {
configureBaseExtension()
}
plugins.withId("com.android.library") {
configureBaseExtension()
}
}