Skip to content

Commit 9d0ec19

Browse files
committed
feat: Generate .apk file
1 parent 4a3b3b1 commit 9d0ec19

File tree

6 files changed

+48
-1
lines changed

6 files changed

+48
-1
lines changed

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ android {
4747
excludes += "/META-INF/{AL2.0,LGPL2.1}"
4848
}
4949
}
50+
51+
applicationVariants.all {
52+
val variant = this
53+
variant.outputs
54+
.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
55+
.forEach { output ->
56+
// Customize APK filename
57+
val outputFileName = "DiceGame-${variant.versionName}-${variant.buildType.name}.apk"
58+
output.outputFileName = outputFileName
59+
}
60+
}
5061
}
5162

5263
dependencies {

app/release/DiceGame-1.0-release.apk

5.7 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.

app/release/output-metadata.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": 3,
3+
"artifactType": {
4+
"type": "APK",
5+
"kind": "Directory"
6+
},
7+
"applicationId": "com.example.dicegame",
8+
"variantName": "release",
9+
"elements": [
10+
{
11+
"type": "SINGLE",
12+
"filters": [],
13+
"attributes": [],
14+
"versionCode": 1,
15+
"versionName": "1.0",
16+
"outputFile": "DiceGame-1.0-release.apk"
17+
}
18+
],
19+
"elementType": "File",
20+
"baselineProfiles": [
21+
{
22+
"minApi": 28,
23+
"maxApi": 30,
24+
"baselineProfiles": [
25+
"baselineProfiles/1/DiceGame-1.0-release.dm"
26+
]
27+
},
28+
{
29+
"minApi": 31,
30+
"maxApi": 2147483647,
31+
"baselineProfiles": [
32+
"baselineProfiles/0/DiceGame-1.0-release.dm"
33+
]
34+
}
35+
],
36+
"minSdkVersionForDexing": 24
37+
}

0 commit comments

Comments
 (0)