Skip to content

Commit 3886532

Browse files
committed
android: detect when building app bundle
1 parent 9112851 commit 3886532

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.github/workflows/android.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ jobs:
137137
138138
chmod +x ./gradlew
139139
./gradlew assembleRelease \
140-
-Pci=on \
141140
-Pcpuarch="${{ matrix.arch }}" \
142141
-Pcmake_args="-DGIT_HASH=$GIT_HASH;-DGIT_BRANCH=$GIT_BRANCH" \
143142
--info

mk/android/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ android {
5656
}
5757
}
5858

59-
if (!rootProject.ext.ci) {
60-
// HACK: this just does not work on CI. whatever. it's meant for app bundles anyway.
59+
if (rootProject.ext.bundle) {
6160
assetPacks = [":assetpack"]
62-
}
63-
sourceSets {
64-
main {
65-
assets.srcDirs += ['../assetpack/src/main/assets']
61+
} else {
62+
sourceSets {
63+
main {
64+
assets.srcDirs += ['../assetpack/src/main/assets']
65+
}
6666
}
6767
}
6868

mk/android/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

3-
// Is running in CI mode
4-
ext.ci = hasProperty("ci")
3+
for (String task : gradle.startParameter.getTaskNames()) {
4+
if (task.startsWith("bundle")) {
5+
ext.bundle = true
6+
break
7+
}
8+
}
59

610
if (hasProperty("cpuarch")) {
711
ext.cpuarch = property("cpuarch").split()

0 commit comments

Comments
 (0)