File tree Expand file tree Collapse file tree
src/test/java/to/bitkit/build Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,7 +137,12 @@ build task="assembleDevDebug":
137137 {{ gradle }} {{ task }}
138138
139139release :
140+ #!/usr/bin/env sh
141+ set -eu
140142 {{ gradle }} assembleMainnetRelease bundleMainnetRelease
143+ symbols=" app/build/outputs/native-debug-symbols/mainnetRelease/native-debug-symbols.zip"
144+ test -f " $symbols "
145+ ls -lh " $symbols "
141146
142147install :
143148 {{ gradle }} installDevDebug
Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ android {
230230 )
231231 signingConfig = signingConfigs.getByName(" release" )
232232 ndk {
233+ debugSymbolLevel = " FULL"
233234 // noinspection ChromeOsAbiSupport
234235 abiFilters + = listOf (" armeabi-v7a" , " arm64-v8a" )
235236 }
Original file line number Diff line number Diff line change 1+ package to.bitkit.build
2+
3+ import kotlin.io.path.Path
4+ import kotlin.io.path.exists
5+ import kotlin.io.path.readText
6+ import kotlin.test.Test
7+ import kotlin.test.assertTrue
8+
9+ class NativeReleaseConfigTest {
10+
11+ private val repoRoot = generateSequence(
12+ Path (requireNotNull(System .getProperty(" user.dir" )) { " user.dir is required" }),
13+ ) { it.parent }
14+ .first { it.resolve(" gradle/libs.versions.toml" ).exists() }
15+
16+ @Test
17+ fun `release build keeps full native debug symbols` () {
18+ val buildFile = repoRoot.resolve(" app/build.gradle.kts" ).readText()
19+
20+ assertTrue(
21+ buildFile.contains(""" debugSymbolLevel = "FULL"""" ),
22+ " Release builds must keep full native debug symbols for Play crash symbolication." ,
23+ )
24+ }
25+
26+ @Test
27+ fun `release recipe verifies native debug symbols archive` () {
28+ val justfile = repoRoot.resolve(" Justfile" ).readText()
29+
30+ assertTrue(
31+ justfile.contains(
32+ """ symbols="app/build/outputs/native-debug-symbols/mainnetRelease/native-debug-symbols.zip"""" ,
33+ ),
34+ " Release builds must verify the native debug symbols archive before publishing." ,
35+ )
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments