Skip to content

Commit 5d10109

Browse files
Merge pull request godotengine#21 from m4gr3d/add_platforms_flavors
Add product flavors for the Android and HorizonOS platforms
2 parents 2748b37 + 58b0e78 commit 5d10109

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,22 @@ jobs:
4848
GABE_RELEASE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
4949
GABE_RELEASE_KEY_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
5050
run: |
51-
./gradlew assembleRelease bundleRelease
51+
./gradlew assembleRelease bundleAndroidRelease
5252
5353
- name: Upload debug artifacts
5454
uses: actions/upload-artifact@v4
5555
with:
5656
name: debug-artifacts
5757
path: |
58-
app/build/outputs/apk/debug/
58+
app/build/outputs/apk/android/debug/
59+
app/build/outputs/apk/horizonos/debug/
5960
6061
- name: Upload release artifacts
6162
if: github.ref == 'refs/heads/main'
6263
uses: actions/upload-artifact@v4
6364
with:
6465
name: release-artifacts
6566
path: |
66-
app/build/outputs/apk/release/
67-
app/build/outputs/bundle/release/
67+
app/build/outputs/apk/android/release/
68+
app/build/outputs/apk/horizonos/release/
69+
app/build/outputs/bundle/androidRelease/

‎app/build.gradle‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ android {
5151
}
5252
}
5353

54+
flavorDimensions = ["android_distribution"]
55+
productFlavors {
56+
android {
57+
dimension "android_distribution"
58+
getIsDefault().set(true)
59+
}
60+
horizonos {
61+
dimension "android_distribution"
62+
applicationIdSuffix ".horizonos"
63+
versionNameSuffix "-horizonos"
64+
}
65+
}
66+
5467
compileOptions {
5568
sourceCompatibility JavaVersion.VERSION_17
5669
targetCompatibility JavaVersion.VERSION_17
@@ -92,4 +105,4 @@ dependencies {
92105
androidTestImplementation libs.androidx.compose.ui.test.junit4
93106
debugImplementation libs.androidx.compose.ui.tooling
94107
debugImplementation libs.androidx.compose.ui.test.manifest
95-
}
108+
}

0 commit comments

Comments
 (0)