kopia lustrzana https://github.com/ge0rg/aprsdroid
gradle: streamline build metadata values
rodzic
4ecb46bdf9
commit
1f219877b4
24
build.gradle
24
build.gradle
|
|
@ -41,30 +41,24 @@ ext {
|
|||
build_version = "APRSdroid ${build_revision} ${build_date}"
|
||||
}
|
||||
|
||||
task buildVersion (type: Copy) {
|
||||
from("template") {
|
||||
include "version.xml"
|
||||
expand( build_date: build_date,
|
||||
build_revision: build_revision,
|
||||
build_version: build_version)
|
||||
}
|
||||
into("res/values")
|
||||
outputs.upToDateWhen {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(ScalaCompile) {
|
||||
// Suppress deprecation warnings
|
||||
scalaCompileOptions.deprecation = false
|
||||
}
|
||||
|
||||
def versionCodeDate() {
|
||||
return new Date().format("yyyyMMdd00").toInteger()
|
||||
}
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionName "$build_revision"
|
||||
versionCode versionCodeDate()
|
||||
resValue "string", "build_revision", "$build_revision"
|
||||
resValue "string", "build_date", "$build_date"
|
||||
resValue "string", "build_version", "$build_version"
|
||||
}
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
compileOptions {
|
||||
|
|
@ -113,8 +107,6 @@ android {
|
|||
dependencies {
|
||||
implementation "org.scala-lang:scala-library:2.11.12"
|
||||
//compile 'com.google.android.gms:play-services-maps:6.5.87'
|
||||
api fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
}
|
||||
|
||||
preBuild.dependsOn buildVersion
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- APRSdroid version.xml AUTOGENERATED from template/version.xml -->
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="build_revision">$build_revision</string>
|
||||
<string name="build_date">$build_date</string>
|
||||
<string name="build_version">$build_version</string>
|
||||
</resources>
|
||||
Ładowanie…
Reference in New Issue