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' }
|
2019-03-16 18:10:58 +00:00
|
|
|
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
|
|
|
|
|
2019-03-16 18:10:58 +00:00
|
|
|
// grgit for version tags
|
2019-12-30 17:33:50 +00:00
|
|
|
classpath 'org.ajoberstar:grgit:1.1.0'
|
2019-03-16 18:10:58 +00:00
|
|
|
|
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'
|
|
|
|
|
2019-03-16 18:10:58 +00:00
|
|
|
// 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 {
|
2019-03-16 18:10:58 +00:00
|
|
|
google()
|
2017-04-24 05:10:58 +00:00
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/////////////// APRSdroid specific build rules ///////////////
|
|
|
|
apply plugin: 'com.android.application'
|
2019-03-16 18:10:58 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2019-12-30 17:34:53 +00:00
|
|
|
def versionCodeDate() {
|
2020-08-28 19:07:24 +00:00
|
|
|
if (project.hasProperty("RELEASE_MINOR")) {
|
|
|
|
return new Date().format("yyyyMMdd" + RELEASE_MINOR).toInteger()
|
|
|
|
} else {
|
|
|
|
return new Date().format("yyyyMMdd00").toInteger()
|
|
|
|
}
|
2019-12-30 17:34:53 +00:00
|
|
|
}
|
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"
|
2019-12-30 17:34:53 +00:00
|
|
|
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']
|
2020-08-22 12:19:02 +00:00
|
|
|
// some gradle-android-scala-plugin versions don't know scala.* properties
|
|
|
|
// if it breaks, just remove the following two lines:
|
2020-08-30 02:53:39 +00:00
|
|
|
//scala.srcDirs = ['src']
|
|
|
|
//scala.excludes = ["*.sw?"]
|
2017-04-24 05:10:58 +00:00
|
|
|
resources.srcDirs = ['src']
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
renderscript.srcDirs = ['src']
|
|
|
|
res.srcDirs = ['res']
|
|
|
|
assets.srcDirs = ['assets']
|
2020-08-28 19:03:25 +00:00
|
|
|
jniLibs.srcDirs = ['libs']
|
2017-04-24 05:10:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
2020-08-30 17:32:32 +00:00
|
|
|
disable 'InvalidPackage'
|
2017-04-24 05:10:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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'
|
2019-12-30 17:34:53 +00:00
|
|
|
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'
|
2016-09-17 15:31:40 +00:00
|
|
|
|
|
|
|
implementation 'com.squareup.okio:okio:2.1.0'
|
2017-04-24 05:10:58 +00:00
|
|
|
}
|