-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
33 lines (29 loc) · 1 KB
/
build.gradle
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
plugins {
alias libs.plugins.com.android.application apply false
alias libs.plugins.com.android.library apply false
alias libs.plugins.org.jetbrains.kotlin.android apply false
}
version = findProperty("LIBRARY_VERSION")
def getValueFromPropertiesFile = { propFile, key ->
if (!propFile.isFile() || !propFile.canRead())
return null
def prop = new Properties()
def reader = propFile.newReader()
try {
prop.load(reader)
} finally {
reader.close()
}
return prop.get(key)
}
ext.getValueFromLocalProperties = { name, defValue ->
def prop = project.properties[name] ?:
getValueFromPropertiesFile(project.rootProject.file('local.properties'), name)
return (null == prop) ? defValue : prop
}
// Built-in task
tasks.named("wrapper") {
// Change the `gradle-wrapper` value in the version catalog and run `./gradlew wrapper` to update.
gradleVersion = libs.versions.gradle.wrapper.get()
distributionType = Wrapper.DistributionType.BIN
}