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'
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId 'com.example.hlsdk'
|
2023-12-29 11:02:50 +01:00
|
|
|
versionName '1.0'
|
2023-12-28 15:25:04 +01:00
|
|
|
versionCode getBuildNum()
|
2023-12-29 11:30:40 +01:00
|
|
|
minSdkVersion 3
|
2023-12-28 15:25:04 +01:00
|
|
|
targetSdk 34
|
|
|
|
compileSdk 34
|
|
|
|
}
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
version '3.22.1'
|
2023-12-29 11:30:40 +01:00
|
|
|
path file('../../CMakeLists.txt')
|
2023-12-28 15:25:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lint {
|
|
|
|
abortOnError false
|
|
|
|
}
|
|
|
|
|
|
|
|
androidResources {
|
|
|
|
noCompress += ''
|
|
|
|
}
|
|
|
|
|
2023-12-29 11:02:50 +01:00
|
|
|
packagingOptions {
|
|
|
|
jniLibs {
|
|
|
|
useLegacyPackaging = true
|
|
|
|
}
|
|
|
|
}
|
2023-12-28 15:25:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|