mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
Remove BUILDTIME BuildConfig field
This commit removes the `BUILDTIME` field from `BuildConfig` across all modules. This change improves build caching and reproducibility by eliminating a value that changed with every build. The `BUILDTIME` was previously used in `VERSION_DESCRIPTION_LONG` but is no longer included.
This commit is contained in:
@@ -21,7 +21,6 @@ android {
|
||||
buildConfigField("String", "VERSION_NAME", "\"${ProjectConfig.Version.name}\"")
|
||||
buildConfigField("String", "APPLICATION_ID", "\"${ProjectConfig.packageName}\"")
|
||||
buildConfigField("String", "GITSHA", "\"${lastCommitHash()}\"")
|
||||
buildConfigField("String", "BUILDTIME", "\"${buildTime()}\"")
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
@@ -77,6 +76,7 @@ android {
|
||||
unitTests {
|
||||
isIncludeAndroidResources = true
|
||||
}
|
||||
//noinspection WrongGradleMethod
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ object BuildConfigWrap {
|
||||
val VERSION_CODE: Long = BuildConfig.VERSION_CODE.toLong()
|
||||
val VERSION_NAME: String = BuildConfig.VERSION_NAME
|
||||
val GIT_SHA: String = BuildConfig.GITSHA
|
||||
val BUILDTIME: String = BuildConfig.BUILDTIME
|
||||
|
||||
val VERSION_DESCRIPTION_LONG: String = "v$VERSION_NAME ($VERSION_CODE) [$GIT_SHA] ${FLAVOR}_$BUILD_TYPE"
|
||||
val VERSION_DESCRIPTION_SHORT: String = "v$VERSION_NAME [$GIT_SHA] $FLAVOR"
|
||||
|
||||
@@ -9,7 +9,7 @@ apply(plugin = "androidx.navigation.safeargs.kotlin")
|
||||
|
||||
android {
|
||||
compileSdk = ProjectConfig.compileSdk
|
||||
namespace = "${ProjectConfig.packageName}"
|
||||
namespace = ProjectConfig.packageName
|
||||
|
||||
defaultConfig {
|
||||
applicationId = ProjectConfig.packageName
|
||||
@@ -23,7 +23,6 @@ android {
|
||||
testInstrumentationRunner = "eu.darken.capod.HiltTestRunner"
|
||||
|
||||
buildConfigField("String", "GITSHA", "\"${lastCommitHash()}\"")
|
||||
buildConfigField("String", "BUILDTIME", "\"${buildTime()}\"")
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.time.Instant
|
||||
import java.util.Properties
|
||||
|
||||
object ProjectConfig {
|
||||
@@ -35,8 +34,6 @@ fun lastCommitHash(): String = Runtime.getRuntime().exec("git rev-parse --short
|
||||
output.trim()
|
||||
}
|
||||
|
||||
fun buildTime(): Instant = Instant.now()
|
||||
|
||||
fun com.android.build.api.dsl.SigningConfig.setupCredentials(
|
||||
signingPropsPath: File? = null
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user