2020-11-29 20:07:46 +00:00
|
|
|
buildscript {
|
2024-03-12 00:48:26 +00:00
|
|
|
ext.getVersionCode = { ->
|
2022-09-17 06:20:24 +00:00
|
|
|
try {
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'rev-list', '--first-parent', '--count', 'HEAD'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
return Integer.parseInt(stdout.toString().trim())
|
|
|
|
}
|
|
|
|
catch (ignored) {
|
|
|
|
return -1
|
|
|
|
}
|
|
|
|
}
|
2020-11-29 20:07:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
google()
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rootProject.buildDir = '../build'
|
|
|
|
subprojects {
|
|
|
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
|
|
|
}
|
|
|
|
subprojects {
|
|
|
|
project.evaluationDependsOn(':app')
|
|
|
|
}
|
|
|
|
|
2023-05-30 17:25:46 +00:00
|
|
|
tasks.register("clean", Delete) {
|
2020-11-29 20:07:46 +00:00
|
|
|
delete rootProject.buildDir
|
|
|
|
}
|