aprsdroid/build.gradle

131 wiersze
3.2 KiB
Groovy
Czysty Zwykły widok Historia

2017-04-24 05:10:58 +00:00
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
mavenCentral()
google()
2017-04-24 05:10:58 +00:00
}
dependencies {
2019-03-16 18:29:57 +00:00
classpath 'com.android.tools.build:gradle:3.5.1'
2017-04-24 05:10:58 +00:00
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// grgit for version tags
2019-12-30 17:33:50 +00:00
classpath 'org.ajoberstar:grgit:1.1.0'
2019-12-30 22:04:37 +00:00
// https://github.com/Triple-T/gradle-play-publisher#usage
classpath 'com.github.triplet.gradle:play-publisher:2.4.1'
// scala build
2019-03-16 18:29:57 +00:00
classpath 'com.github.AllBus:gradle-android-scala-plugin:3.5.1'
2017-04-24 05:10:58 +00:00
}
}
plugins {
// obtain revision from git
2019-12-30 17:33:50 +00:00
id 'org.ajoberstar.grgit' version '1.6.0'
2017-04-24 05:10:58 +00:00
}
allprojects {
repositories {
google()
2017-04-24 05:10:58 +00:00
jcenter()
}
}
/////////////// APRSdroid specific build rules ///////////////
apply plugin: 'com.android.application'
apply plugin: 'jp.leafytree.android-scala'
2019-12-30 22:04:37 +00:00
apply plugin: 'com.github.triplet.play'
2017-04-24 05:10:58 +00:00
ext {
build_date = "${new Date().format('yyyy-MM-dd')}"
build_revision = "${grgit.describe()}"
build_version = "APRSdroid ${build_revision} ${build_date}"
}
2019-12-30 16:45:41 +00:00
tasks.withType(ScalaCompile) {
// Suppress deprecation warnings
scalaCompileOptions.deprecation = false
}
def versionCodeDate() {
return new Date().format("yyyyMMdd00").toInteger()
}
2017-04-24 05:10:58 +00:00
android {
2019-12-28 14:08:36 +00:00
compileSdkVersion 28
2017-04-24 05:10:58 +00:00
defaultConfig {
2019-12-28 14:08:36 +00:00
minSdkVersion 14
targetSdkVersion 28
2017-04-24 05:10:58 +00:00
versionName "$build_revision"
versionCode versionCodeDate()
resValue "string", "build_revision", "$build_revision"
resValue "string", "build_date", "$build_date"
resValue "string", "build_version", "$build_version"
2020-01-01 20:18:49 +00:00
// the google_maps_key is restricted to ge0rg's signing keys and can't be used by other builds!
resValue "string", "google_maps_key", "AIzaSyA12R_iI_upYQ33FWnPU_8GlMKrEmjDxiQ"
2017-04-24 05:10:58 +00:00
}
2019-12-28 14:08:36 +00:00
useLibrary 'org.apache.http.legacy'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
2017-04-24 05:10:58 +00:00
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
2020-08-04 18:01:31 +00:00
if (project.hasProperty("RELEASE_KEY_ALIAS")) {
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
2017-04-24 05:10:58 +00:00
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
scala.srcDirs = ['src']
2017-04-24 05:10:58 +00:00
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
lintOptions {
disable 'MissingTranslation'
}
}
2019-12-30 22:04:37 +00:00
play {
serviceAccountCredentials = file('play-publish-credentials.json')
track = 'beta'
}
2017-04-24 05:10:58 +00:00
dependencies {
2019-03-16 18:29:57 +00:00
implementation "org.scala-lang:scala-library:2.11.12"
2017-04-24 05:10:58 +00:00
//compile 'com.google.android.gms:play-services-maps:6.5.87'
implementation fileTree(include: ['*.jar'], dir: 'libs')
2020-04-12 17:43:47 +00:00
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.maps.android:android-maps-utils:0.5'
2017-04-24 05:10:58 +00:00
}