72 lines
1.7 KiB
Groovy
72 lines
1.7 KiB
Groovy
/*
|
|
* SPDX-FileCopyrightText: 2013, microG Project Team
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
buildscript {
|
|
ext.kotlinVersion = '1.3.72'
|
|
ext.coroutineVersion = '1.3.3'
|
|
|
|
ext.appcompatVersion = '1.1.0'
|
|
ext.fragmentVersion = '1.2.4'
|
|
ext.recyclerviewVersion = '1.1.0'
|
|
ext.lifecycleVersion = '2.2.0'
|
|
|
|
ext.androidBuildGradleVersion = '3.6.3'
|
|
|
|
ext.androidBuildVersionTools = '29.0.3'
|
|
|
|
ext.androidMinSdk = 9
|
|
ext.androidTargetSdk = 29
|
|
ext.androidCompileSdk = 29
|
|
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
classpath "com.android.tools.build:gradle:$androidBuildGradleVersion"
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
}
|
|
}
|
|
|
|
String gitDescribeVersion() {
|
|
def stdout = new ByteArrayOutputStream()
|
|
if (rootProject.file("gradlew").exists())
|
|
exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout }
|
|
else // automatic build system, don't tag dirty
|
|
exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout }
|
|
return stdout.toString().trim().substring(1)
|
|
}
|
|
|
|
int gitCountCommits() {
|
|
def stdout = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine 'git', 'rev-list', '--count', "HEAD"
|
|
standardOutput = stdout
|
|
}
|
|
return Integer.parseInt(stdout.toString().trim())
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: 'idea'
|
|
|
|
group = 'org.microg.nlp'
|
|
version = gitDescribeVersion()
|
|
ext.appVersionCode = gitCountCommits()
|
|
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << "-Xlint:deprecation"
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|
|
}
|