mirror of
https://github.com/love2d/love-android.git
synced 2026-08-12 16:41:12 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07088eee88 | |||
| 3d1503f917 | |||
| 65c4223d0a | |||
| 1975903d2e |
+22
-11
@@ -5,46 +5,57 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
build_type: [Debug, Release]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: adopt-hotspot
|
||||
java-version: 17
|
||||
cache: gradle
|
||||
- name: Build
|
||||
run: bash ./gradlew assembleNormalRecord assembleEmbedRelease bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
|
||||
- name: Build Normal Flavor
|
||||
run: bash ./gradlew assembleNormalRecord${{ matrix.build_type }}
|
||||
- name: Build Release-specific Binaries
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
run: bash ./gradlew assembleEmbedRelease bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
|
||||
- name: Artifact (Normal debug APK)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Debug' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-debug.apk
|
||||
path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk
|
||||
- name: Artifact (Normal unsigned APK)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android.apk
|
||||
path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk
|
||||
- name: Artifact (Normal AAB w/o recording)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-ps.aab
|
||||
path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab
|
||||
- name: Artifact (Embed AAB)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-embed-record.aab
|
||||
path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab
|
||||
- name: Artifact (Embed AAB w/o recording)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ matrix.build_type == 'Release' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-embed.aab
|
||||
path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab
|
||||
- name: Artifact (Debug symbols)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: love-android-unstripped-debugsyms
|
||||
name: love-android-unstripped-debugsyms-${{ matrix.build_type }}
|
||||
path: love/build/intermediates/library_jni
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ android {
|
||||
applicationId project.properties["app.application_id"]
|
||||
versionCode project.properties["app.version_code"].toInteger()
|
||||
versionName project.properties["app.version_name"]
|
||||
minSdk 16
|
||||
minSdk 18
|
||||
compileSdk 34
|
||||
targetSdk 34
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ android {
|
||||
ndkVersion '25.2.9519653'
|
||||
|
||||
defaultConfig {
|
||||
minSdk 16
|
||||
minSdk 18
|
||||
compileSdk 34
|
||||
targetSdk 34
|
||||
externalNativeBuild {
|
||||
|
||||
@@ -1023,8 +1023,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
if (resizable) {
|
||||
/* All orientations are allowed */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* All orientations are allowed, respecting user orientation lock setting */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
||||
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||
@@ -1033,8 +1033,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* At least one orientation is allowed */
|
||||
if (resizable) {
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
/* hint allows both landscape and portrait, promote to full sensor */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* hint allows both landscape and portrait, promote to full user */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
|
||||
Reference in New Issue
Block a user