-
Notifications
You must be signed in to change notification settings - Fork 71
/
build.gradle.kts
116 lines (99 loc) · 3.03 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
/*
* SPDX-FileCopyrightText: 2023 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
import org.lineageos.generatebp.GenerateBpPlugin
import org.lineageos.generatebp.GenerateBpPluginExtension
import org.lineageos.generatebp.models.Module
plugins {
id("com.android.application") version "8.1.2"
id("org.jetbrains.kotlin.android") version "1.7.10"
}
apply {
plugin<GenerateBpPlugin>()
}
buildscript {
repositories {
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.4/.m2")
}
dependencies {
classpath("org.lineageos:gradle-generatebp:+")
}
}
android {
compileSdk = 34
namespace = "org.lineageos.eleven"
defaultConfig {
applicationId = "org.lineageos.eleven"
minSdk = 30
targetSdk = 34
versionCode = 420
versionName = "4.2.0"
}
buildTypes {
getByName("debug") {
applicationIdSuffix = ".dev"
}
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.cfg"
)
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
sourceSets {
getByName("main") {
manifest.srcFile("AndroidManifest.xml")
aidl.srcDirs("src")
assets.srcDirs("assets")
java.srcDirs("src")
res.srcDirs("res")
resources.srcDirs("res")
}
}
buildFeatures {
aidl = true
}
lint {
abortOnError = true
baseline = file("lint-baseline.xml")
checkAllWarnings = true
showAll = true
warningsAsErrors = true
xmlReport = false
}
}
dependencies {
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.cardview:cardview:1.0.0")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.palette:palette:1.0.0")
implementation("androidx.preference:preference:1.2.1")
implementation("androidx.recyclerview:recyclerview:1.3.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.android.material:material:1.9.0")
}
configure<GenerateBpPluginExtension> {
targetSdk.set(android.defaultConfig.targetSdk!!)
availableInAOSP.set { module: Module ->
when {
module.group.startsWith("androidx") -> true
module.group.startsWith("org.jetbrains") -> true
module.group == "com.google.errorprone" -> true
module.group == "com.google.guava" -> true
module.group == "junit" -> true
else -> false
}
}
}