hlsdk-xash3d/android/app/build.gradle

76 lines
1.7 KiB
Groovy
Raw Normal View History

2023-12-28 15:25:04 +01:00
import java.time.LocalDateTime
import java.time.Month
import java.time.temporal.ChronoUnit
apply plugin: 'com.android.application'
android {
ndkVersion '26.1.10909125'
namespace 'com.example.hlsdk'
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
defaultConfig {
applicationId 'com.example.hlsdk'
versionName '1.35'
versionCode getBuildNum()
minSdkVersion 19
targetSdk 34
compileSdk 34
}
externalNativeBuild {
cmake {
version '3.22.1'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
externalNativeBuild {
cmake {
path file('../../CMakeLists.txt')
}
}
lint {
abortOnError false
}
androidResources {
noCompress += ''
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
}
static def getBuildNum() {
LocalDateTime now = LocalDateTime.now()
LocalDateTime releaseDate = LocalDateTime.of(2023, Month.DECEMBER, 28, 0, 0, 0)
int qBuildNum = releaseDate.until(now, ChronoUnit.DAYS)
int minuteOfDay = now.getHour() * 60 + now.getMinute()
return qBuildNum * 10000 + minuteOfDay
}