-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathbuild.gradle.kts
83 lines (74 loc) · 2.4 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
/*
* SPDX-FileCopyrightText: 2023 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
import org.lineageos.generatebp.GenerateBpPluginExtension
import org.lineageos.generatebp.models.Module
plugins {
id("com.android.application") version "8.7.1"
id("org.jetbrains.kotlin.android") version "1.9.23"
id("org.lineageos.generatebp") version "+"
}
android {
compileSdk = 35
namespace = "com.android.calculator2"
defaultConfig {
applicationId = "com.android.calculator2"
minSdk = 31
targetSdk = 35
versionCode = 1
versionName = "1.0"
}
buildTypes {
getByName("release") {
// Enables code shrinking, obfuscation, and optimization.
isMinifyEnabled = true
// Enables resource shrinking.
isShrinkResources = true
// Includes the default ProGuard rules files.
setProguardFiles(
listOf(
getDefaultProguardFile("proguard-android.txt"),
"proguard.flags"
)
)
}
getByName("debug") {
// Append .dev to package name so we won't conflict with AOSP build.
applicationIdSuffix = ".dev"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
sourceSets {
getByName("main") {
res.srcDirs("res")
java.srcDirs("src")
assets.srcDirs("assets")
manifest.srcFile("AndroidManifest.xml")
}
}
}
dependencies {
implementation("androidx.gridlayout:gridlayout:1.0.0")
implementation("androidx.webkit:webkit:1.7.0-alpha02")
implementation("com.google.android.material:material:1.11.0")
implementation("com.hp:crcalc:1.0")
}
configure<GenerateBpPluginExtension> {
targetSdk.set(android.defaultConfig.targetSdk!!)
minSdk.set(android.defaultConfig.minSdk!!)
availableInAOSP.set { module: Module ->
when {
module.group.startsWith("androidx") -> true
module.group.startsWith("org.jetbrains") -> true
module.group == "com.google.android.material" -> true
module.group == "com.google.errorprone" -> true
module.group == "com.google.guava" -> true
module.group == "junit" -> true
else -> false
}
}
}