Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.

Commit 411426e

Browse files
committed
reproducible builds
1 parent 7b77eb1 commit 411426e

File tree

3 files changed

+33
-17
lines changed

3 files changed

+33
-17
lines changed

app/build.gradle.kts

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,19 @@ android {
4141
compileSdk = 34
4242
minSdk = 26
4343
targetSdk = 34
44-
versionCode = 92
45-
versionName = "15.3.0"
44+
versionCode = 93
45+
versionName = "16.0.0"
4646
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
4747
multiDexEnabled = true
4848
}
49+
50+
dependenciesInfo {
51+
// Disables dependency metadata when building APKs.
52+
includeInApk = false
53+
// Disables dependency metadata when building Android App Bundles.
54+
includeInBundle = false
55+
}
56+
4957
signingConfigs {
5058
register("nightly") {
5159
if (System.getProperty("nightly_store_file") != null) {
@@ -55,11 +63,20 @@ android {
5563
keyPassword = System.getProperty("nightly_key_password")
5664
}
5765
}
66+
register("release") {
67+
if (System.getProperty("release_store_file") != null) {
68+
storeFile = file(System.getProperty("release_store_file"))
69+
storePassword = System.getProperty("release_store_password")
70+
keyAlias = System.getProperty("release_key_alias")
71+
keyPassword = System.getProperty("release_key_password")
72+
}
73+
}
5874
}
5975
buildTypes {
6076
getByName("release") {
6177
isMinifyEnabled = false
6278
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
79+
signingConfig = signingConfigs.getByName("release")
6380
}
6481
getByName("debug") {
6582
applicationIdSuffix = ".debug"
@@ -78,12 +95,6 @@ android {
7895
buildConfig = true
7996
}
8097

81-
packaging {
82-
resources {
83-
excludes += listOf("META-INF/*")
84-
}
85-
}
86-
8798
lint {
8899
abortOnError = false
89100
}
@@ -92,20 +103,21 @@ android {
92103
val gitVersion = gitVersionProvider.get()
93104

94105
applicationVariants.all {
95-
if (name == "nightly") {
106+
if (name == "nightly" || name == "debug") {
96107
outputs.forEach { output ->
97108
output as com.android.build.gradle.internal.api.ApkVariantOutputImpl
98109
output.versionCodeOverride = gitVersion
99110
output.versionNameOverride = "${applicationId}_${output.versionCode}"
100111
output.outputFileName = "${applicationId}_${versionCode}.apk"
101112
}
113+
} else {
114+
outputs.forEach { output ->
115+
output as com.android.build.gradle.internal.api.ApkVariantOutputImpl
116+
output.outputFileName = "${applicationId}_${versionName}.apk"
117+
}
102118
}
103-
outputs.forEach { output ->
104-
output as com.android.build.gradle.internal.api.ApkVariantOutputImpl
105-
output.outputFileName = "${applicationId}_${output.versionCode}.apk"
106-
}
107-
}
108119

120+
}
109121
}
110122

111123
// Allow references to generated code
@@ -114,8 +126,6 @@ kapt {
114126
}
115127

116128
dependencies {
117-
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
118-
119129
coreLibraryDesugaring(libs.desugar.jdk.libs)
120130

121131
implementation(libs.retrofit)

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
androidGradlePlugin = "8.6.0"
2+
androidGradlePlugin = "8.6.1"
33
androidJunit5 = "1.11.2.0"
44
androidsvg = "1.4"
55
androidTestCore = "1.6.0"

release.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk/
4+
export PATH=$JAVA_HOME/bin:$PATH
5+
6+
./gradlew --no-configuration-cache clean assembleRelease -Drelease_store_file=/home/peter/bahnhofsfotos.jks -Drelease_store_password="$1" -Drelease_key_alias='bahnhofsfotos' -Drelease_key_password="$2"

0 commit comments

Comments
 (0)