Files
OpenTracks/build.gradle
T
dependabot[bot] 247a5f342a Bump androidx.core:core from 1.15.0 to 1.16.0
Bumps androidx.core:core from 1.15.0 to 1.16.0.

---
updated-dependencies:
- dependency-name: androidx.core:core
  dependency-version: 1.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 07:33:41 +02:00

165 lines
5.2 KiB
Groovy

apply plugin: 'com.android.application'
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
def getVersionName = { ->
return 'git describe --tags'.execute().text.trim()
}
def getVersionCode = { ->
return Integer.valueOf('git rev-list HEAD --count'.execute().text.trim())
}
android {
compileOptions {
coreLibraryDesugaringEnabled = true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
compileSdk = 35
buildFeatures {
viewBinding = true
buildConfig = true
}
androidResources {
generateLocaleConfig = true
}
defaultConfig {
applicationId 'de.dennisguse.opentracks'
versionCode 6102
versionName "v4.19.0"
buildConfigField "String", "VERSION_NAME_FULL", "\"${getVersionName()}\""
minSdk = 26
targetSdk = 35
testInstrumentationRunner 'de.dennisguse.opentracks.TestRunner'
testInstrumentationRunnerArguments clearPackageData: 'true'
}
signingConfigs {
nightly {
if (System.getProperty('nightly_store_file') != null) {
storeFile file(System.getProperty('nightly_store_file'))
storePassword System.getProperty('nightly_store_password')
keyAlias System.getProperty('nightly_key_alias')
keyPassword System.getProperty('nightly_key_password')
}
}
release {
if (System.getProperty("release_store_file") != null) {
storeFile file(System.getProperty("release_store_file"))
storePassword System.getProperty("release_store_password")
keyAlias System.getProperty("release_key_alias")
keyPassword System.getProperty("release_key_password")
}
}
}
namespace = 'de.dennisguse.opentracks'
buildTypes {
debug {
applicationIdSuffix '.debug'
versionNameSuffix '-debug'
}
release {
crunchPngs = false
minifyEnabled = false
}
}
flavorDimensions 'version'
productFlavors {
nightly {
dimension 'version'
applicationId 'de.dennisguse.opentracks.nightly'
signingConfig = signingConfigs.nightly
}
irreproducible {
// Non-reproducible: https://f-droid.org/de/packages/de.dennisguse.opentracks/
dimension 'version'
applicationId 'de.dennisguse.opentracks'
versionNameSuffix 'irreproducible'
}
reproducible {
// Developer Binaries: https://github.com/OpenTracksApp/OSMDashboard/releases/download/v%v/de.dennisguse.opentracks.playstore_%v.apk
// FDroid: https://f-droid.org/de/packages/de.dennisguse.opentracks.playstore
// PlayStore: https://play.google.com/store/apps/details?id=de.dennisguse.opentracks.playstore
dimension 'version'
applicationId 'de.dennisguse.opentracks.playstore'
signingConfig = signingConfigs.release
}
}
applicationVariants.configureEach { variant ->
variant.resValue 'string', 'applicationId', variant.applicationId
variant.outputs.configureEach {
if (variant.flavorName == 'nightly') {
setVersionCodeOverride(getVersionCode())
setVersionNameOverride(getVersionName())
}
if (variant.flavorName == 'reproducible') {
outputFileName = "${applicationId}_${variant.versionName}.apk"
} else {
outputFileName = "${applicationId}_${variant.versionCode}.apk"
}
}
}
dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.core:core:1.16.0'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation 'androidx.mediarouter:mediarouter:1.7.0'
implementation 'androidx.core:core-location-altitude:1.0.0-alpha03'
androidTestImplementation 'androidx.test:core:1.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test:rules:1.6.1'
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'org.mockito:mockito-android:5.17.0'
androidTestUtil 'androidx.test:orchestrator:1.5.1'
}