mirror of
https://gitlab.com/fasheng/amap-nlp-backend
synced 2020-06-03 18:26:57 +00:00
79 lines
1.8 KiB
Groovy
79 lines
1.8 KiB
Groovy
allprojects {
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
}
|
|
}
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:3.1.3'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
String getMyVersionName() {
|
|
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()
|
|
}
|
|
|
|
int getMyVersionCode() {
|
|
def stdout = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine 'git', 'rev-list', '--count', "HEAD"
|
|
standardOutput = stdout
|
|
}
|
|
return Integer.parseInt(stdout.toString().trim())
|
|
}
|
|
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.microg:unifiednlp-api:1.5.6'
|
|
implementation 'com.amap.api:location:4.7.2'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
buildToolsVersion "28.0.3"
|
|
|
|
defaultConfig {
|
|
versionName getMyVersionName()
|
|
versionCode(getMyVersionCode() + 0)
|
|
minSdkVersion 9
|
|
targetSdkVersion 28
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
storePassword RELEASE_STORE_PASSWORD
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
keyPassword RELEASE_KEY_PASSWORD
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
|
|
if (file('user.gradle').exists()) {
|
|
apply from: 'user.gradle'
|
|
}
|