mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 18:41:14 +00:00
script cleanups & gradle stub for android studio
handle the env var setting for the sdl3 aar build script
This commit is contained in:
parent
68b6f20ff3
commit
44a6dae4cd
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -113,11 +113,11 @@ jobs:
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: Setup SDK (Android)
|
||||
- name: Get CMake (Android)
|
||||
if: ${{ matrix.android }}
|
||||
uses: android-actions/setup-android@v3
|
||||
uses: lukka/get-cmake@latest
|
||||
with:
|
||||
packages: 'cmake;3.30.5'
|
||||
cmakeVersion: 3.30.5
|
||||
|
||||
- name: Build (Android)
|
||||
if: ${{ matrix.android }}
|
||||
@ -125,12 +125,12 @@ jobs:
|
||||
cd android-project && \
|
||||
./gradlew assembleRelease \
|
||||
--info \
|
||||
-PcmakeArgs="-DCMAKE_BUILD_TYPE=Release
|
||||
-PcmakeArgs="-DCMAKE_BUILD_TYPE=Release \
|
||||
-DISLE_USE_DX5=${{ !!matrix.dx5 }} \
|
||||
-DISLE_BUILD_CONFIG=${{ !!matrix.config }} \
|
||||
-DENABLE_CLANG_TIDY=${{ !!matrix.clang-tidy }} \
|
||||
-DISLE_WERROR=${{ !!matrix.werror }} \
|
||||
-DISLE_DEBUG=OFF \
|
||||
-DISLE_DEBUG=${{ matrix.debug || 'OFF' }} \
|
||||
-Werror=dev"
|
||||
|
||||
- name: Configure (CMake)
|
||||
|
||||
@ -47,6 +47,16 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
def androidPath = System.getenv("ANDROID_HOME") ?: android.sdkDirectory
|
||||
def ndkPath = System.getenv("ANDROID_NDK_HOME") ?: android.ndkDirectory
|
||||
|
||||
tasks.named('compileSDL3AndroidArchive').configure {
|
||||
environment "ANDROID_HOME", androidPath
|
||||
environment "ANDROID_NDK_HOME", ndkPath
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('compileSDL3AndroidArchive', Exec) {
|
||||
def rootDir = projectDir.parentFile
|
||||
def sdl3Dir = "build/_deps/sdl3-src"
|
||||
@ -55,7 +65,7 @@ tasks.register('compileSDL3AndroidArchive', Exec) {
|
||||
"--actions android " +
|
||||
"--fast " +
|
||||
"--force " +
|
||||
"--root='build/_deps/sdl3-src/'"
|
||||
"--root='${sdl3Dir}'"
|
||||
def mvCommand = "mv ${sdl3Dir}/build-android/SDL3-*.aar ${projectDir}/libs/SDL3.aar"
|
||||
|
||||
commandLine 'sh', '-c', "cd ${rootDir} && ${cmakeCommand} && ${pythonCommand} && mkdir -p ${projectDir}/libs/ && ${mvCommand}"
|
||||
|
||||
@ -2,7 +2,3 @@ plugins {
|
||||
id 'com.android.application' version '8.7.0' apply false
|
||||
id 'com.android.library' version '8.7.0' apply false
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
1
settings.gradle
Normal file
1
settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
includeBuild('android-project')
|
||||
Loading…
Reference in New Issue
Block a user